1 2007-08-13 Jakub Jelinek <jakub@redhat.com>
3 * allocatestack.c: Include kernel-features.h.
4 * pthread_create.c: Likewise.
5 * pthread_mutex_init.c: Likewise.
7 * pthread_cond_timedwait.c: Likewise.
8 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
9 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
10 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
11 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
12 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
13 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
14 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
16 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
18 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
19 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
20 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
21 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
23 2007-08-12 Jakub Jelinek <jakub@redhat.com>
25 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
26 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
27 byte elements. One of them is the new __shared element.
28 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
29 adjust names of other padding elements.
30 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
31 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
32 byte elements. One of them is the new __shared element.
33 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
34 adjust names of other padding elements.
35 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
36 Renamed __pad1 element to __shared, adjust names of other padding
38 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
39 (pthread_rwlock_t): Likewise.
40 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
43 2007-08-09 Anton Blanchard <anton@samba.org>
45 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
47 2007-08-12 Ulrich Drepper <drepper@redhat.com>
49 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
51 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
53 2007-08-11 Ulrich Drepper <drepper@redhat.com>
55 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
56 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
57 dealing with robust mutexes.
58 * pthread_mutex_timedlock.c: Likewise.
59 * pthread_mutex_trylock.c: Likewise.
60 * pthread_mutex_unlock.c: Likewise.
61 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
63 2007-08-06 Jakub Jelinek <jakub@redhat.com>
65 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
66 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
67 (PTHREAD_MUTEX_PSHARED): Define.
68 * pthread_mutex_init.c (__pthread_mutex_init): Set
69 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
71 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
72 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
73 as second argument to lll_lock.
74 (LLL_MUTEX_TRYLOCK): Take mutex as argument
75 instead of its __data.__lock field.
76 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
77 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
79 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
80 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
81 instead of mutex->__data.__kind directly, pass
82 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
83 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
84 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
85 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
86 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
87 to lll_timedlock, lll_robust_timedlock, lll_unlock and
88 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
89 of mutex->__data.__kind directly.
90 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
91 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
92 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
93 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
94 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
95 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
97 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
98 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
99 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
101 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
102 Take mutex as argument instead of its __data.__lock field, pass
103 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
104 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
106 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
107 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
108 to lll_robust_cond_lock.
109 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
110 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
111 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
112 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
113 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
114 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
116 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
117 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
119 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
120 pshared variable, pass it to lll_lock, lll_unlock,
121 lll_futex_timedwait and lll_futex_wake.
122 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
123 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
125 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
126 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
128 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
129 lll_futex_wake_unlock): Likewise.
130 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
132 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
133 lll_futex_wake_unlock): Likewise.
134 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
136 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
137 lll_futex_wake_unlock): Likewise.
138 (lll_futex_wake): Fix a typo.
139 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
140 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
141 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
142 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
143 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
144 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
145 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
146 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
147 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
148 (__pthread_cond_timedwait): Likewise.
149 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
150 (__condvar_cleanup, __pthread_cond_wait): Likewise.
152 2007-08-05 Jakub Jelinek <jakub@redhat.com>
154 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
155 Don't use CGOTSETUP and CGOTRESTORE macros.
156 (CGOTSETUP, CGOTRESTORE): Remove.
157 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
160 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
162 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
163 definitions for private futexes.
164 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
165 kernel-features.h and lowlevellock.h. Use private futexes if
167 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
168 (__lll_mutex_lock_wait): Rename to
169 (__lll_lock_wait): ... this. Don't compile in for libc.so.
170 (__lll_mutex_timedlock_wait): Rename to ...
171 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
172 Don't compile in for libc.so.
173 (__lll_mutex_unlock_wake): Rename to ...
174 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
175 (__lll_timedwait_tid): Use __NR_gettimeofday.
176 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
177 the header from assembler. Renamed all lll_mutex_* resp.
178 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
179 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
180 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
182 (__lll_lock_wait_private): Add prototype.
183 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
184 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
185 __lll_unlock_wake): Likewise.
186 (lll_lock): Add private argument. Call __lll_lock_wait_private
187 if private is constant LLL_PRIVATE.
188 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
189 lll_timedlock, lll_robust_timedlock): Add private argument.
190 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
191 if private is constant LLL_PRIVATE.
192 (lll_robust_unlock, lll_robust_dead): Add private argument.
193 (lll_lock_t): Remove.
194 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
195 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
196 lll_cond_wake, lll_cond_broadcast): Remove.
197 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
198 kernel-features.h and lowlevellock.h.
199 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
200 (LOAD_FUTEX_WAIT): Define.
201 (__lll_robust_mutex_lock_wait): Rename to ...
202 (__lll_robust_lock_wait): ... this. Add private argument.
203 Use LOAD_FUTEX_WAIT macro.
204 (__lll_robust_mutex_timedlock_wait): Rename to ...
205 (__lll_robust_timedlock_wait): ... this. Add private argument.
206 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
207 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
209 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
210 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
211 __lll_mutex_{lock,unlock}_*.
212 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
213 lowlevellock.h and pthread-errnos.h.
214 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
215 FUTEX_CMP_REQUEUE, EINVAL): Remove.
216 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
217 __lll_mutex_{lock,unlock}_*.
218 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
219 lowlevellock.h and pthread-errnos.h.
220 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
221 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
222 __lll_mutex_{lock,unlock}_*.
223 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
225 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
226 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
227 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
228 (__condvar_tw_cleanup): Likewise.
229 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
231 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
232 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
233 __lll_mutex_{lock,unlock}_*.
234 ( __condvar_w_cleanup): Likewise.
235 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
236 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
237 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
239 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
240 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
241 __lll_mutex_{lock,unlock}_*.
242 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
244 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
245 FUTEX_PRIVATE_FLAG): Remove.
246 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
247 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
248 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
250 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
251 FUTEX_PRIVATE_FLAG): Remove.
252 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
253 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
254 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
256 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
257 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
258 __lll_mutex_{lock,unlock}_*.
259 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
261 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
262 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
263 __lll_mutex_{lock,unlock}_*.
264 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
265 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
266 (__new_sem_post): Use standard initial exec code sequences.
267 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
269 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
270 FUTEX_PRIVATE_FLAG): Remove.
271 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
273 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
274 (__new_sem_trywait): Use standard initial exec code sequences.
275 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
276 (__new_sem_wait): Use standard initial exec code sequences.
278 2007-07-31 Anton Blanchard <anton@samba.org>
280 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
281 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
284 2007-07-31 Jakub Jelinek <jakub@redhat.com>
286 * allocatestack.c (stack_cache_lock): Change type to int.
287 (get_cached_stack, allocate_stack, __deallocate_stack,
288 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
289 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
290 as second argument to lll_lock and lll_unlock macros on
292 * pthread_create.c (__find_in_stack_list): Likewise.
293 (start_thread): Similarly with pd->lock. Use lll_robust_dead
294 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
296 * descr.h (struct pthread): Change lock and setxid_futex field
298 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
299 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
300 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
301 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
303 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
304 * pthread_cond_init.c (__pthread_cond_init): Likewise.
305 * pthreadP.h (__attr_list_lock): Change type to int.
306 * pthread_attr_init.c (__attr_list_lock): Likewise.
307 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
308 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
310 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
311 also for lll_futex_{wake,wait}.
312 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
314 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
315 LLL_SHARED as second argument to lll_{,un}lock.
316 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
317 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
318 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
319 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
321 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
322 as second argument to lll_{,un}lock macros on pd->lock.
323 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
324 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
325 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
326 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
328 * sysdeps/pthread/createthread.c (do_clone, create_thread):
330 * pthread_once.c (once_lock): Change type to int.
331 (__pthread_once): Pass LLL_PRIVATE as second argument to
332 lll_{,un}lock macros on once_lock.
333 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
334 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
335 rwlock->__data.__shared as second argument to them and similarly
337 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
339 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
341 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
342 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
343 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
344 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
345 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
346 to lll_{,un}lock macros on __sem_mappings_lock.
347 * sem_open.c (check_add_mapping): Likewise.
348 (__sem_mappings_lock): Change type to int.
349 * semaphoreP.h (__sem_mappings_lock): Likewise.
350 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
351 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
352 instead of lll_*mutex_*, pass LLL_SHARED as last
354 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
355 pass LLL_SHARED as last argument.
356 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
357 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
358 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
359 pass LLL_SHARED as last argument.
360 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
361 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
362 LLL_SHARED as last argument.
363 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
364 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
366 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
367 __libc_lock_lock_recursive, __libc_lock_unlock,
368 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
369 argument to lll_{,un}lock.
370 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
371 _IO_lock_unlock): Likewise.
372 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
374 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
375 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
377 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
379 (__fork_lock): Change type to int.
380 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
381 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
382 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
384 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
385 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
386 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
388 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
389 pass it through to lll_futex_*wait, only compile in when
391 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
392 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
393 argument and pass it through to lll_futex_*wait.
394 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
395 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
396 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
397 inline functions to __lll_* resp. __lll_robust_*.
398 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
399 (lll_mutex_dead): Add private argument.
400 (__lll_lock_wait_private): New prototype.
401 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
402 __lll_robust_lock_timedwait): Add private argument to prototypes.
403 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
404 call __lll_lock_wait_private, otherwise pass private to
406 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
407 __lll_robust_timedlock): Add private argument, pass it to
408 __lll_*wait functions.
409 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
410 call __lll_unlock_wake_private, otherwise pass private to
412 (__lll_robust_unlock): Add private argument, pass it to
413 __lll_robust_unlock_wake.
414 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
415 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
416 argument, pass it through to __lll_* inline function.
417 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
418 (lll_lock_t): Remove.
419 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
420 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
421 lll_cond_wake, lll_cond_broadcast): Remove.
422 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
423 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
424 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
425 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
426 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
427 the header from assembler. Renamed all lll_mutex_* resp.
428 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
429 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
430 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
431 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
432 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
433 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
434 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
436 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
437 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
438 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
439 (lll_trylock): Likewise, use __lll_trylock_asm, pass
440 MULTIPLE_THREADS_OFFSET as another asm operand.
441 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
442 MULTIPLE_THREADS_OFFSET as last asm operand, call
443 __lll_lock_wait_private if private is constant LLL_PRIVATE,
444 otherwise pass private as another argument to __lll_lock_wait.
445 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
446 lll_timedlock, lll_robust_timedlock): Add private argument, pass
447 private as another argument to __lll_*lock_wait call.
448 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
449 MULTIPLE_THREADS_OFFSET as another asm operand, call
450 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
451 otherwise pass private as another argument to __lll_unlock_wake.
452 (lll_robust_unlock): Add private argument, pass private as another
453 argument to __lll_unlock_wake.
454 (lll_robust_dead): Add private argument, use __lll_private_flag
456 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
457 LLL_MUTEX_LOCK_INITIALIZER.
458 (lll_lock_t): Remove.
459 (LLL_LOCK_INITIALIZER_WAITERS): Define.
460 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
461 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
462 lll_cond_wake, lll_cond_broadcast): Remove.
463 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
464 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
465 2007-05-2{3,9} changes.
466 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
467 kernel-features.h and lowlevellock.h.
468 (LOAD_PRIVATE_FUTEX_WAIT): Define.
469 (LOAD_FUTEX_WAIT): Rewritten.
470 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
472 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
473 (__lll_mutex_lock_wait): Rename to ...
474 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
475 %ecx, %ecx is now private argument. Don't compile in for libc.so.
476 (__lll_mutex_timedlock_wait): Rename to ...
477 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
478 contains private argument. Don't compile in for libc.so.
479 (__lll_mutex_unlock_wake): Rename to ...
480 (__lll_unlock_wake): ... this. %ecx contains private argument.
481 Don't compile in for libc.so.
482 (__lll_timedwait_tid): Use __NR_gettimeofday.
483 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
484 kernel-features.h and lowlevellock.h.
485 (LOAD_FUTEX_WAIT): Define.
486 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
488 (__lll_robust_mutex_lock_wait): Rename to ...
489 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
490 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
492 (__lll_robust_mutex_timedlock_wait): Rename to ...
493 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
494 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
495 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
497 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
498 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
499 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
500 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
501 to __lll_lock_wait in %edx.
502 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
503 Include lowlevellock.h and pthread-errnos.h.
504 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
505 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
506 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
507 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
508 pass LLL_SHARED in %ecx to both __lll_lock_wait and
510 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
511 Include lowlevellock.h and pthread-errnos.h.
512 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
513 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
514 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
515 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
516 pass LLL_SHARED in %ecx to both __lll_lock_wait and
518 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
519 Include lowlevellock.h.
520 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
522 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
523 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
524 pass LLL_SHARED in %ecx to both __lll_lock_wait and
525 __lll_unlock_wake. Use __NR_gettimeofday.
526 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
527 Include lowlevellock.h.
528 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
529 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
530 to __lll_*, pass cond_lock address in %edx rather than %ecx to
531 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
532 and __lll_unlock_wake.
533 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
534 Include lowlevellock.h.
535 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
536 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
537 MUTEX(%ebx) address in %edx rather than %ecx to
538 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
539 and __lll_unlock_wake. Move return value from %ecx to %edx
541 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
542 Include lowlevellock.h.
543 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
545 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
546 MUTEX(%ebp) address in %edx rather than %ecx to
547 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
548 and __lll_unlock_wake. Move return value from %ecx to %edx
549 register. Use __NR_gettimeofday.
550 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
551 Include lowlevellock.h.
552 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
554 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
555 MUTEX(%ebp) address in %edx rather than %ecx to
556 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
557 and __lll_unlock_wake. Move return value from %ecx to %edx
558 register. Use __NR_gettimeofday.
559 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
560 Include lowlevellock.h.
561 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
562 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
563 MUTEX(%edi) address in %edx rather than %ecx to
564 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
565 and __lll_unlock_wake.
566 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
567 Include lowlevellock.h.
568 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
569 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
570 MUTEX(%ebx) address in %edx rather than %ecx to
571 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
572 and __lll_unlock_wake. Move return value from %ecx to %edx
574 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
576 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
578 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
579 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
580 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
582 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
583 (sem_timedwait): Use __NR_gettimeofday.
584 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
586 (LOCK): Don't define.
587 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
589 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
590 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
592 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
593 2007-05-2{3,9} changes.
594 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
595 kernel-features.h and lowlevellock.h.
596 (LOAD_PRIVATE_FUTEX_WAIT): Define.
597 (LOAD_FUTEX_WAIT): Rewritten.
598 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
599 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
600 (__lll_mutex_lock_wait): Rename to ...
601 (__lll_lock_wait): ... this. %esi is now private argument.
602 Don't compile in for libc.so.
603 (__lll_mutex_timedlock_wait): Rename to ...
604 (__lll_timedlock_wait): ... this. %esi contains private argument.
605 Don't compile in for libc.so.
606 (__lll_mutex_unlock_wake): Rename to ...
607 (__lll_unlock_wake): ... this. %esi contains private argument.
608 Don't compile in for libc.so.
609 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
610 kernel-features.h and lowlevellock.h.
611 (LOAD_FUTEX_WAIT): Define.
612 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
613 (__lll_robust_mutex_lock_wait): Rename to ...
614 (__lll_robust_lock_wait): ... this. %esi argument contains private.
615 Use LOAD_FUTEX_WAIT macro.
616 (__lll_robust_mutex_timedlock_wait): Rename to ...
617 (__lll_robust_timedlock_wait): ... this. %esi argument contains
618 private, use LOAD_FUTEX_WAIT macro.
619 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
621 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
622 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
623 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
624 __lll_lock_wait and __lll_unlock_wake.
625 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
626 Include lowlevellock.h and pthread-errnos.h.
627 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
628 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
629 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
630 pass LLL_SHARED in %esi to both __lll_lock_wait and
632 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
633 Include lowlevellock.h and pthread-errnos.h.
634 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
635 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
636 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
637 pass LLL_SHARED in %esi to both __lll_lock_wait and
639 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
640 Include lowlevellock.h.
641 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
642 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
643 pass LLL_SHARED in %esi to both __lll_lock_wait and
645 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
646 Include lowlevellock.h.
647 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
648 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
649 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
650 and __lll_unlock_wake.
651 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
652 Include lowlevellock.h.
653 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
655 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
656 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
657 and __lll_unlock_wake.
658 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
659 Include lowlevellock.h.
660 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
662 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
663 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
664 and __lll_unlock_wake.
665 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
666 Include lowlevellock.h.
667 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
669 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
670 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
671 and __lll_unlock_wake.
672 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
673 Include lowlevellock.h.
674 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
676 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
677 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
678 and __lll_unlock_wake.
679 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
680 Include lowlevellock.h.
681 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
683 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
684 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
685 and __lll_unlock_wake.
686 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
688 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
690 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
691 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
692 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
694 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
695 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
697 (LOCK): Don't define.
698 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
700 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
701 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
702 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
703 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
704 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
705 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
706 (__lll_lock_wait_private): New function.
707 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
708 it to lll_futex_*wait. Don't compile in for libc.so.
709 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
711 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
712 (struct sparc_pthread_barrier): Remove.
713 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
714 struct sparc_pthread_barrier. Pass
715 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
716 and lll_futex_wait macros.
717 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
719 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
720 Include sparc pthread_barrier_wait.c instead of generic one.
722 2007-07-30 Jakub Jelinek <jakub@redhat.com>
724 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
726 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
727 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
729 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
730 (pthread_rwlock_timedwrlock): Likewise.
731 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
732 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
734 2007-07-31 Jakub Jelinek <jakub@redhat.com>
736 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
738 2007-07-26 Jakub Jelinek <jakub@redhat.com>
740 * tst-locale2.c (useless): Add return statement.
742 2007-07-24 Jakub Jelinek <jakub@redhat.com>
744 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
745 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
746 * pthread_create.c (start_thread): Likewise.
747 * init.c (sighandler_setxid): Likewise.
748 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
749 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
750 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
751 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
752 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
753 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
754 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
755 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
756 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
758 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
760 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
762 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
763 __rtld_notify): Likewise.
764 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
765 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
766 __pthread_once): Likewise.
767 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
768 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
769 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
770 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
771 (lll_futex_wait): Add private argument, define as wrapper around
772 lll_futex_timed_wait.
773 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
774 use __lll_private_flag macro.
775 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
776 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
777 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
778 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
779 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
780 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
781 (lll_futex_wait): Add private argument, define as wrapper around
782 lll_futex_timed_wait.
783 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
784 use __lll_private_flag macro.
785 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
786 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
787 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
789 (lll_futex_timed_wait, lll_futex_wake): Use it.
790 (lll_private_futex_wait, lll_private_futex_timed_wait,
791 lll_private_futex_wake): Removed.
792 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
793 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
794 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
795 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
796 (lll_futex_wait): Add private argument, define as wrapper around
797 lll_futex_timed_wait.
798 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
799 use __lll_private_flag macro.
800 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
801 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
803 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
804 (lll_private_futex_wait, lll_private_futex_timed_wait,
805 lll_private_futex_wake): Removed.
806 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
807 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
808 (lll_private_futex_wait, lll_private_futex_timed_wait,
809 lll_private_futex_wake): Removed.
810 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
811 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
812 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
813 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
814 (lll_futex_wait): Add private argument, define as wrapper around
815 lll_futex_timed_wait.
816 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
817 use __lll_private_flag macro.
818 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
819 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
821 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
823 (lll_futex_timed_wait, lll_futex_wake): Use it.
824 (lll_private_futex_wait, lll_private_futex_timed_wait,
825 lll_private_futex_wake): Removed.
827 2007-07-27 Jakub Jelinek <jakub@redhat.com>
829 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
830 of the structure for sparc32.
832 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
834 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
836 2007-07-23 Ulrich Drepper <drepper@redhat.com>
838 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
839 code used when private futexes are assumed.
840 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
843 2007-07-23 Jakub Jelinek <jakub@redhat.com>
845 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
846 (__lll_private_flag): Define.
847 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
848 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
850 (lll_private_futex_wait, lll_private_futex_timedwait,
851 lll_private_futex_wake): Define as wrapper around non-_private
853 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
854 (__lll_private_flag): Define.
855 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
856 (lll_private_futex_wait, lll_private_futex_timedwait,
857 lll_private_futex_wake): Define as wrapper around non-_private
860 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
862 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
863 parameter to lll_futex_wait call.
864 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
866 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
867 Replace lll_futex_wait with lll_private_futex_wait.
868 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
869 Add LLL_SHARED parameter to lll_futex_wake().
871 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
872 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
873 lll_private_futex_wake.
874 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
875 bit from private parm before syscall.
876 (lll_futex_timed_wait): Likewise.
877 (lll_futex_wake): Likewise.
878 (lll_futex_wake_unlock): Likewise.
879 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
880 (lll_robust_mutex_unlock): Likewise.
881 (lll_mutex_unlock_force): Likewise.
882 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
884 2007-07-23 Ulrich Drepper <drepper@redhat.com>
886 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
887 compilation when unconditionally using private futexes.
888 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
889 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
891 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
892 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
894 2007-07-17 Jakub Jelinek <jakub@redhat.com>
896 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
899 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
901 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
904 2007-05-16 Roland McGrath <roland@redhat.com>
906 * init.c (__nptl_initial_report_events): New variable.
907 (__pthread_initialize_minimal_internal): Initialize pd->report_events
910 2007-06-22 Jakub Jelinek <jakub@redhat.com>
912 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
913 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
915 2007-06-19 Ulrich Drepper <drepper@redhat.com>
917 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
920 2007-06-18 Ulrich Drepper <drepper@redhat.com>
922 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
923 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
924 * pthread_mutex_timedlock.c: Likewise.
925 * pthread_mutex_trylock.c: Likewise.
926 * pthread_mutex_unlock.c: Likewise.
928 2007-06-17 Andreas Schwab <schwab@suse.de>
930 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
933 2007-06-17 Ulrich Drepper <drepper@redhat.com>
935 * allocatestack.c (allocate_stack): Make code compile if
936 __ASSUME_PRIVATE_FUTEX is set.
938 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
940 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
941 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
942 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
943 (__pthread_rwlock_wrlock): Likewise.
944 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
945 (pthread_rwlock_timedrdlock): Likewise.
946 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
947 (pthread_rwlock_timedwrlock): Likewise.
948 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
949 (__pthread_rwlock_unlock): Likewise.
951 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
953 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
954 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
955 Split __flags into __flags, __shared, __pad1 and __pad2.
956 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
957 futexes if they are available.
958 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
959 in libc-lowlevellock.S allow using private futexes.
960 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
961 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
962 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
963 to call lll_futex_timed_wait. Add lll_private_futex_wait,
964 lll_private_futex_timed_wait and lll_private_futex_wake.
965 (lll_robust_mutex_unlock): Fix typo.
966 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
967 field in futex command setup.
968 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
969 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
970 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
971 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
972 if they are available. Remove clear_once_control.
973 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
974 futexes if they are available.
975 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
976 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
977 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
978 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
979 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
980 Wake only when there are waiters.
981 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
982 support. Indicate that there are waiters. Remove unnecessary
983 extra cancellation test.
984 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
985 left-over duplication of __sem_wait_cleanup.
987 2007-06-07 Ulrich Drepper <drepper@redhat.com>
989 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
990 parameter to lll_futex_wait, lll_futex_timed_wait, and
991 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
992 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
993 lll_private_futex_wake.
994 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
995 * allocatestack.c: Adjust use of lll_futex_* macros.
997 * lowlevellock.h: Likewise.
998 * pthread_barrier_wait.c: Likewise.
999 * pthread_cond_broadcast.c: Likewise.
1000 * pthread_cond_destroy.c: Likewise.
1001 * pthread_cond_signal.c: Likewise.
1002 * pthread_cond_timedwait.c: Likewise.
1003 * pthread_cond_wait.c: Likewise.
1004 * pthread_create.c: Likewise.
1005 * pthread_mutex_lock.c: Likewise.
1006 * pthread_mutex_setprioceiling.c: Likewise.
1007 * pthread_mutex_timedlock.c: Likewise.
1008 * pthread_mutex_unlock.c: Likewise.
1009 * pthread_rwlock_timedrdlock.c: Likewise.
1010 * pthread_rwlock_timedwrlock.c: Likewise.
1011 * pthread_rwlock_unlock.c: Likewise.
1012 * sysdeps/alpha/tls.h: Likewise.
1013 * sysdeps/i386/tls.h: Likewise.
1014 * sysdeps/ia64/tls.h: Likewise.
1015 * sysdeps/powerpc/tls.h: Likewise.
1016 * sysdeps/pthread/aio_misc.h: Likewise.
1017 * sysdeps/pthread/gai_misc.h: Likewise.
1018 * sysdeps/s390/tls.h: Likewise.
1019 * sysdeps/sh/tls.h: Likewise.
1020 * sysdeps/sparc/tls.h: Likewise.
1021 * sysdeps/unix/sysv/linux/fork.c: Likewise.
1022 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1023 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1024 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1025 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1026 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1027 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1028 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1029 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1030 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1032 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1033 * sysdeps/x86_64/tls.h: Likewise.
1035 2007-05-29 Ulrich Drepper <drepper@redhat.com>
1037 * pthread_getattr_np.c: No need to install a cancellation handler,
1038 this is no cancellation point.
1039 * pthread_getschedparam.c: Likewise.
1040 * pthread_setschedparam.c: Likewise.
1041 * pthread_setschedprio.c: Likewise.
1042 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1044 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1045 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1046 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1047 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1048 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1049 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1050 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1051 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1052 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1053 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1054 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1055 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1057 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1058 whether there are more than one thread makes no sense here since
1059 we only call the slow path if the locks are taken.
1060 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1062 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1063 COND_NWAITERS_SHIFT.
1064 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1066 * pthread_cond_init.c: Likewise.
1067 * pthread_cond_timedwait.c: Likewise.
1068 * pthread_cond_wait.c: Likewise.
1069 * pthread_condattr_getclock.c: Likewise.
1070 * pthread_condattr_setclock.c: Likewise.
1071 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1072 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1073 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1074 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1075 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1077 2007-05-28 Jakub Jelinek <jakub@redhat.com>
1079 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1082 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1084 (THREAD_GSCOPE_GET_FLAG): Remove.
1085 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1086 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1088 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1089 (THREAD_GSCOPE_GET_FLAG): Remove.
1090 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1091 instead of THREAD_GSCOPE_GET_FLAG.
1092 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
1094 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1095 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1096 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1097 THREAD_GSCOPE_WAIT): Define.
1098 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1099 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1100 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1101 THREAD_GSCOPE_WAIT): Define.
1102 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1103 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1104 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1105 THREAD_GSCOPE_WAIT): Define.
1106 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1107 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1108 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1109 THREAD_GSCOPE_WAIT): Define.
1111 2007-05-24 Richard Henderson <rth@redhat.com>
1113 * descr.h (struct pthread): Add header.gscope_flag.
1114 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1115 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1116 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1117 THREAD_GSCOPE_WAIT): Define.
1119 2007-05-27 Ulrich Drepper <drepper@redhat.com>
1121 * init.c: Make it compile with older kernel headers.
1123 * tst-initializers1.c: Show through exit code which test failed.
1125 * pthread_rwlock_init.c: Also initialize __shared field.
1126 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1127 element in rwlock structure into four byte elements. One of them is
1128 the new __shared element.
1129 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1131 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1132 __shared, adjust names of other padding elements.
1133 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1134 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1135 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1136 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1138 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1139 futex to use private operations if possible.
1140 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1142 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1144 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1145 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1146 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1147 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1149 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1151 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1152 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1154 2007-05-26 Ulrich Drepper <drepper@redhat.com>
1156 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1157 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1158 * pthread_rwlock_timedrdlock.c: Likewise.
1159 * pthread_rwlock_tryrdlock.c: Likewise.
1161 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1164 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1165 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1166 duplication of __sem_wait_cleanup.
1168 * allocatestack.c: Revert last change.
1170 * sysdeps/i386/tls.h: Likewise.
1171 * sysdeps/x86_64/tls.h: Likewise.
1172 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1174 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1176 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1178 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1179 * pthread_barrier_init.c: Set private flag if pshared and private
1180 futexes are supported.
1181 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1182 private field in futex command setup.
1183 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1185 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1187 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1189 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1190 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1191 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1192 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1193 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1195 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1196 * sem_init.c (__new_sem_init): Rewrite to initialize all three
1197 fields in the structure.
1198 (__old_sem_init): New function.
1199 * sem_open.c: Initialize all fields of the structure.
1200 * sem_getvalue.c: Adjust for renamed element.
1201 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1202 (gen-as-const-headers): Add structsem.sym.
1203 * sysdeps/unix/sysv/linux/structsem.sym: New file.
1204 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1205 struct new_sem. Add struct old_sem.
1206 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1207 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1208 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1209 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1210 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1211 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1212 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1213 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1214 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1215 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1216 * tst-sem10.c: New file.
1217 * tst-sem11.c: New file.
1218 * tst-sem12.c: New file.
1219 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1222 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1223 Jakub Jelinek <jakub@redhat.com>
1225 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1226 Move __pthread_enable_asynccancel right before futex syscall.
1227 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1230 2007-05-24 Jakub Jelinek <jakub@redhat.com>
1232 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1233 THREAD_COPY_PRIVATE_FUTEX): Define.
1234 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1235 THREAD_COPY_PRIVATE_FUTEX): Define.
1236 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1237 * init.c (__pthread_initialize_minimal_internal): Use
1238 THREAD_SET_PRIVATE_FUTEX.
1240 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1241 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1242 THREAD_GSCOPE_FLAG_WAIT): Define.
1243 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1244 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1245 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1247 (THREAD_GSCOPE_GET_FLAG): Define.
1248 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1249 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1250 instead of ->header.gscope_flag directly.
1252 2007-05-23 Ulrich Drepper <drepper@redhat.com>
1254 * init.c (__pthread_initialize_minimal_internal): Check whether
1255 private futexes are available.
1256 * allocatestack.c (allocate_stack): Copy private_futex field from
1257 current thread into the new stack.
1258 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1259 futexes if they are available.
1260 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1261 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1262 in libc-lowlevellock.S allow using private futexes.
1263 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1264 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1266 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1267 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1268 if they are available.
1269 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1270 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1271 * sysdeps/i386/tcb-offsets.sym: Likewise.
1272 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1273 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1275 2007-05-21 Ulrich Drepper <drepper@redhat.com>
1277 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1278 Remove ptr_wait_lookup_done again.
1279 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1280 (__pthread_initialize_minimal_internal): Initialize
1281 _dl_wait_lookup_done pointer in _rtld_global directly.
1282 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1283 Remove code to code _dl_wait_lookup_done.
1284 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1287 2007-05-21 Jakub Jelinek <jakub@redhat.com>
1289 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1290 pthread_mutex_init failed with ENOTSUP.
1292 2007-05-19 Ulrich Drepper <drepper@redhat.com>
1294 * allocatestack.c (__wait_lookup_done): New function.
1295 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1296 Add ptr_wait_lookup_done.
1297 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1298 * pthreadP.h: Declare __wait_lookup_done.
1299 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1300 Define macros to implement reference handling of global scope.
1301 * sysdeps/x86_64/tls.h: Likewise.
1302 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1303 Initialize GL(dl_wait_lookup_done).
1305 2007-05-17 Ulrich Drepper <drepper@redhat.com>
1308 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1310 * pthread_mutex_timedlock.c: Likewise.
1311 * pthread_mutex_trylock.c: Likewise.
1312 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1314 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1315 * tst-robust9.c: New file.
1316 * tst-robustpi9.c: New file.
1318 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1319 unnecessary extra cancellation test.
1321 2007-05-14 Ulrich Drepper <drepper@redhat.com>
1323 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1324 extra cancellation test.
1325 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1327 2007-05-10 Ulrich Drepper <drepper@redhat.com>
1329 * descr.h (struct pthread): Rearrange members to fill hole in
1332 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1333 (__pthread_setaffinity_new): If syscall was successful and
1334 RESET_VGETCPU_CACHE is defined, use it before returning.
1335 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1337 2007-05-10 Jakub Jelinek <jakub@redhat.com>
1340 * tst-align2.c: Include stackinfo.h.
1341 * tst-getpid1.c: Likewise.
1343 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
1346 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1347 * tst-getpid1.c (do_test): Likewise.
1350 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1351 (allocate_stack): Likewise.
1353 2007-05-07 Ulrich Drepper <drepper@redhat.com>
1355 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1356 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1357 (__lll_robust_timedlock_wait): Likewise.
1358 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1360 2007-05-06 Mike Frysinger <vapier@gentoo.org>
1363 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1364 * tst-cancel4.c (tf_fdatasync): New test.
1366 2007-04-27 Ulrich Drepper <drepper@redhat.com>
1369 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1370 check mutexes like normal mutexes.
1373 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1374 Initialize the whole sigevent structure to appease valgrind.
1376 2007-04-25 Ulrich Drepper <drepper@redhat.com>
1378 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1379 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1381 2007-04-06 Ulrich Drepper <drepper@redhat.com>
1383 * tst-locale1.c: Avoid warnings.
1384 * tst-locale2.c: Likewise.
1386 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
1388 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1389 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1391 2007-03-16 Jakub Jelinek <jakub@redhat.com>
1393 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1394 __extern_always_inline where appropriate.
1395 * sysdeps/pthread/pthread.h: Likewise.
1397 2007-03-13 Richard Henderson <rth@redhat.com>
1399 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1400 separate cfi regions for the two subsections.
1402 2007-02-25 Ulrich Drepper <drepper@redhat.com>
1404 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1405 new thread, don't just decrement it.
1406 Patch by Suzuki K P <suzuki@in.ibm.com>.
1408 2007-02-21 Ulrich Drepper <drepper@redhat.com>
1410 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1411 PTHFCT_CALL definition.
1413 2007-02-18 Ulrich Drepper <drepper@redhat.com>
1415 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1416 available, don't use it.
1418 2007-02-09 Jakub Jelinek <jakub@redhat.com>
1420 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1421 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1422 call into the kernel to delay.
1424 2007-01-18 Ulrich Drepper <drepper@redhat.com>
1426 * tst-initializers1.c: We want to test the initializers as seen
1427 outside of libc, so undefined _LIBC.
1429 * pthread_join.c (cleanup): Avoid warning.
1431 2007-01-17 Ulrich Drepper <drepper@redhat.com>
1433 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1434 (__lll_timedwait_tid): Add unwind info.
1436 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1437 function table, mangle the pointers.
1438 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1439 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1440 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1441 demangle pointers before use.
1442 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1444 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1445 * sysdeps/pthread/setxid.h: Likewise.
1447 2007-01-12 Ulrich Drepper <drepper@redhat.com>
1449 * tst-rwlock7.c: Show some more information in case of correct
1452 2007-01-11 Ulrich Drepper <drepper@redhat.com>
1454 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1455 (lll_futex_timed_wait): Undo part of last change, don't negate
1458 2007-01-10 Ulrich Drepper <drepper@redhat.com>
1460 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
1461 FUTEX_CMP_REQUEUE and lll_futex_requeue.
1463 2006-12-28 David S. Miller <davem@davemloft.net>
1465 * shlib-versions: Fix sparc64 linux target specification.
1467 2007-01-10 Jakub Jelinek <jakub@redhat.com>
1469 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1470 Adjust include path for pthread_barrier_wait.c move.
1472 2006-12-21 Jakub Jelinek <jakub@redhat.com>
1474 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1475 tid isn't reread from pd->tid in between ESRCH test and the syscall.
1477 2006-12-06 Jakub Jelinek <jakub@redhat.com>
1479 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1480 6 argument cancellable syscalls.
1481 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1482 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1483 6 argument cancellable syscalls.
1484 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1486 2006-12-09 Ulrich Drepper <drepper@redhat.com>
1488 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1489 (__rtld_mrlock_initialize): Add missing closing parenthesis.
1491 2006-10-30 Jakub Jelinek <jakub@redhat.com>
1493 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1494 __sync_lock_release instead of __sync_lock_release_si.
1496 2006-10-29 Jakub Jelinek <jakub@redhat.com>
1498 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1500 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1501 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1502 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1503 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1504 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1505 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1506 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1507 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1508 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1509 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1510 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1512 2006-10-27 Ulrich Drepper <drepper@redhat.com>
1514 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1515 * pthread_barrier_wait.c: ...here.
1516 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1517 * pthread_cond_broadcast.c: ...here.
1518 * sysdeps/pthread/pthread_cond_signal.c: Move to...
1519 * pthread_cond_signal.c: ...here.
1520 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1521 * pthread_cond_timedwait.c: ...here.
1522 * sysdeps/pthread/pthread_cond_wait.c: Move to...
1523 * pthread_cond_wait.c: ...here.
1524 * sysdeps/pthread/pthread_once.c: Move to...
1525 * pthread_once.c: ...here.
1526 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1527 * pthread_rwlock_rdlock.c: ...here.
1528 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1529 * pthread_rwlock_timedrdlock.c: ...here.
1530 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1531 * pthread_rwlock_timedwrlock.c: ...here.
1532 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1533 * pthread_rwlock_unlock.c: ...here.
1534 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1535 * pthread_rwlock_wrlock.c: ...here.
1536 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1537 * pthread_spin_destroy.c: ...here.
1538 * sysdeps/pthread/pthread_spin_init.c: Move to...
1539 * pthread_spin_init.c: ...here.
1540 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1541 * pthread_spin_unlock.c: ...here.
1542 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1543 * pthread_getcpuclockid.c: ...here.
1545 * init.c: USE_TLS support is now always enabled.
1546 * tst-tls5.h: Likewise.
1547 * sysdeps/alpha/tls.h: Likewise.
1548 * sysdeps/i386/tls.h: Likewise.
1549 * sysdeps/ia64/tls.h: Likewise.
1550 * sysdeps/powerpc/tls.h: Likewise.
1551 * sysdeps/s390/tls.h: Likewise.
1552 * sysdeps/sh/tls.h: Likewise.
1553 * sysdeps/sparc/tls.h: Likewise.
1554 * sysdeps/x86_64/tls.h: Likewise.
1556 2006-10-27 Jakub Jelinek <jakub@redhat.com>
1558 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1559 __rtld_mrlock_change): Update oldval if atomic compare and exchange
1562 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1563 Define to THREAD_SELF->header.multiple_threads.
1564 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1566 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1568 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1569 (SINGLE_THREAD_P): Likewise.
1570 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1571 (SINGLE_THREAD_P): Likewise.
1572 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1573 (SINGLE_THREAD_P): Likewise.
1574 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1575 (SINGLE_THREAD_P): Likewise.
1576 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1578 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1579 (SINGLE_THREAD_P): Likewise.
1580 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1581 (SINGLE_THREAD_P): Likewise.
1582 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1585 2006-10-26 Jakub Jelinek <jakub@redhat.com>
1587 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1588 by default rather than 2_3_3.
1590 2006-10-17 Jakub Jelinek <jakub@redhat.com>
1592 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1593 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1594 atomic_* instead of catomic_* macros.
1596 2006-10-12 Ulrich Drepper <drepper@redhat.com>
1599 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1600 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1601 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1602 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1603 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1604 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1605 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1606 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1607 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1608 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1609 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1610 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1611 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1613 2006-10-11 Ulrich Drepper <drepper@redhat.com>
1615 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1616 cancelable syscalls with six parameters.
1618 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1619 operations instead of atomic_*.
1621 2006-10-09 Ulrich Drepper <drepper@redhat.com>
1623 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
1625 2006-10-07 Ulrich Drepper <drepper@redhat.com>
1627 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1628 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1629 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1631 * pthread_attr_setstack.c: Allow overwriting the version number of the
1633 * pthread_attr_setstacksize.c: Likewise.
1634 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1636 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1637 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
1639 2006-09-24 Ulrich Drepper <drepper@redhat.com>
1642 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
1643 Patch by Petr Baudis.
1645 2006-09-18 Jakub Jelinek <jakub@redhat.com>
1647 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
1649 * tst-cancel2.c (tf): Loop as long as something was written.
1651 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1653 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
1654 mutexes wake all mutexes.
1655 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
1656 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1657 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1659 2006-09-12 Ulrich Drepper <drepper@redhat.com>
1661 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
1662 to guarantee the thread is always canceled.
1664 2006-09-08 Jakub Jelinek <jakub@redhat.com>
1666 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
1668 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
1669 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
1670 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1671 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1672 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1674 2006-09-08 Ulrich Drepper <drepper@redhat.com>
1677 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
1678 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1679 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1680 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1681 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1682 * Makefile (tests): Add tst-cond22.
1683 * tst-cond22.c: New file.
1685 2006-09-05 Ulrich Drepper <drepper@redhat.com>
1688 * descr.h (struct pthread): Add parent_cancelhandling.
1689 * sysdeps/pthread/createthread.c (create_thread): Pass parent
1690 cancelhandling value to child.
1691 * pthread_create.c (start_thread): If parent thread was canceled
1692 reset the SIGCANCEL mask.
1693 * Makefile (tests): Add tst-cancel25.
1694 * tst-cancel25.c: New file.
1696 2006-09-05 Jakub Jelinek <jakub@redhat.com>
1697 Ulrich Drepper <drepper@redhat.com>
1699 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
1700 counterp if it is already zero.
1701 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
1703 2006-03-04 Jakub Jelinek <jakub@redhat.com>
1704 Roland McGrath <roland@redhat.com>
1706 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
1707 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1708 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
1709 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1710 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1711 lll_robust_mutex_timedlock, lll_mutex_unlock,
1712 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1713 Add _L_*_ symbols around the subsection.
1714 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
1715 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
1717 2006-03-03 Jakub Jelinek <jakub@redhat.com>
1718 Roland McGrath <roland@redhat.com>
1720 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1721 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1722 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
1723 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1724 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1725 lll_robust_mutex_timedlock, lll_mutex_unlock,
1726 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1727 Add _L_*_ symbols around the subsection.
1728 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
1729 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1731 2006-08-31 Ulrich Drepper <drepper@redhat.com>
1733 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
1734 change because it can disturb too much existing code. If real hard
1735 reader preference is needed we'll introduce another type.
1736 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1737 (pthread_rwlock_timedwrlock): Likewise.
1738 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1741 2006-08-30 Ulrich Drepper <drepper@redhat.com>
1743 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
1745 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1746 (pthread_rwlock_timedwrlock): Likewise.
1747 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1750 2006-08-25 Jakub Jelinek <jakub@redhat.com>
1752 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
1753 Only define ifdef SHARED.
1755 2006-08-23 Ulrich Drepper <drepper@redhat.com>
1757 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
1758 (free_stacks): ...here.
1759 (__free_stack_cache): New function.
1760 * pthreadP.h: Declare __free_stack_cache.
1761 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1763 * init.c (pthread_functions): Initialize ptr_freeres.
1764 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
1765 New freeres function.
1767 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
1770 * Makefile (extra-objs): Add modules to extra-test-objs instead.
1772 2006-08-20 Ulrich Drepper <drepper@redhat.com>
1774 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1775 _XOPEN_REALTIME_THREADS.
1777 2006-08-15 Jakub Jelinek <jakub@redhat.com>
1779 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
1780 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
1781 HAVE_CLOCK_GETTIME_VSYSCALL.
1782 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
1784 2006-08-14 Jakub Jelinek <jakub@redhat.com>
1786 * sysdeps/unix/sysv/linux/bits/posix_opt.h
1787 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
1788 * descr.h (struct priority_protection_data): New type.
1789 (struct pthread): Add tpp field.
1790 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
1791 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
1792 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
1793 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
1795 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
1796 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
1797 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
1798 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
1800 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
1802 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1803 * pthread_mutexattr_getprioceiling.c
1804 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
1805 in the SCHED_FIFO priority range.
1806 * pthread_mutexattr_setprioceiling.c
1807 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
1808 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
1809 if mutex is not TPP. Ceiling is now in __data.__lock.
1810 * pthread_mutex_setprioceiling.c: Include stdbool.h.
1811 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
1812 is now in __data.__lock. Add locking.
1813 * pthread_create.c (__free_tcb): Free pd->tpp structure.
1814 * Makefile (libpthread-routines): Add tpp.
1815 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
1816 * tst-tpp.h: New file.
1817 * tst-mutexpp1.c: New file.
1818 * tst-mutexpp6.c: New file.
1819 * tst-mutexpp10.c: New file.
1820 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
1821 * tst-mutex6.c (TEST_FUNCTION): Likewise.
1823 2006-08-12 Ulrich Drepper <drepper@redhat.com>
1826 * pthread_join.c (pthread_join): Account for self being canceled
1827 when checking for deadlocks.
1828 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
1829 (tf1): Don't print anything after pthread_join returns, this would be
1830 another cancellation point.
1832 * tst-join6.c: New file.
1833 * Makefile (tests): Add tst-join6.
1835 2006-08-03 Ulrich Drepper <drepper@redhat.com>
1838 * pthread_setspecific.c (__pthread_setspecific): Check
1839 out-of-range index before checking for unused key.
1841 * sysdeps/pthread/gai_misc.h: New file.
1843 2006-08-01 Ulrich Drepper <drepper@redhat.com>
1845 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
1846 file. Don't use sysctl.
1847 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
1848 overwrite the file if this is likely not true.
1850 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
1852 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
1853 * Makefile (tests): Add tst-getpid3.
1854 * tst-getpid3.c: New file.
1856 2006-07-30 Roland McGrath <roland@redhat.com>
1858 * Makefile (libpthread-routines): Add ptw-sigsuspend.
1860 * sysdeps/unix/sysv/linux/i386/not-cancel.h
1861 (pause_not_cancel): New macro.
1862 (nanosleep_not_cancel): New macro.
1863 (sigsuspend_not_cancel): New macro.
1864 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1865 nanosleep_not_cancel macro from <not-cancel.h>.
1866 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
1867 macro from <not-cancel.h>.
1869 2006-07-28 Ulrich Drepper <drepper@redhat.com>
1870 Jakub Jelinek <jakub@redhat.com>
1872 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
1873 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
1874 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
1875 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
1876 * pthread_mutex_init.c: Add support for priority inheritance mutex.
1877 * pthread_mutex_lock.c: Likewise.
1878 * pthread_mutex_timedlock.c: Likewise.
1879 * pthread_mutex_trylock.c: Likewise.
1880 * pthread_mutex_unlock.c: Likewise.
1881 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
1883 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
1884 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
1885 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
1886 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
1887 pthread-pi-defines.sym.
1888 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
1889 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
1890 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1891 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1892 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1893 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1894 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1895 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1896 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1897 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1898 _POSIX_THREAD_PRIO_INHERIT to 200112L.
1899 * tst-mutex1.c: Adjust to allow use in PI mutex test.
1900 * tst-mutex2.c: Likewise.
1901 * tst-mutex3.c: Likewise.
1902 * tst-mutex4.c: Likewise.
1903 * tst-mutex5.c: Likewise.
1904 * tst-mutex6.c: Likewise.
1905 * tst-mutex7.c: Likewise.
1906 * tst-mutex7a.c: Likewise.
1907 * tst-mutex8.c: Likewise.
1908 * tst-mutex9.c: Likewise.
1909 * tst-robust1.c: Likewise.
1910 * tst-robust7.c: Likewise.
1911 * tst-robust8.c: Likewise.
1912 * tst-mutexpi1.c: New file.
1913 * tst-mutexpi2.c: New file.
1914 * tst-mutexpi3.c: New file.
1915 * tst-mutexpi4.c: New file.
1916 * tst-mutexpi5.c: New file.
1917 * tst-mutexpi6.c: New file.
1918 * tst-mutexpi7.c: New file.
1919 * tst-mutexpi7a.c: New file.
1920 * tst-mutexpi8.c: New file.
1921 * tst-mutexpi9.c: New file.
1922 * tst-robust1.c: New file.
1923 * tst-robust2.c: New file.
1924 * tst-robust3.c: New file.
1925 * tst-robust4.c: New file.
1926 * tst-robust5.c: New file.
1927 * tst-robust6.c: New file.
1928 * tst-robust7.c: New file.
1929 * tst-robust8.c: New file.
1930 * Makefile (tests): Add the new tests.
1932 * pthread_create.c (start_thread): Add some casts to avoid warnings.
1933 * pthread_mutex_destroy.c: Remove unneeded label.
1935 2006-07-01 Ulrich Drepper <drepper@redhat.com>
1937 * pthread_mutex_init.c (__pthread_mutex_init): Move some
1938 computations to compile time.
1940 2006-06-04 Ulrich Drepper <drepper@redhat.com>
1942 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
1944 2006-05-15 Ulrich Drepper <drepper@redhat.com>
1946 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
1948 2006-05-11 Ulrich Drepper <drepper@redhat.com>
1950 * pthread_key_create.c (__pthread_key_create): Do away with
1951 __pthread_keys_lock.
1953 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1954 (__kernel_cpumask_size): Mark as hidden.
1955 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
1957 * sem_open.c (__sem_mappings_lock): Mark as hidden.
1958 * semaphoreP.h (__sem_mappings_lock): Likewise.
1960 2006-05-10 Ulrich Drepper <drepper@redhat.com>
1962 * pthread_atfork.c: Mark __dso_handle as hidden.
1964 2006-05-09 Ulrich Drepper <drepper@redhat.com>
1967 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
1968 the reload problem. Change the one path in pthread_cancel_init
1969 which causes the problem. Force gcc to reload. Simplify callers.
1970 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
1971 (_Unwind_GetBSP): Undo last patch.
1973 2006-05-07 Ulrich Drepper <drepper@redhat.com>
1975 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
1976 function pointer is reloaded after pthread_cancel_init calls.
1979 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
1980 pointers are reloaded after pthread_cancel_init calls.
1982 2006-05-01 Ulrich Drepper <drepper@redhat.com>
1984 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
1987 2006-04-27 Ulrich Drepper <drepper@redhat.com>
1989 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1990 Allocate new object which is passed to timer_sigev_thread so that
1991 the timer can be deleted before the new thread is scheduled.
1993 2006-04-26 Roland McGrath <roland@redhat.com>
1995 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
1997 2006-04-08 Ulrich Drepper <drepper@redhat.com>
1999 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2000 suffix for conditional jumps.
2001 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2002 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2003 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2004 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2005 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2006 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2008 * init.c (sigcancel_handler): Compare with correct PID even if the
2009 thread is in the middle of a fork call.
2010 (sighandler_setxid): Likewise.
2011 Reported by Suzuki K P <suzuki@in.ibm.com> .
2013 2006-04-07 Jakub Jelinek <jakub@redhat.com>
2015 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2017 2006-04-06 Ulrich Drepper <drepper@redhat.com>
2019 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2020 fails [Coverity CID 105].
2022 2006-04-05 Ulrich Drepper <drepper@redhat.com>
2024 * sysdeps/pthread/pthread.h: Add nonnull attributes.
2026 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
2029 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2030 Define __lll_rel_instr using lwsync.
2032 2006-03-27 Ulrich Drepper <drepper@redhat.com>
2034 * allocatestack.c (allocate_stack): Always initialize robust_head.
2035 * descr.h: Define struct robust_list_head.
2036 (struct pthread): Use robust_list_head in robust mutex list definition.
2037 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2038 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2039 (__pthread_initialize_minimal_internal): Register robust_list with
2041 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2042 Declare __set_robust_list_avail.
2043 * pthread_create.c (start_thread): Register robust_list of new thread.
2044 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2046 * pthread_mutex_destroy.c: For robust mutexes don't look at the
2047 number of users, it's unreliable.
2048 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2049 set_robust_list syscall is available.
2050 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2051 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2052 Set robust_head.list_op_pending before trying to lock a robust mutex.
2053 * pthread_mutex_timedlock.c: Likewise.
2054 * pthread_mutex_trylock.c: Likewise.
2055 * pthread_mutex_unlock.c: Likewise for unlocking.
2056 * Makefile (tests): Add tst-robust8.
2057 * tst-robust8.c: New file.
2059 2006-03-08 Andreas Schwab <schwab@suse.de>
2061 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2062 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2064 2006-03-05 Roland McGrath <roland@redhat.com>
2066 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2067 and $config_os doesn't match *linux*.
2069 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
2071 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2072 Use __syscall_error.
2073 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2074 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2075 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2076 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2077 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2078 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2080 2006-03-02 Ulrich Drepper <drepper@redhat.com>
2082 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2084 2006-03-01 Ulrich Drepper <drepper@redhat.com>
2086 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2087 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2089 (__lll_robust_timedlock_wait): Likewise.
2090 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2091 (__lll_robust_lock_wait): Likewise.
2092 (__lll_robust_timedlock_wait): Likewise.
2093 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2094 (__lll_robust_lock_wait): Likewise.
2095 (__lll_robust_timedlock_wait): Likewise.
2097 2006-03-01 Jakub Jelinek <jakub@redhat.com>
2099 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2100 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2101 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2102 lll_robust_mutex_unlock): Define.
2103 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2105 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
2107 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2108 instead of <clone.S>.
2110 2006-02-27 Jakub Jelinek <jakub@redhat.com>
2112 * Makefile (libpthread-routines): Add
2113 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2114 and pthread_mutex_[sg]etprioceiling.
2115 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2116 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2117 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2118 pthread_mutex_setprioceiling.
2119 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2120 PTHREAD_PRIO_PROTECT): New enum values.
2121 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2122 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2123 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2125 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2126 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2127 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2129 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2130 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2131 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2132 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2133 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2134 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2135 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2137 * pthread_mutex_getprioceiling.c: New file.
2138 * pthread_mutex_setprioceiling.c: New file.
2139 * pthread_mutexattr_getprioceiling.c: New file.
2140 * pthread_mutexattr_setprioceiling.c: New file.
2141 * pthread_mutexattr_getprotocol.c: New file.
2142 * pthread_mutexattr_setprotocol.c: New file.
2144 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2146 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2148 2006-02-27 Roland McGrath <roland@redhat.com>
2150 * sysdeps/pthread/Subdirs: List nptl here too.
2151 * configure (libc_add_on_canonical): New variable.
2153 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2155 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2156 self to get main source tree's file.
2157 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2158 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2159 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2160 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2161 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2162 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2163 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2164 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2165 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2166 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2167 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2168 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2169 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2171 * Makefile: Use $(sysdirs) in vpath directive.
2173 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2174 (CPPFLAGS-timer_routines.c): Likewise.
2176 * Makeconfig (includes): Variable removed.
2178 2006-02-26 Roland McGrath <roland@redhat.com>
2180 * sysdeps/generic/pt-raise.c: Moved to ...
2181 * pt-raise.c: ... here.
2182 * sysdeps/generic/lowlevellock.h: Moved to ...
2183 * lowlevellock.h: ... here.
2185 2006-02-23 Roland McGrath <roland@redhat.com>
2187 * descr.h (struct pthread): Add final member `end_padding'.
2188 (PTHREAD_STRUCT_END_PADDING): Use it.
2190 2006-02-20 Roland McGrath <roland@redhat.com>
2192 * sysdeps/mips: Directory removed, saved in ports repository.
2193 * sysdeps/unix/sysv/linux/mips: Likewise.
2195 2006-02-18 Ulrich Drepper <drepper@redhat.com>
2197 * tst-robust1.c: Add second mutex to check that the mutex list is
2200 2006-02-17 Jakub Jelinek <jakub@redhat.com>
2202 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2203 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2204 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2205 lll_robust_mutex_unlock): New macros.
2206 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2207 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2208 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2209 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2210 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2212 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2214 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2216 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2218 2006-02-17 Ulrich Drepper <drepper@redhat.com>
2220 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2221 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2222 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2223 (lll_robust_mutex_unlock): Likewise.
2225 2006-02-13 Jakub Jelinek <jakub@redhat.com>
2227 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2228 Set robust_list.__next rather than robust_list.
2229 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2230 (__pthread_list_t): New typedef.
2231 (pthread_mutex_t): Replace __next and __prev fields with __list.
2232 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2233 (__pthread_list_t): New typedef.
2234 (pthread_mutex_t): Replace __next and __prev fields with __list.
2235 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2236 (__pthread_list_t, __pthread_slist_t): New typedefs.
2237 (pthread_mutex_t): Replace __next and __prev fields with __list.
2238 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2239 (__pthread_list_t, __pthread_slist_t): New typedefs.
2240 (pthread_mutex_t): Replace __next and __prev fields with __list.
2241 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2242 (__pthread_list_t, __pthread_slist_t): New typedefs.
2243 (pthread_mutex_t): Replace __next and __prev fields with __list.
2244 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2245 (__pthread_slist_t): New typedef.
2246 (pthread_mutex_t): Replace __next field with __list.
2248 2006-02-15 Ulrich Drepper <drepper@redhat.com>
2250 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2251 PTHREAD_MUTEX_OWNERDEAD.
2252 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2253 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2254 * Makefile (libpthread-routines): Add lowlevelrobustlock.
2255 * pthread_create.c (start_thread): Very much simplify robust_list loop.
2256 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2257 to PTHREAD_MUTEX_INCONSISTENT.
2258 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2259 * pthread_mutex_lock.c: Reimplement robust mutex handling.
2260 * pthread_mutex_trylock.c: Likewise.
2261 * pthread_mutex_timedlock.c: Likewise.
2262 * pthread_mutex_unlock.c: Likewise.
2263 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2264 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2265 lowlevelrobustlock.sym.
2266 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2267 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2269 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2270 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2271 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2272 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2273 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2275 2006-02-12 Ulrich Drepper <drepper@redhat.com>
2277 * allocatestack.c (allocate_stack): Initialize robust_list.
2278 * init.c (__pthread_initialize_minimal_internal): Likewise.
2279 * descr.h (struct xid_command): Pretty printing.
2280 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2281 robust_list. Adjust macros.
2282 * pthread_create.c (start_thread): Adjust robust_list handling.
2283 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2284 but the owner for all robust mutex types.
2285 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2286 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
2287 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2288 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2290 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2291 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2293 2006-02-08 Jakub Jelinek <jakub@redhat.com>
2295 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2296 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2298 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2300 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2302 (lll_futex_timed_wait): Define.
2304 2006-01-19 Ulrich Drepper <drepper@redhat.com>
2306 * tst-cancel4.c: Test ppoll.
2308 2006-01-18 Andreas Jaeger <aj@suse.de>
2311 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2312 (pthread_mutex_t): Follow changes for other archs. Based on patch
2313 by Jim Gifford <patches@jg555.com>.
2315 2006-01-13 Richard Henderson <rth@redhat.com>
2317 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2319 2006-01-10 Roland McGrath <roland@redhat.com>
2321 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2322 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2323 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2324 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2325 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2326 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2327 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2328 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2329 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2330 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2332 2006-01-09 Roland McGrath <roland@redhat.com>
2334 * tst-initializers1-c89.c: New file.
2335 * tst-initializers1-c99.c: New file.
2336 * tst-initializers1-gnu89.c: New file.
2337 * tst-initializers1-gnu99.c: New file.
2338 * Makefile (tests): Add them.
2339 (CFLAGS-tst-initializers1-c89.c): New variable.
2340 (CFLAGS-tst-initializers1-c99.c): New variable.
2341 (CFLAGS-tst-initializers1-gnu89.c): New variable.
2342 (CFLAGS-tst-initializers1-gnu99.c): New variable.
2344 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2345 Use __extension__ on anonymous union definition.
2346 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2347 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2348 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2349 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2350 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2352 2006-01-08 Jakub Jelinek <jakub@redhat.com>
2354 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2355 Don't give the union a name because it changes the mangled name.
2356 Instead name the struct for __data.
2357 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2359 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2362 2006-01-09 Jakub Jelinek <jakub@redhat.com>
2364 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2365 stack bias to mc_ftp field.
2367 2006-01-07 Ulrich Drepper <drepper@redhat.com>
2369 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2370 being too clever and reloading the futex value where it shouldn't.
2372 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2374 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2377 2006-01-06 Jakub Jelinek <jakub@redhat.com>
2379 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2382 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2384 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2385 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2386 rename in tcbhead_t.
2388 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2389 Don't give the union a name because it changes the mangled name.
2390 Instead name the struct for __data.
2391 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2392 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2393 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2394 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2395 * pthread_create.c (start_thread): Adjust robust mutex free loop.
2396 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2398 2006-01-05 Ulrich Drepper <drepper@redhat.com>
2400 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2402 (lll_futex_timed_wait): Define.
2403 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2404 * sysdeps/pthread/aio_misc.h: New file.
2406 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
2408 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2410 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
2412 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2413 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2414 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2416 2006-01-04 Ulrich Drepper <drepper@redhat.com>
2418 * tst-cancel24.cc: Use C headers instead of C++ headers.
2420 2006-01-03 Jakub Jelinek <jakub@redhat.com>
2422 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2423 sparc-linux configured glibc.
2424 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2425 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2426 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2427 atomic_compare_and_exchange_val_24_acq instead of
2428 atomic_compare_and_exchange_val_acq.
2429 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2430 instead of atomic_exchange_rel.
2431 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2432 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2434 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2436 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2437 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2438 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2439 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2440 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2441 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2443 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2445 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2446 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2447 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2449 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2451 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2453 2006-01-03 Ulrich Drepper <drepper@redhat.com>
2455 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2458 2006-01-02 Jakub Jelinek <jakub@redhat.com>
2460 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2461 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2462 THREAD_COPY_POINTER_GUARD): Define.
2463 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2464 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2466 2006-01-01 Ulrich Drepper <drepper@redhat.com>
2468 * version.c: Update copyright year.
2470 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2472 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2473 .eh_frame section, use cfi_* directives.
2474 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2476 2005-12-30 Ulrich Drepper <drepper@redhat.com>
2478 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2481 2005-12-29 Ulrich Drepper <drepper@redhat.com>
2483 * sysdeps/pthread/sigaction.c: Removed.
2484 * sigaction.c: New file.
2485 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2487 2005-12-28 Ulrich Drepper <drepper@redhat.com>
2489 * Makefile (tests): Add tst-signal7.
2490 * tst-signal7.c: New file.
2492 2005-12-27 Roland McGrath <roland@redhat.com>
2494 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2495 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2496 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2497 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2498 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2499 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2500 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2501 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2502 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2503 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2504 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2506 2005-12-27 Jakub Jelinek <jakub@redhat.com>
2508 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2509 and __prev field to pthread_mutex_t.
2510 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2511 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2512 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2513 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2514 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2517 2005-12-26 Ulrich Drepper <drepper@redhat.com>
2519 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2520 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2521 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2522 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2523 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2524 and PTHREAD_MUTEXATTR_FLAG_BITS.
2525 * descr.h (struct pthread): Add robust_list field and define
2526 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2527 * pthread_mutexattr_getrobust.c: New file.
2528 * pthread_mutexattr_setrobust.c: New file.
2529 * pthread_mutex_consistent.c: New file.
2530 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2531 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2532 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2533 Adjust pthread_mutex_t initializers.
2534 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2535 field to pthread_mutex_t.
2536 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2537 and __prev field to pthread_mutex_t.
2538 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2539 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2540 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2541 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2542 * pthread_mutexattr_gettype.c: Likewise.
2543 * pthread_mutexattr_setpshared.c: Likewise.
2544 * pthread_mutexattr_settype.c: Likewise.
2545 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2546 Initialize mutex kind according to robust flag.
2547 * pthread_mutex_lock.c: Implement local robust mutex.
2548 * pthread_mutex_timedlock.c: Likewise.
2549 * pthread_mutex_trylock.c: Likewise.
2550 * pthread_mutex_unlock.c: Likewise.
2551 * pthread_create.c (start_thread): Mark robust mutexes which remained
2553 * tst-robust1.c: New file.
2554 * tst-robust2.c: New file.
2555 * tst-robust3.c: New file.
2556 * tst-robust4.c: New file.
2557 * tst-robust5.c: New file.
2558 * tst-robust6.c: New file.
2559 * tst-robust7.c: New file.
2560 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2561 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2562 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2563 tst-robust5, tst-robust6, and tst-robust7.
2565 * tst-typesizes.c: New file.
2566 * Makefile (tests): Add tst-typesizes.
2568 * tst-once3.c: More debug output.
2570 2005-12-24 Ulrich Drepper <drepper@redhat.com>
2572 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2573 missing after last change.
2575 * version.c: Update copyright year.
2577 2005-12-23 Ulrich Drepper <drepper@redhat.com>
2579 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2580 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2581 * pthread_mutex_trylock.c: Likewise.
2582 * pthread_mutex_timedlock.c: Likewise.
2583 * pthread_mutex_unlock.c: Likewise.
2585 2005-12-22 Roland McGrath <roland@redhat.com>
2587 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2588 so that #include_next's search location is not reset to the -I..
2589 directory where <nptl/...> can be found.
2591 2005-12-22 Ulrich Drepper <drepper@redhat.com>
2594 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2595 Fix unwind info. Remove useless branch prediction prefix.
2596 * tst-cancel24.cc: New file.
2597 * Makefile: Add rules to build and run tst-cancel24.
2599 2005-12-21 Roland McGrath <roland@redhat.com>
2601 * libc-cancellation.c: Use <> rather than "" #includes.
2602 * pt-cleanup.c: Likewise.
2603 * pthread_create.c: Likewise.
2604 * pthread_join.c: Likewise.
2605 * pthread_timedjoin.c: Likewise.
2606 * pthread_tryjoin.c: Likewise.
2607 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2608 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2609 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2610 * unwind.c: Likewise.
2612 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2614 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2615 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2616 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2617 THREAD_COPY_POINTER_GUARD): Define.
2619 2005-12-19 Jakub Jelinek <jakub@redhat.com>
2621 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2623 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2624 THREAD_COPY_POINTER_GUARD): Define.
2625 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2626 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2627 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2628 THREAD_COPY_POINTER_GUARD): Define.
2629 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2630 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2631 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2632 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2633 Use PTR_DEMANGLE for B0 if defined.
2635 2005-12-17 Ulrich Drepper <drepper@redhat.com>
2637 * pthread_create.c (__pthread_create_2_1): Use
2638 THREAD_COPY_POINTER_GUARD if available.
2639 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2640 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2641 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
2642 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
2643 * sysdeps/x86_64/tls.h: Likewise.
2645 2005-12-15 Roland McGrath <roland@redhat.com>
2647 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
2649 2005-12-13 Ulrich Drepper <drepper@redhat.com>
2651 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
2653 * errno-loc.c: New file.
2655 2005-12-12 Roland McGrath <roland@redhat.com>
2657 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
2658 adjustments before choosing stack size. Update minimum stack size
2659 calculation to match allocate_stack change.
2661 2005-12-12 Ulrich Drepper <drepper@redhat.com>
2663 * allocatestack.c (allocate_stack): Don't demand that there is an
2664 additional full page available on the stack beside guard, TLS, the
2667 2005-11-24 Ulrich Drepper <drepper@redhat.com>
2669 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2670 (__cleanup_fct_attribute): Use __regparm__ not regparm.
2672 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
2673 compiling 32-bit code we must define __cleanup_fct_attribute.
2675 005-11-24 Jakub Jelinek <jakub@redhat.com>
2678 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
2679 __attribute__ instead of __attribute.
2680 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2681 (__cleanup_fct_attribute): Likewise.
2683 2005-11-17 Jakub Jelinek <jakub@redhat.com>
2685 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
2686 a write barrier before writing libgcc_s_getcfa.
2688 2005-11-06 Ulrich Drepper <drepper@redhat.com>
2690 * sysdeps/unix/sysv/linux/configure: Removed.
2692 2005-11-05 Ulrich Drepper <drepper@redhat.com>
2694 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
2695 optional init_array/fini_array support.
2697 2005-10-24 Roland McGrath <roland@redhat.com>
2699 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
2700 versioned_symbol use.
2702 2005-10-16 Roland McGrath <roland@redhat.com>
2704 * init.c (__pthread_initialize_minimal_internal): Even when using a
2705 compile-time default stack size, apply the minimum that allocate_stack
2706 will require, and round up to page size.
2708 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
2710 * Makefile ($(test-modules)): Remove static pattern rule.
2712 2005-10-14 Jakub Jelinek <jakub@redhat.com>
2713 Ulrich Drepper <drepper@redhat.com>
2715 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
2716 alignment in callback function.
2717 * Makefile: Add rules to build and run tst-align3.
2718 * tst-align3.c: New file.
2720 2005-10-03 Jakub Jelinek <jakub@redhat.com>
2722 * allocatestack.c (setxid_signal_thread): Add
2723 INTERNAL_SYSCALL_DECL (err).
2725 2005-10-02 Jakub Jelinek <jakub@redhat.com>
2727 * allocatestack.c (setxid_signal_thread): Need to use
2728 atomic_compare_and_exchange_bool_acq.
2730 2005-10-01 Ulrich Drepper <drepper@redhat.com>
2731 Jakub Jelinek <jakub@redhat.com>
2733 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
2735 (struct pthread): Move specific_used field to avoid padding.
2736 Add setxid_futex field.
2737 * init.c (sighandler_setxid): Reset setxid flag and release the
2739 * allocatestack.c (setxid_signal_thread): New function. Broken
2740 out of the bodies of the two loops in __nptl_setxid. For undetached
2741 threads check whether they are exiting and if yes, don't send a signal.
2742 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
2743 * pthread_create.c (start_thread): For undetached threads, check
2744 whether setxid bit is set. If yes, wait until signal has been
2747 * allocatestack.c (STACK_VARIABLES): Initialize them.
2748 * pthread_create.c (__pthread_create_2_1): Initialize pd.
2750 2004-09-02 Jakub Jelinek <jakub@redhat.com>
2752 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
2753 waiters, awake all waiters on the associated mutex.
2755 2005-09-22 Roland McGrath <roland@redhat.com>
2757 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
2758 ../sysdeps/x86_64/hp-timing.h).
2760 2005-08-29 Jakub Jelinek <jakub@redhat.com>
2762 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
2763 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2764 (lll_futex_wake_unlock): Define.
2765 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
2766 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2767 (lll_futex_wake_unlock): Define.
2768 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
2769 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2770 (lll_futex_wake_unlock): Define.
2771 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
2772 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2773 (lll_futex_wake_unlock): Define.
2774 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
2775 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2776 (lll_futex_wake_unlock): Define.
2777 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
2778 lll_futex_wake_unlock.
2779 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2780 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2781 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
2782 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2783 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2784 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
2786 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2788 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2789 Fix typo in register name.
2791 2005-08-23 Ulrich Drepper <drepper@redhat.com>
2793 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2794 Use __sigfillset. Document that sigfillset does the right thing wrt
2797 2005-07-11 Jakub Jelinek <jakub@redhat.com>
2800 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
2801 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
2802 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
2803 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
2804 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
2805 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
2807 * Makefile (tests): Add tst-initializers1.
2808 (CFLAGS-tst-initializers1.c): Set.
2809 * tst-initializers1.c: New test.
2811 2005-07-11 Jakub Jelinek <jakub@redhat.com>
2813 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
2814 Make sure __flags are located at offset 48 from the start of the
2817 2005-07-02 Roland McGrath <roland@redhat.com>
2819 * Makeconfig: Comment fix.
2821 2005-07-05 Jakub Jelinek <jakub@redhat.com>
2823 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
2824 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
2825 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
2826 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
2827 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
2828 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2829 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
2830 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
2831 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
2832 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
2834 2005-06-25 Jakub Jelinek <jakub@redhat.com>
2836 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
2837 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2838 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
2840 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2841 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
2842 field. Put in sysinfo field unconditionally.
2843 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2844 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
2845 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2846 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
2848 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2849 * pthread_create.c (__pthread_create_2_1): Use
2850 THREAD_COPY_STACK_GUARD macro.
2851 * Makefile: Add rules to build and run tst-stackguard1{,-static}
2853 * tst-stackguard1.c: New file.
2854 * tst-stackguard1-static.c: New file.
2856 2005-06-14 Alan Modra <amodra@bigpond.net.au>
2858 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2859 Invoke CGOTSETUP and CGOTRESTORE.
2860 (CGOTSETUP, CGOTRESTORE): Define.
2862 2005-05-29 Richard Henderson <rth@redhat.com>
2864 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
2865 (tf_write, tf_writev): Use it.
2866 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
2869 2005-05-23 Jakub Jelinek <jakub@redhat.com>
2871 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2872 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
2873 __librt_*_asynccancel@local.
2875 2005-05-17 Alan Modra <amodra@bigpond.net.au>
2877 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
2878 all occurrences of JUMPTARGET. Instead append @local to labels.
2880 2005-05-20 Jakub Jelinek <jakub@redhat.com>
2882 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
2883 size/alignment of struct pthread rather than tcbhead_t.
2884 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2886 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2888 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2891 2005-05-19 Richard Henderson <rth@redhat.com>
2893 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
2894 __sync_val_compare_and_swap, not explicit _si variant.
2895 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
2897 2005-05-03 Ulrich Drepper <drepper@redhat.com>
2900 * sysdeps/pthread/pthread.h: Avoid empty initializers.
2902 2005-05-03 Jakub Jelinek <jakub@redhat.com>
2904 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
2905 .eh_frame section, use cfi_* directives.
2907 2005-04-27 Jakub Jelinek <jakub@redhat.com>
2909 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
2912 2005-04-27 Ulrich Drepper <drepper@redhat.com>
2915 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
2918 2005-04-27 Roland McGrath <roland@redhat.com>
2920 * Makefile (tests): Remove tst-clock2.
2922 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
2923 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
2924 translating to the kernel clockid_t for our own process/thread clock.
2926 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
2928 2005-04-15 Jakub Jelinek <jakub@redhat.com>
2930 * old_pthread_cond_init.c: Include <errno.h>.
2931 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
2932 process shared or uses clock other than CLOCK_REALTIME.
2933 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
2935 2005-04-13 David S. Miller <davem@davemloft.net>
2937 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
2938 * sysdeps/sparc/sparc64/clone.S: New file.
2940 2005-04-05 Jakub Jelinek <jakub@redhat.com>
2943 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
2944 __inline instead of inline.
2945 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
2947 2005-03-31 Jakub Jelinek <jakub@redhat.com>
2949 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
2950 functionally equivalent, but shorter instructions.
2951 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
2952 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2953 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2955 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2956 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2957 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2958 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2959 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2960 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
2961 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2963 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2964 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2965 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2966 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2967 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2969 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
2971 * sysdeps/mips/Makefile: New file.
2972 * sysdeps/mips/nptl-sysdep.S: New file.
2973 * sysdeps/mips/tcb-offsets.sym: New file.
2974 * sysdeps/mips/pthread_spin_lock.S: New file.
2975 * sysdeps/mips/pthread_spin_trylock.S: New file.
2976 * sysdeps/mips/pthreaddef.h: New file.
2977 * sysdeps/mips/tls.h: New file.
2978 * sysdeps/mips/jmpbuf-unwind.h: New file.
2979 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
2980 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
2981 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
2982 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
2983 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
2984 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
2985 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
2986 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
2987 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
2988 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
2990 2005-03-23 Ulrich Drepper <drepper@redhat.com>
2993 * pthread_create.c (__pthread_create_2_1): Rename syscall error
2996 2005-03-10 Jakub Jelinek <jakub@redhat.com>
2998 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3000 2005-02-25 Roland McGrath <roland@redhat.com>
3002 * alloca_cutoff.c: Correct license text.
3003 * tst-unload.c: Likewise.
3004 * sysdeps/pthread/allocalim.h: Likewise.
3005 * sysdeps/pthread/pt-initfini.c: Likewise.
3006 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3007 * sysdeps/pthread/bits/sigthread.h: Likewise.
3008 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3009 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3011 2005-02-16 Roland McGrath <roland@redhat.com>
3013 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3014 Use unsigned int * for ptr_nthreads.
3016 2005-02-14 Alan Modra <amodra@bigpond.net.au>
3019 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3022 2005-02-07 Richard Henderson <rth@redhat.com>
3025 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3028 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
3030 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3031 order of arguments in invocation of atomic_add_zero.
3033 2005-01-26 Jakub Jelinek <jakub@redhat.com>
3036 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3037 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3038 at least gotntpoff relocation and addition.
3039 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3041 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3043 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3046 2005-01-06 Ulrich Drepper <drepper@redhat.com>
3048 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3049 entry for static tls deallocation fix.
3050 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3051 also contains information whether the memory pointed to is static
3053 * sysdeps/i386/tls.h: Likewise.
3054 * sysdeps/ia64/tls.h: Likewise.
3055 * sysdeps/powerpc/tls.h: Likewise.
3056 * sysdeps/s390/tls.h: Likewise.
3057 * sysdeps/sh/tls.h: Likewise.
3058 * sysdeps/sparc/tls.h: Likewise.
3059 * sysdeps/x86_64/tls.h: Likewise.
3061 2004-12-27 Ulrich Drepper <drepper@redhat.com>
3063 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3065 2004-12-21 Jakub Jelinek <jakub@redhat.com>
3067 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3069 * Makefile (tests): Add tst-align2.
3070 * tst-align2.c: New test.
3071 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3072 -mpreferred-stack-boundary=4.
3074 2004-12-18 Roland McGrath <roland@redhat.com>
3076 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3077 New file removed withdrawn for the moment.
3079 2004-12-17 Richard Henderson <rth@redhat.com>
3081 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3082 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3084 2004-12-16 Ulrich Drepper <drepper@redhat.com>
3086 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3087 Increased PTHREAD_STACK_MIN.
3089 * tst-context1.c (stacks): Use bigger stack size.
3091 2004-12-16 Jakub Jelinek <jakub@redhat.com>
3093 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3094 * sysdeps/sparc/tcb-offsets.sym: Add TID.
3096 2004-12-15 Jakub Jelinek <jakub@redhat.com>
3098 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3099 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3100 * sysdeps/s390/tcb-offsets.sym (TID): Add.
3102 2004-12-15 Ulrich Drepper <drepper@redhat.com>
3104 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3106 2004-12-14 Ulrich Drepper <drepper@redhat.com>
3108 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3109 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3111 * tst-getpid1.c: If child crashes, report this first. Print which
3114 2004-12-09 Ulrich Drepper <drepper@redhat.com>
3116 * init.c (__pthread_initialize_minimal_internal): Also unblock
3119 2004-12-01 Jakub Jelinek <jakub@redhat.com>
3121 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3122 _POSIX_THREAD_CPUTIME): Define to 0.
3123 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3124 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3125 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3126 __timer_signal_thread_tclk): Remove.
3127 (init_module): Remove their initialization.
3128 (thread_cleanup): Remove their cleanup assertions.
3129 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3130 __timer_signal_thread_tclk): Remove.
3131 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3132 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3133 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3135 2004-12-07 Jakub Jelinek <jakub@redhat.com>
3137 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3138 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3140 * Makefile (tests): Add tst-getpid2.
3141 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3142 (do_test): Use it. Use __clone2 instead of clone on ia64.
3143 * tst-getpid2.c: New test.
3145 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3147 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3149 2004-12-04 Ulrich Drepper <drepper@redhat.com>
3151 * Makefile (tests): Add tst-getpid1.
3152 * tst-getpid1.c: New file.
3153 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3154 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3156 2004-12-02 Roland McGrath <roland@redhat.com>
3158 * Makefile (libpthread-nonshared): Variable removed.
3159 ($(objpfx)libpthread_nonshared.a): Target removed.
3160 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3161 These are now handled by generic magic from
3162 libpthread-static-only-routines being set.
3164 2004-11-27 Ulrich Drepper <drepper@redhat.com>
3166 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3167 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3168 _POSIX_THREAD_PRIO_PROTECT): Define.
3169 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3170 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3171 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3173 2004-11-26 Jakub Jelinek <jakub@redhat.com>
3175 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3176 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3177 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3178 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3179 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3180 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3181 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3183 2004-11-24 Ulrich Drepper <drepper@redhat.com>
3185 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3187 * Makefile (libpthread-routines): Add pthread_setschedprio.
3188 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3189 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3190 * pthread_setschedprio.c: New file.
3192 2004-11-20 Jakub Jelinek <jakub@redhat.com>
3194 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3195 * pthread_cancel.c (pthread_create): Likewise.
3197 * Makefile (libpthread-routines): Add vars.
3198 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3199 * init.c (__default_stacksize, __is_smp): Remove.
3201 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3202 and define a wrapper macro.
3203 (PTHREAD_STATIC_FN_REQUIRE): Define.
3204 * allocatestack.c (__find_thread_by_id): Undefine.
3205 * pthread_create (__pthread_keys): Remove.
3206 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3207 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3208 PTHREAD_STATIC_FN_REQUIRE.
3210 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3212 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3213 parameter to REGISTER macro.
3215 2004-11-17 Roland McGrath <roland@redhat.com>
3217 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3218 Make sure SIGCANCEL is blocked as well.
3220 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3222 * sysdeps/pthread/setxid.h: New file.
3223 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3224 (struct xid_command): Add forward decl.
3225 (struct pthread_functions): Change return type of __nptl_setxid hook
3227 * pthreadP.h (__nptl_setxid): Change return type to int.
3228 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3229 calling thread, return its return value and set errno on failure.
3230 * descr.h (struct xid_command): Change id type to long array.
3232 * Makefile: Add rules to build and test tst-setuid1 and
3234 * tst-setuid1.c: New test.
3235 * tst-setuid1-static.c: New test.
3237 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3239 * Makefile (tests): Add tst-exit3.
3240 * tst-exit3.c: New test.
3242 2004-11-09 Ulrich Drepper <drepper@redhat.com>
3244 * Makefile (tests): Add tst-exit2.
3245 * tst-exit2.c: New file.
3247 2004-11-09 Roland McGrath <roland@redhat.com>
3250 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3251 here, before calling clone.
3252 * pthread_create.c (start_thread): Don't do it here.
3254 2004-11-02 Jakub Jelinek <jakub@redhat.com>
3256 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3258 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3260 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3261 Set ETIMEDOUT to errno when time is up. Tweak to avoid
3264 2004-10-28 Jakub Jelinek <jakub@redhat.com>
3266 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3267 if sched_priority is not between minprio and maxprio.
3269 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3271 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3272 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3274 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3275 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3277 2004-10-24 Ulrich Drepper <drepper@redhat.com>
3279 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3280 not-cancelable I/O functions.
3282 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3284 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3285 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3286 make sure 2 is stored in the futex and we looked at the old value.
3287 Fix a few other problems to return the correct value.
3289 2004-10-14 Richard Henderson <rth@redhat.com>
3291 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3294 2004-10-06 Jakub Jelinek <jakub@redhat.com>
3296 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3297 of pthread-functions.h and pthreaddef.h.
3298 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3300 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3301 Change __data.__nwaiters from int to unsigned int.
3303 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3304 sysconf (_SC_THREAD_CPUTIME) returns negative value.
3306 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3309 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3310 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3312 2004-10-06 Ulrich Drepper <drepper@redhat.com>
3314 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
3315 test fails, remove message queue.
3316 (tf_msgsnd): Likewise.
3318 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3320 * tst-clock1.c: Change #ifdef to #if defined.
3321 * tst-clock2.c: Likewise.
3322 * tst-cond11.c: Likewise.
3324 * sysdeps/pthread/timer_create.c (timer_create): Use
3325 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3326 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3329 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3331 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3332 _POSIX_THREAD_CPUTIME): Define to 0.
3334 2004-10-04 Ulrich Drepper <drepper@redhat.com>
3336 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3337 and _POSIX_THREAD_CPUTIME to zero.
3338 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3339 * tst-barrier2.c: Fix testing for POSIX feature.
3340 * tst-clock1.c: Likewise.
3341 * tst-clock2.c: Likewise.
3342 * tst-cond11.c: Likewise.
3343 * tst-cond4.c: Likewise.
3344 * tst-cond6.c: Likewise.
3345 * tst-flock2.c: Likewise.
3346 * tst-mutex4.c: Likewise.
3347 * tst-mutex9.c: Likewise.
3348 * tst-rwlock12.c: Likewise.
3349 * tst-rwlock4.c: Likewise.
3350 * tst-signal1.c: Likewise.
3351 * tst-spin2.c: Likewise.
3352 * sysdeps/pthread/posix-timer.h: Likewise.
3353 * sysdeps/pthread/timer_create.c: Likewise.
3354 * sysdeps/pthread/timer_routines.c: Likewise.
3356 2004-10-01 Ulrich Drepper <drepper@redhat.com>
3358 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3359 (__lll_mutex_timedlock_wait): Address futex correctly.
3361 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3362 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3363 make sure 2 is stored in the futex and we looked at the old value.
3364 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3365 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
3366 which might very well made the code not working at all before.
3369 2004-09-28 Ulrich Drepper <drepper@redhat.com>
3371 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3372 allow SIGSETXID to be sent.
3373 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3374 for SIGSETXID to be defined.
3375 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3376 SIGSETXID cannot be blocked.
3378 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3379 Add __extension__ to long long types.
3380 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3381 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3382 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3383 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3384 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3385 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3386 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3388 2004-09-25 Ulrich Drepper <drepper@redhat.com>
3390 * descr.h (struct pthread): Add stopped_start field.
3391 * sysdeps/pthread/createthread.c (create_thread): Set
3392 start_stopped flag in descriptor for new thread appropriately.
3393 * pthread_create.c (start_thread): Only take lock to be stopped on
3394 startup if stopped_start flag says so.
3396 2004-09-24 Ulrich Drepper <drepper@redhat.com>
3398 * pthread_create.c (__pthread_create_2_1): Remember whether thread
3399 is created detached and if yes, do not try to free the stack in case
3400 the thread creation failed.
3401 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3402 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3403 case there has been no error. [BZ #405]
3405 * pthread_create.c (start_thread): Don't wait for scheduler data
3406 etc to be set at the beginning of the function. The cancellation
3407 infrastructure must have been set up. And enable async
3408 cancellation before potentially going to sleep. [BZ #401]
3410 2004-09-20 Ulrich Drepper <drepper@redhat.com>
3412 * Versions: Remove exports for pthread_set*id_np functions.
3413 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3415 * Makefile: Don't build pthread_set*id code for now.
3417 2004-09-19 Ulrich Drepper <drepper@redhat.com>
3419 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3421 * allocatestack.c (__nptl_setxid): New function.
3422 * descr.h (struct xid_command): Define type.
3423 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3424 (sighandler_setxid): New function.
3425 (__pthread_initialize_minimal): Register sighandler_setxid for
3427 * pt-allocrtsig.c: Update comment.
3428 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
3429 Declare __nptl_setxid.
3430 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3431 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3432 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3433 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3434 and pthread_setresuid_np.
3435 * pthread_setgid_np.c: New file.
3436 * pthread_setuid_np.c: New file.
3437 * pthread_setegid_np.c: New file.
3438 * pthread_seteuid_np.c: New file.
3439 * pthread_setregid_np.c: New file.
3440 * pthread_setreuid_np.c: New file.
3441 * pthread_setresgid_np.c: New file.
3442 * pthread_setresuid_np.c: New file.
3443 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3444 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3445 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3446 and pthread_setresuid_np.
3447 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3448 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3449 pthread_setregid, and pthread_setresgid.
3451 2004-09-18 Ulrich Drepper <drepper@redhat.com>
3453 * allocatestack.c (allocate_stack): Return EAGAIN instead of
3454 ENOMEM when out of memory.
3456 2004-09-10 Roland McGrath <roland@redhat.com>
3459 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3460 code, since we don't try to use the broken CLONE_STOPPED any more.
3461 * pthread_create.c (start_thread): Likewise.
3463 2004-09-15 Richard Henderson <rth@redhat.com>
3465 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3467 2004-09-01 David Mosberger <davidm@hpl.hp.com>
3469 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3470 (__libc_unwind_longjmp): Delete macro and declare as function.
3471 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3472 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3474 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3475 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3476 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3478 2004-09-12 Ulrich Drepper <drepper@redhat.com>
3480 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3482 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3483 types also for __USE_XOPEN2K.
3484 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3485 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3486 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3487 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3488 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3489 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3490 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3493 2004-09-08 Ulrich Drepper <drepper@redhat.com>
3495 * sysdeps/pthread/pthread.h
3496 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3497 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3498 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3499 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3502 2004-09-07 Ulrich Drepper <drepper@redhat.com>
3504 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3505 PSEUDO to be used with . prefix.
3507 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3508 Use atomic_increment instead of atomic_exchange_and_add.
3509 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3511 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3513 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3516 * allocatestack.c (allocate_stack): Use atomic_increment_val
3517 instead of atomic_exchange_and_add.
3518 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3519 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3521 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3524 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3525 the initialization function might throw.
3527 2005-09-05 Richard Henderson <rth@redhat.com>
3529 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3530 Move definition inside libpthread, libc, librt check. Provide
3531 definition for rtld.
3533 2004-09-02 Ulrich Drepper <drepper@redhat.com>
3535 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3536 * sysdeps/i386/jmpbuf-unwind.h: Likewise
3537 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3538 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3539 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3540 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3541 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3542 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3545 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3546 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3547 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3549 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3550 Decrement __nwaiters. If pthread_cond_destroy has been called and
3551 this is the last waiter, signal pthread_cond_destroy caller and
3552 avoid using the pthread_cond_t structure after unlock.
3553 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3554 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3555 Read clock type from the least significant bits of __nwaiters instead
3557 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3558 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3560 2004-08-31 Jakub Jelinek <jakub@redhat.com>
3563 * Makefile (tests): Add tst-cond20 and tst-cond21.
3564 * tst-cond20.c: New test.
3565 * tst-cond21.c: New test.
3566 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3567 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3569 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3571 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3572 (pthread_cond_t): Likewise.
3573 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3575 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3577 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3579 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3580 (cond_nwaiters): New.
3582 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3583 if there are waiters not signalled yet.
3584 Wait until all already signalled waiters wake up.
3585 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3586 __nwaiters. If pthread_cond_destroy has been called and this is the
3587 last waiter, signal pthread_cond_destroy caller and avoid using
3588 the pthread_cond_t structure after unlock.
3589 (__pthread_cond_wait): Increment __nwaiters in the beginning,
3590 decrement it when leaving. If pthread_cond_destroy has been called
3591 and this is the last waiter, signal pthread_cond_destroy caller.
3592 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3593 Likewise. Read clock type from the least significant bits of
3594 __nwaiters instead of __clock.
3595 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3596 whether clock ID can be encoded in COND_CLOCK_BITS bits.
3597 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3598 clock type just from the last COND_CLOCK_BITS bits of value.
3599 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3600 instead of __clock, just from second bit of condattr's value.
3602 2004-08-30 Jakub Jelinek <jakub@redhat.com>
3604 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3605 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
3607 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3609 2004-08-15 Roland McGrath <roland@frob.com>
3611 * pthread_atfork.c: Update copyright terms including special exception
3612 for these trivial files, which are statically linked into executables
3613 that use dynamic linking for the significant library code.
3615 2004-08-09 Jakub Jelinek <jakub@redhat.com>
3617 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3618 pthread_rwlock_rdlock.
3619 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3620 Decrease __nr_readers_queued after reacquiring lock.
3621 * sysdeps/pthread/pthread_rwlock_timedrdlock
3622 (pthread_rwlock_timedrdlock): Likewise.
3623 Reported by Bob Cook <bobcook47@hotmail.com>.
3625 2004-08-11 Jakub Jelinek <jakub@redhat.com>
3627 * tst-rwlock14.c (tf): Read main thread handle from *ARG
3628 before pthread_barrier_wait.
3630 2004-08-07 Ulrich Drepper <drepper@redhat.com>
3632 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3633 Remove unnecessary exception handling data.
3635 2004-07-23 Jakub Jelinek <jakub@redhat.com>
3638 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3639 instead of clockid_t.
3641 2004-07-21 Roland McGrath <roland@redhat.com>
3643 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
3645 2004-07-19 Roland McGrath <roland@redhat.com>
3647 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
3649 2004-07-02 Roland McGrath <roland@redhat.com>
3651 * configure: Don't exit.
3653 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3655 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3656 (__pthread_cond_timedwait): Check for invalid nanosecond in
3659 2004-07-07 Ulrich Drepper <drepper@redhat.com>
3661 * Makefile: Add rules to build and run tst-fini1.
3662 * tst-fini1.c: New file.
3663 * tst-fini1mod.c: New file.
3665 2004-07-05 Ulrich Drepper <drepper@redhat.com>
3667 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
3668 if no cancellation support is needed.
3669 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3670 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3671 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3672 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3673 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3674 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3675 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3676 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3677 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3679 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
3680 only if not already defined.
3682 2004-07-05 Jakub Jelinek <jakub@redhat.com>
3684 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
3685 constraint "m" instead of "0" for futex.
3687 * shlib-versions: Add powerpc64-.*-linux.*.
3689 2004-07-04 Jakub Jelinek <jakub@redhat.com>
3691 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
3692 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
3694 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
3695 1 billion and 64-bit tv_nsec which is valid when truncated to 32
3698 2004-06-29 Roland McGrath <roland@redhat.com>
3700 * Banner: NPTL no longer has its own version number.
3701 * Makefile (nptl-version): Variable removed.
3702 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
3703 using $(version), the glibc version number.
3705 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3707 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
3708 Fix branch offset for a PLT entry.
3709 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
3711 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3713 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
3715 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
3718 2004-06-28 Jakub Jelinek <jakub@redhat.com>
3720 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
3723 2004-06-28 Jakub Jelinek <jakub@redhat.com>
3725 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3726 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
3728 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
3729 (pthread_rwlock_timedrdlock): Likewise.
3731 2004-06-22 Jakub Jelinek <jakub@redhat.com>
3733 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3734 Set __r7 to val, not mutex.
3736 2004-06-27 Ulrich Drepper <drepper@redhat.com>
3738 * Makefile: Add rules to build tst-rwlock14.
3739 * tst-rwlock14.c: New file.
3741 2004-06-24 Boris Hu <boris.hu@intel.com>
3743 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
3745 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
3747 2004-06-19 Andreas Jaeger <aj@suse.de>
3749 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
3750 assembler in last patch.
3752 2004-06-17 Ulrich Drepper <drepper@redhat.com>
3754 * sysdeps/pthread/pthread_cond_timedwait.c
3755 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
3756 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3757 (__pthread_cond_timedwait): Check for invalid nanosecond in
3759 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3760 * tst-cond19.c: New file.
3761 * Makefile: Add rules to build and run tst-cond19.
3763 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
3765 * tst-context1.c (GUARD_PATTERN): Defined.
3766 (tst_context_t): Define struct containing ucontext_t & guard words.
3767 (ctx): Declare as an array of tst_context_t.
3768 (fct): Verify uc_link & guard words are still valid.
3769 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
3771 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3773 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3774 Add __data.__futex field, reshuffle __data.__clock.
3775 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
3776 (__pthread_cond_signal): Increment __futex at the same time as
3777 __wakeup_seq or __total_seq. Pass address of __futex instead of
3778 address of low 32-bits of __wakeup_seq to futex syscall.
3779 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
3780 (__pthread_cond_wait): Likewise. Pass __futex value from before
3781 releasing internal lock to FUTEX_WAIT.
3782 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3783 (__pthread_cond_timedwait): Likewise.
3784 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
3785 (FUTEX_CMP_REQUEUE): Define.
3786 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3787 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3788 Pass __futex value from before the unlock and __futex address instead
3789 of address of low 32-bits of __wakeup_seq to futex syscall.
3790 Fallback to FUTEX_WAKE all on any errors.
3792 2004-06-08 Jakub Jelinek <jakub@redhat.com>
3794 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
3796 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
3797 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
3798 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
3799 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
3800 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
3802 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
3804 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
3805 Add memory clobber to inline assembly.
3806 (__lll_mutex_trylock): Likewise.
3807 (__lll_mutex_cond_trylock): Likewise.
3809 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
3811 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3812 Pass val argument as 6th system call argument in %r7.
3814 2004-05-21 Jakub Jelinek <jakub@redhat.com>
3816 * Makefile (tests): Add tst-cond16.
3817 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
3818 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
3819 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3820 Add __data.__futex field, reshuffle __data.__clock.
3821 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
3822 (__pthread_cond_signal): Increment __futex at the same time as
3823 __wakeup_seq or __total_seq. Pass address of __futex instead of
3824 address of low 32-bits of __wakeup_seq to futex syscall.
3825 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
3826 (__pthread_cond_wait): Likewise. Pass __futex value from before
3827 releasing internal lock to FUTEX_WAIT.
3828 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
3829 (__pthread_cond_timedwait): Likewise.
3830 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
3831 (FUTEX_CMP_REQUEUE): Define.
3832 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3833 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3834 Pass __futex value from before the unlock and __futex address instead
3835 of address of low 32-bits of __wakeup_seq to futex syscall.
3836 Fallback to FUTEX_WAKE all on any errors.
3837 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
3839 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3840 internally. Return non-zero if error, zero if success.
3841 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
3842 Add __data.__futex field, reshuffle __data.__clock.
3843 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
3845 (lll_futex_requeue): Add val argument, return 1 unconditionally
3847 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3848 Add __data.__futex field, reshuffle __data.__clock.
3849 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
3851 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3852 internally. Return non-zero if error, zero if success.
3853 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3854 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
3855 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
3857 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3858 internally. Return non-zero if error, zero if success.
3859 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3860 Add __data.__futex field, reshuffle __data.__clock.
3861 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
3863 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3864 internally. Return non-zero if error, zero if success.
3865 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3866 Add __data.__futex field, reshuffle __data.__clock.
3867 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3868 Add __data.__futex field, reshuffle __data.__clock.
3869 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
3870 Increment __futex at the same time as __wakeup_seq or __total_seq.
3871 Pass address of __futex instead of address of low 32-bits of
3872 __wakeup_seq to futex syscall.
3873 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
3874 Pass __futex value from before releasing internal lock
3876 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3877 Likewise. Avoid unnecessary shadowing of variables.
3878 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
3879 Set __futex to 2 * __total_seq. Pass __futex value from before the
3880 unlock and __futex address instead of address of low 32-bits of
3881 __wakeup_seq to futex_requeue macro, adjust for new return value
3883 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3884 (__pthread_cond_signal): Increment __futex at the same time as
3885 __wakeup_seq or __total_seq. Pass address of __futex instead of
3886 address of low 32-bits of __wakeup_seq to futex syscall.
3887 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3888 (__pthread_cond_wait): Likewise. Pass __futex value from before
3889 releasing internal lock to FUTEX_WAIT.
3890 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3891 (__pthread_cond_timedwait): Likewise.
3892 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3893 (FUTEX_CMP_REQUEUE): Define.
3894 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3895 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3896 Pass __futex value from before the unlock and __futex address instead
3897 of address of low 32-bits of __wakeup_seq to futex syscall.
3898 Fallback to FUTEX_WAKE all on any errors.
3900 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3902 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
3903 Add nop to align the end of critical section.
3904 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
3906 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3908 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3909 Add __broadcast_seq field.
3910 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
3911 all waiters as woken with woken_seq and bump broadcast counter.
3912 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
3913 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
3914 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3915 Comment typo fixes. Avoid returning -ETIMEDOUT.
3917 2004-06-01 Ulrich Drepper <drepper@redhat.com>
3919 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3920 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
3921 Reported by Kaz Kojima.
3923 2004-05-25 Jakub Jelinek <jakub@redhat.com>
3925 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
3927 2004-05-21 Jakub Jelinek <jakub@redhat.com>
3929 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
3930 __broadcast_seq with bc_seq after acquiring internal lock instead of
3933 2004-05-18 Jakub Jelinek <jakub@redhat.com>
3935 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
3937 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3938 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
3939 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
3940 (pthread_cond_t): Add __data.__broadcast_seq field.
3941 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3942 (FRAME_SIZE): Define.
3943 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
3945 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
3947 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
3949 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3950 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
3953 2004-05-18 Ulrich Drepper <drepper@redhat.com>
3955 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
3956 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
3957 Add __broadcast_seq field.
3958 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3959 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3960 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3961 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3962 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3963 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
3964 all waiters as woken with woken_seq and bump broadcast counter.
3965 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
3966 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
3967 __broadcast_seq field.
3968 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3969 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
3970 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
3971 * pthread_cond_init.c: Initialize __broadcast_seq field.
3972 * Makefile (tests): Add tst-cond17 and tst-cond18.
3973 Add .NOTPARALLEL goal.
3974 * tst-cond16.c: New file. From Jakub.
3975 * tst-cond17.c: New file. From Jakub.
3976 * tst-cond18.c: New file. From Jakub.
3978 2004-05-16 Ulrich Drepper <drepper@redhat.com>
3980 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
3983 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3984 Parametrize frame size. Correct some unwind info.
3985 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3987 2004-05-04 Jakub Jelinek <jakub@redhat.com>
3989 * tst-stack3.c: Note testing functionality beyond POSIX.
3991 2004-05-04 Jakub Jelinek <jakub@redhat.com>
3993 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
3994 Change conditional from ifdef to if.
3996 2004-04-23 Jakub Jelinek <jakub@redhat.com>
3998 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
3999 SYSDEP_CANCEL_ERROR): Define.
4002 2004-05-01 Jakub Jelinek <jakub@redhat.com>
4004 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4006 2004-04-20 Jakub Jelinek <jakub@redhat.com>
4008 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4010 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4012 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4013 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4014 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4015 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4017 2004-04-19 Ulrich Drepper <drepper@redhat.com>
4019 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4020 thread has all signals blocked.
4022 2004-04-18 Andreas Jaeger <aj@suse.de>
4024 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4025 (SEM_VALUE_MAX): Add missing brace.
4027 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4029 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4031 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4032 * sysdeps/pthread/tst-mqueue8x.c: New test.
4033 * tst-cancel4.c: Update comment about message queues.
4035 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4036 return it_value { 0, 0 }.
4037 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4039 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4040 assertion for SIGEV_NONE.
4041 (thread_attr_compare): Compare all attributes, not just a partial
4044 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4046 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4048 2004-04-17 Ulrich Drepper <drepper@redhat.com>
4050 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4051 Just use a plain number.
4052 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4053 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4054 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4055 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4056 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4057 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4058 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4060 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4062 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4064 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4066 2004-04-15 Jakub Jelinek <jakub@redhat.com>
4068 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4069 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4070 of calling sigwaitinfo.
4072 2004-04-16 Ulrich Drepper <drepper@redhat.com>
4074 * allocatestack.c (allocate_stack): Set reported_guardsize
4076 * pthread_getattr_np.c (pthread_getattr_np): Use
4077 reported_guardsize instead of guardsize.
4078 * descr.h (struct pthread): Add reported_guardsize field.
4080 2004-04-13 Jakub Jelinek <jakub@redhat.com>
4082 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4084 2004-04-12 Ulrich Drepper <drepper@redhat.com>
4086 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4088 2004-04-08 Jakub Jelinek <jakub@redhat.com>
4090 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4091 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4092 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4093 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4094 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4096 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4097 (_POSIX_MESSAGE_PASSING): Define.
4098 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4099 (_POSIX_MESSAGE_PASSING): Define.
4100 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4101 (_POSIX_MESSAGE_PASSING): Define.
4103 2004-04-04 Ulrich Drepper <drepper@redhat.com>
4105 * tst-context1.c (fct): Check whether correct stack is used.
4107 2004-04-03 Ulrich Drepper <drepper@redhat.com>
4109 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4110 matching constraints for asm mem parameters.
4112 * tst-clock2.c (tf): Don't define unless needed.
4114 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
4116 * Makefile (link-libc-static): Use $(static-gnulib) instead of
4119 2004-03-30 Ulrich Drepper <drepper@redhat.com>
4121 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4122 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4123 * pthreadP.h: Declare __nptl_deallocate_tsd.
4124 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4127 * Makefile (tests): Add tst-tsd5.
4128 * tst-tsd5.c: New file.
4130 2004-03-29 Ulrich Drepper <drepper@redhat.com>
4132 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4133 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4134 is SHLIB_COMPAT check.
4135 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4136 (__pthread_attr_getaffinity_old): Likewise.
4137 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4138 (__pthread_getaffinity_old): Likewise.
4139 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4140 (__pthread_setaffinity_old): Likewise.
4142 2004-03-26 Ulrich Drepper <drepper@redhat.com>
4144 * allocatestack.c (_make_stacks_executable): Call
4145 _dl_make_stack_executable first.
4147 2004-03-24 Roland McGrath <roland@redhat.com>
4149 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4150 constraint instead of "0".
4152 2004-03-24 Ulrich Drepper <drepper@redhat.com>
4154 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4155 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4157 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4158 code to avoid warning.
4160 2004-03-24 Andreas Jaeger <aj@suse.de>
4162 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4163 (__pthread_attr_setaffinity_old): Remove const.
4165 2004-03-23 Ulrich Drepper <drepper@redhat.com>
4167 * sysdeps/unix/sysv/linux/smp.h: New file.
4168 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4169 * init.c: Define __is_smp.
4170 (__pthread_initialize_minimal_internal): Call is_smp_system to
4171 initialize __is_smp.
4172 * pthreadP.h: Declare __is_smp.
4173 Define MAX_ADAPTIVE_COUNT is necessary.
4174 * pthread_mutex_init.c: Add comment regarding __spins field.
4175 * pthread_mutex_lock.c: Implement adaptive mutex type.
4176 * pthread_mutex_timedlock.c: Likewise.
4177 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4178 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4180 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4181 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4182 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4183 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4184 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4185 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4186 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4187 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4188 lll_mutex_cond_trylock.
4189 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4190 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4191 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4192 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4193 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4194 Define BUSY_WAIT_NOP.
4195 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4196 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4198 * tst-mutex5.c: Add support for testing adaptive mutexes.
4199 * tst-mutex7.c: Likewise.
4200 * tst-mutex5a.c: New file.
4201 * tst-mutex7a.c: New file.
4202 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4204 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4205 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4206 vgettimeofday call might destroy the content.
4208 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4211 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4212 No need to restrict type of ret. Make it int. Add comment.
4214 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4215 Remove unnecessary setne instruction.
4217 2004-03-22 Jakub Jelinek <jakub@redhat.com>
4219 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4220 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4221 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4222 If realloc fails, break out of the loop.
4224 2004-03-20 Andreas Jaeger <aj@suse.de>
4226 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4227 (__pthread_setaffinity_old): Fix interface.
4228 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4229 (__pthread_getaffinity_old): Likewise.
4231 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4232 (__pthread_setaffinity_new): Remove duplicate declaration.
4234 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4236 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4237 the return value to a safe register.
4238 (CDISABLE): Set the function argument correctly.
4240 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4242 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4243 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4244 Rewrite so that only one locked memory operation per round is needed.
4245 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4246 (pthread_barrier_wait): After wakeup, release lock only when the
4247 last thread stopped using the barrier object.
4248 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4249 (__pthread_cond_wait): Don't store mutex address if the current
4250 value is ~0l. Add correct cleanup support and unwind info.
4251 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4252 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4253 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4254 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4255 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4256 Add correct cleanup support and unwind info.
4257 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4258 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4259 information for syscall wrappers.
4261 2004-03-18 Ulrich Drepper <drepper@redhat.com>
4263 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4264 cpusetsize field, remove next.
4265 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4266 parameter for size of the CPU set.
4267 (pthread_setaffinity_np): Likewise.
4268 (pthread_attr_getaffinity_np): Likewise.
4269 (pthread_attr_setaffinity_np): Likewise.
4270 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4271 interface change, keep compatibility code.
4272 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4273 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4274 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4275 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
4276 __pthread_getaffinity_np.
4277 * Versions: Add version for changed interfaces.
4278 * tst-attr3.c: Adjust test for interface change.
4279 * pthread_getattr_np.c: Query the kernel about the affinity mask with
4280 increasing buffer sizes.
4281 * pthread_attr_destroy.c: Remove unused list handling.
4282 * pthread_attr_init.c: Likewise.
4284 2004-03-17 Roland McGrath <roland@redhat.com>
4286 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4287 first argument to clock_getres so we ever enable kernel timers.
4289 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
4291 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4293 2004-03-12 Richard Henderson <rth@redhat.com>
4295 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4296 oldvalue from CENABLE to CDISABLE.
4298 2004-03-12 Ulrich Drepper <drepper@redhat.com>
4300 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4301 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4302 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4303 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4305 2004-03-11 Richard Henderson <rth@redhat.com>
4307 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4308 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4309 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4311 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4313 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4314 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4315 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4317 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4319 * forward.c (__pthread_cond_broadcast_2_0,
4320 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4321 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4322 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4324 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4326 * sysdeps/sh/tcb-offsets.sym: Add PID.
4327 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4328 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4330 2004-03-10 Ulrich Drepper <drepper@redhat.com>
4332 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4333 include <sysdep-cancel.h>, vfork is no cancellation point.
4334 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4335 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4336 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4338 2004-03-10 Jakub Jelinek <jakub@redhat.com>
4340 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4342 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4343 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4345 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4347 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4348 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4349 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4350 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4351 of DO_CALL_VIA_BREAK. Work around a gas problem.
4353 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4354 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4355 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4356 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4357 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4358 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4360 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4361 a local register for saving old PID. Negate PID in parent upon exit.
4363 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4365 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4366 before syscall, set to the old value in the parent afterwards.
4367 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4368 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4370 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4371 before syscall, set to the old value in the parent afterwards.
4372 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4373 * sysdeps/s390/tcb-offsets.sym: Add PID.
4375 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4376 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4377 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4378 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4379 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4380 * sysdeps/sparc/tcb-offsets.sym: Add PID.
4382 2004-03-10 Andreas Schwab <schwab@suse.de>
4384 * sysdeps/ia64/tcb-offsets.sym: Add PID.
4385 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4386 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4388 2004-03-09 Jakub Jelinek <jakub@redhat.com>
4390 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4391 * tst-cancel21.c (do_one_test): Likewise.
4392 Reported by Gordon Jin <gordon.jin@intel.com>.
4394 2004-02-09 Jakub Jelinek <jakub@redhat.com>
4396 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4397 if non-zero and set to INT_MIN if zero.
4398 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4399 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4400 (SAVE_PID, RESTORE_PID): Define.
4402 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4403 Use relative path to avoid including NPTL i386/vfork.S.
4404 (SAVE_PID, RESTORE_PID): Define.
4405 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4406 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4407 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4409 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4410 * tst-vfork1.c: New test.
4411 * tst-vfork2.c: New test.
4412 * tst-vfork1x.c: New test.
4413 * tst-vfork2x.c: New test.
4415 2004-03-08 Ulrich Drepper <drepper@redhat.com>
4417 * sysdeps/i386/tcb-offsets.sym: Add PID.
4418 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4419 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4420 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4422 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
4424 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4426 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
4428 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4431 2004-03-07 Ulrich Drepper <drepper@redhat.com>
4433 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4436 * tst-once4.c: Remove unnecessary macro definition.
4438 * tst-mutex7.c (do_test): Limit thread stack size.
4439 * tst-once2.c (do_test): Likewise.
4440 * tst-tls3.c (do_test): Likewise.
4441 * tst-tls1.c (do_test): Likewise.
4442 * tst-signal3.c (do_test): Likewise.
4443 * tst-kill6.c (do_test): Likewise.
4444 * tst-key4.c (do_test): Likewise.
4445 * tst-join4.c (do_test): Likewise.
4446 * tst-fork1.c (do_test): Likewise.
4447 * tst-context1.c (do_test): Likewise.
4448 * tst-cond2.c (do_test): Likewise.
4449 * tst-cond10.c (do_test): Likewise.
4450 * tst-clock2.c (do_test): Likewise.
4451 * tst-cancel10.c (do_test): Likewise.
4452 * tst-basic2.c (do_test): Likewise.
4453 * tst-barrier4.c (do_test): Likewise.
4455 2004-03-05 Ulrich Drepper <drepper@redhat.com>
4457 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4459 2004-03-01 Ulrich Drepper <drepper@redhat.com>
4461 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4462 (__pthread_cond_timedwait): Optimize wakeup test.
4463 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4464 (__pthread_cond_wait): Likewise.
4465 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4466 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4469 2004-02-29 Ulrich Drepper <drepper@redhat.com>
4471 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4472 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
4473 the atomic instruction needed.
4474 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4475 (__lll_mutex_lock_wait): Likewise.
4477 2004-02-28 Ulrich Drepper <drepper@redhat.com>
4479 * Makefile (tests): Add tst-cond14 and tst-cond15.
4480 * tst-cond14.c: New file.
4481 * tst-cond15.c: New file.
4483 2004-02-27 Ulrich Drepper <drepper@redhat.com>
4485 * sysdeps/pthread/createthread.c (create_thread): Remove use of
4486 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
4487 needs to be implemented differently to be useful.
4489 2004-02-26 Ulrich Drepper <drepper@redhat.com>
4491 * pthread_attr_setschedparam.c: Don't test priority against limits
4492 here. Set ATTR_FLAG_SCHED_SET flag.
4493 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4494 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4495 from parent thread to child. If attribute is used and scheduling
4496 parameters are not inherited, copy parameters from attribute or
4497 compute them. Check priority value.
4498 * pthread_getschedparam.c: If the parameters aren't known yet get
4499 them from the kernel.
4500 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4501 ATTR_FLAG_POLICY_SET flag for thread.
4502 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4503 and ATTR_FLAG_POLICY_SET.
4505 * sysdeps/pthread/createthread.c: Use tgkill if possible.
4507 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4508 fail if stack address hasn't been set. Just return 0.
4510 2004-02-25 Ulrich Drepper <drepper@redhat.com>
4512 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
4513 libpthread for the files in this list.
4514 (CFLAGS-tst-unload): Removed.
4515 * tst-unload.c (do_test): Don't use complete path for
4518 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4521 2004-02-22 Ulrich Drepper <drepper@redhat.com>
4523 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4524 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4525 operation per round is needed.
4526 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4527 (__lll_mutex_lock_wait): Likewise.
4529 2004-02-20 Ulrich Drepper <drepper@redhat.com>
4531 * tst-cancel9.c (cleanup): Don't print to stderr.
4533 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4535 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4537 2004-02-20 Jakub Jelinek <jakub@redhat.com>
4539 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4540 (__syscall_error_handler2): Call CDISABLE.
4541 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4542 (__syscall_error_handler2): Call CDISABLE.
4544 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4545 Release lock before the loop, don't reacquire it.
4547 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4549 2004-02-19 Andreas Schwab <schwab@suse.de>
4551 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4554 2004-02-18 Ulrich Drepper <drepper@redhat.com>
4556 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4557 (pthread_barrier_wait): After wakeup, release lock only when the
4558 last thread stopped using the barrier object.
4559 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4560 (pthread_barrier_wait): Likewise.
4561 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4563 * Makefile (tests): Add tst-barrier4.
4564 * tst-barrier4.c: New file.
4566 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4567 (__pthread_cond_timedwait): Perform timeout test while holding
4568 internal lock to prevent wakeup race.
4569 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4570 * sysdeps/pthread/pthread_cond_timedwait.c
4571 (__pthread_cond_timedwait): Likewise.
4572 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4573 (__pthread_cond_timedwait): Likewise.
4575 2004-02-18 Jakub Jelinek <jakub@redhat.com>
4577 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4578 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4579 * Makefile (tests): Add tst-rwlock13.
4580 * tst-rwlock13.c: New test.
4582 2004-02-16 Ulrich Drepper <drepper@redhat.com>
4584 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4585 (__condvar_tw_cleanup): Little optimization.
4586 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4588 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
4590 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4591 libpthread as "lib" parameter to SHLIB_COMPAT.
4592 (__novmx_siglongjmp): Fix typo in function name.
4593 (__novmx_longjmp): Fix typo in function name.
4595 2004-02-13 Ulrich Drepper <drepper@redhat.com>
4597 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4600 * sysdeps/generic/pt-longjmp.c: Moved to...
4601 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
4603 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
4605 * Makefile (libpthread-routines): Add pt-cleanup.
4606 * pt-longjmp.c: Removed.
4607 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4608 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4609 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4610 Version longjmp, siglongjmp for GLIBC_2.3.4.
4611 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4613 2004-02-13 Ulrich Drepper <drepper@redhat.com>
4615 * sysdeps/pthread/pthread_cond_timedwait.c
4616 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
4617 Reuse code. Add __builtin_expects.
4619 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4620 (__pthread_cond_timedwait): Get internal lock in case timeout has
4621 passed before the futex syscall.
4622 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4624 2004-01-20 Ulrich Drepper <drepper@redhat.com>
4626 * allocatestack.c: Pretty printing.
4628 * sysdeps/pthread/createthread.c (create_thread): Don't add
4629 CLONE_DETACHED bit if it is not necessary.
4631 2004-01-16 Ulrich Drepper <drepper@redhat.com>
4633 * pthread_getattr_np.c: Include ldsodefs.h.
4635 2004-01-16 Richard Henderson <rth@redhat.com>
4637 * allocatestack.c: Don't declare __libc_stack_end.
4638 * init.c (__pthread_initialize_minimal_internal): Likewise.
4639 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
4641 2004-01-15 Richard Henderson <rth@redhat.com>
4643 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4644 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
4645 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
4646 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
4647 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
4648 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
4649 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
4650 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
4652 2004-01-14 Ulrich Drepper <drepper@redhat.com>
4654 * init.c (pthread_functions): Make array const.
4656 2004-01-13 Ulrich Drepper <drepper@redhat.com>
4658 * allocatestack.c (__make_stacks_executable): Change interface.
4659 Check parameters. Pass parameter on to libc counterpart.
4660 * pthreadP.h: Change declaration.
4662 2004-01-13 Richard Henderson <rth@redhat.com>
4664 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
4666 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
4669 * sysdeps/alpha/Makefile: New file.
4670 * sysdeps/alpha/tcb-offsets.sym: New file.
4671 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4672 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
4674 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
4677 2004-01-08 Jakub Jelinek <jakub@redhat.com>
4679 * Makefile (tests): Add tst-backtrace1.
4680 * tst-backtrace1.c: New test.
4682 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
4684 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
4685 register as second parameter to the REGISTER macro.
4686 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
4687 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
4688 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
4689 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
4690 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
4691 of thread register as second parameter to REGISTER macro in 64 case.
4693 2004-01-03 Ulrich Drepper <drepper@redhat.com>
4695 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
4696 (CFLAGS-getpid.o): Defined.
4697 (CFLAGS-getpid.os): Defined.
4699 2003-12-31 Ulrich Drepper <drepper@redhat.com>
4701 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
4702 returned for main thread does not overlap with any other VMA.
4703 Patch by Jakub Jelinek.
4705 2003-12-29 Jakub Jelinek <jakub@redhat.com>
4707 * tst-raise1.c: Include stdio.h.
4709 2003-12-23 Jakub Jelinek <jakub@redhat.com>
4711 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
4712 setting with __ASSUME_TGKILL || defined __NR_tgkill.
4713 If pid is 0, set it to selftid.
4714 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
4715 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
4716 != 0, return self->tid without doing a syscall.
4717 * descr.h (struct pthread): Move pid field after tid.
4719 * Makefile (tests): Add tst-raise1.
4720 * tst-raise1.c: New file.
4722 2003-12-23 Roland McGrath <roland@redhat.com>
4724 * tst-oddstacklimit.c: New file.
4725 * Makefile (tests): Add it.
4726 (tst-oddstacklimit-ENV): New variable.
4728 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
4729 value up to page size for __default_stacksize.
4731 2003-12-21 Ulrich Drepper <drepper@redhat.com>
4733 * Makefile (tests): Add tst-eintr5.
4734 * tst-eintr5.c: New file.
4736 * eintr.c (eintr_source): Prevent sending signal to self.
4738 * tst-eintr2.c (tf1): Improve error message.
4740 2003-12-20 Ulrich Drepper <drepper@redhat.com>
4742 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
4743 * sysdeps/unix/sysv/linux/getpid.c: New file.
4744 * pthread_cancel.c: Add comment explaining use of PID field.
4745 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4746 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
4747 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
4748 temporarily to signal the field must not be relied on and updated
4750 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
4751 temporarily negative.
4752 * sysdeps/unix/sysv/linux/raise.c: Likewise.
4754 2003-12-19 Ulrich Drepper <drepper@redhat.com>
4756 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
4757 (eintr_source): If ARG != NULL, use pthread_kill.
4758 * tst-eintr1.c: Adjust for this change.
4759 * tst-eintr2.c: Likewise.
4760 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
4761 * tst-eintr3.c: New file.
4762 * tst-eintr4.c: New file.
4764 2003-12-19 Jakub Jelinek <jakub@redhat.com>
4766 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
4767 if CANCELSTATE_BITMASK is set.
4768 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
4771 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
4772 (tests-reverse): Add tst-cancel23.
4773 * tst-cancel22.c: New test.
4774 * tst-cancel23.c: New test.
4776 2003-12-18 Ulrich Drepper <drepper@redhat.com>
4778 * tst-eintr1.c: Better error messages.
4780 * Makefile (tests): Add tst-eintr2.
4781 * tst-eintr2.c: New file.
4783 2003-12-18 Jakub Jelinek <jakub@redhat.com>
4785 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
4786 (CFLAGS-tst-cancelx21.c): Set.
4787 * tst-cancel21.c: New test.
4788 * tst-cancelx21.c: New test.
4790 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
4792 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
4793 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
4794 * pt-longjmp.c: Include jmpbuf-unwind.h.
4795 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
4796 _JMPBUF_UNWINDS. Adjust compared pointers.
4797 * init.c (__pthread_initialize_minimal_internal): Initialize
4798 pd->stackblock_size.
4799 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
4800 * sysdeps/alpha/jmpbuf-unwind.h: New file.
4801 * sysdeps/i386/jmpbuf-unwind.h: New file.
4802 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
4803 * sysdeps/s390/jmpbuf-unwind.h: New file.
4804 * sysdeps/sh/jmpbuf-unwind.h: New file.
4805 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
4806 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
4807 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
4808 (_JMPBUF_CFA_UNWINDS): Remove.
4809 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
4811 2003-12-12 Jakub Jelinek <jakub@redhat.com>
4813 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
4814 (CFLAGS-tst-cancelx20.c): Set.
4815 * tst-cancel20.c: New test.
4816 * tst-cancelx20.c: New test.
4818 2003-12-17 Ulrich Drepper <drepper@redhat.com>
4820 * init.c (__pthread_initialize_minimal_internal): Don't treat
4821 architectures with separate register stack special here when
4822 computing default stack size.
4824 2003-12-17 Roland McGrath <roland@redhat.com>
4826 * Makefile (tst-cancelx7-ARGS): New variable.
4827 Reportd by Greg Schafer <gschafer@zip.com.au>.
4829 2003-12-17 Jakub Jelinek <jakub@redhat.com>
4831 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
4832 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
4833 (tst-stack3-ENV): Set.
4834 ($(objpfx)tst-stack3-mem): New.
4835 * tst-stack3.c: New test.
4837 2003-12-10 David Mosberger <davidm@hpl.hp.com>
4839 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
4840 Add unwind directives. Drop unused .regstk directive.
4841 (_fini_EPILOG_BEGINS): Add unwind directives.
4843 2003-12-11 Ulrich Drepper <drepper@redhat.com>
4845 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4846 Assume parameter is a pointer.
4847 (lll_futex_wake): Likewise.
4848 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
4850 (lll_futex_wake): Likewise.
4851 Reported by Boris Hu.
4852 * sysdeps/unix/sysv/linux/unregister-atfork.c
4853 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
4855 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
4857 2003-12-10 Ulrich Drepper <drepper@redhat.com>
4859 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
4860 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
4861 __rtld_lock_initialize for ld.so lock.
4862 Patch in part by Adam Li <adam.li@intel.com>.
4864 2003-12-02 David Mosberger <davidm@hpl.hp.com>
4866 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
4867 in $(gnulib). Also, remove stale comment.
4869 2003-11-12 David Mosberger <davidm@hpl.hp.com>
4871 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
4872 advantage of new syscall stub and optimize accordingly.
4874 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
4875 from SYS_futex, to match expectations of
4876 sysdep.h:DO_INLINE_SYSCALL.
4877 (lll_futex_clobbers): Remove.
4878 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
4879 (lll_futex_wake): Likewise.
4880 (lll_futex_requeue): Likewise.
4881 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
4882 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
4884 (__lll_mutex_lock): Likewise.
4885 (__lll_mutex_cond_lock): Likewise.
4886 (__lll_mutex_timed_lock): Likewise.
4887 (__lll_mutex_unlock): Likewise.
4888 (__lll_mutex_unlock_force): Likewise.
4890 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
4891 comes before the include of <sysdep.h>.
4892 (THREAD_SELF_SYSINFO): New macro.
4893 (THREAD_SYSINFO): Likewise.
4894 (INIT_SYSINFO): New macro.
4895 (TLS_INIT_TP): Call INIT_SYSINFO.
4897 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
4899 * sysdeps/pthread/createthread.c (create_thread): Use
4900 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
4901 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
4902 THREAD_SELF_SYSINFO instead of open code.
4903 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
4904 (THREAD_SYSINFO): Likewise.
4906 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
4908 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
4910 2003-12-06 Ulrich Drepper <drepper@redhat.com>
4912 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
4913 instead of .init. Patch by David Mosberger.
4915 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
4917 * sysdeps/pthread/configure.in: Remove broken declaration in C
4918 cleanup handling check.
4920 2003-11-30 Andreas Jaeger <aj@suse.de>
4922 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
4923 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
4926 2003-11-27 Jakub Jelinek <jakub@redhat.com>
4928 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
4929 * pthread_attr_destroy.c: Include shlib-compat.h.
4930 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
4931 is set in iattr->flags.
4932 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
4934 2003-11-21 Jakub Jelinek <jakub@redhat.com>
4936 * Makefile (distribute): Add tst-cleanup4aux.c.
4938 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
4941 2003-11-21 Ulrich Drepper <drepper@redhat.com>
4943 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
4944 pthread_cond_signal.
4946 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
4947 store mutex address if the current value is ~0l.
4948 * sysdeps/pthread/pthread_cond_timedwait.c
4949 (__pthread_cond_timedwait): Likewise.
4950 * sysdeps/pthread/pthread_cond_broadcast.c
4951 (__pthread_cond_broadcast): Don't use requeue for pshared
4954 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4955 (__pthread_cond_wait): Don't store mutex address if the current
4957 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4958 (__pthread_cond_timedwait): Likewise.
4959 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4960 (__pthread_cond_broadcast): Don't use requeue for pshared
4963 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
4964 element with ~0l for pshared condvars, with NULL otherwise.
4966 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4967 (__pthread_cond_wait): Don't store mutex address if the current
4969 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4970 (__pthread_cond_timedwait): Likewise.
4971 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
4972 (__pthread_cond_broadcast): Don't use requeue for pshared
4975 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
4976 * tst-cond12.c: New file.
4977 * tst-cond13.c: New file.
4979 2003-11-17 Ulrich Drepper <drepper@redhat.com>
4981 * sysdeps/pthread/configure.in: Make missing forced unwind support
4984 2003-11-11 Ulrich Drepper <drepper@redhat.com>
4986 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
4988 2003-11-06 Ulrich Drepper <drepper@redhat.com>
4990 * Makefile: Add magic to clean up correctly.
4992 2003-11-05 Jakub Jelinek <jakub@redhat.com>
4994 * unwind.c (FRAME_LEFT): Define.
4995 (unwind_stop): Handle old style cleanups here.
4996 (__pthread_unwind): Handle old style cleanups only if
4997 !HAVE_FORCED_UNWIND.
4998 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
4999 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5000 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5001 ($(objpfx)tst-cleanupx4): Likewise.
5002 * tst-cleanup4.c: New test.
5003 * tst-cleanup4aux.c: New.
5004 * tst-cleanupx4.c: New test.
5006 2003-11-04 Ulrich Drepper <drepper@redhat.com>
5008 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5009 lll_mutex_*lock macros to skip atomic operations on some archs.
5011 2003-11-03 Ulrich Drepper <drepper@redhat.com>
5013 * sysdeps/pthread/tst-timer.c (main): Initialize
5014 sigev2.sigev_value as well.
5016 2003-10-15 Roland McGrath <roland@redhat.com>
5018 * sysdeps/pthread/configure.in: Barf if visibility attribute support
5020 * sysdeps/pthread/configure: Regenerated.
5022 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5024 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5025 locking macros. No distinction between normal and mutex locking
5027 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5028 Merge bits from lowlevelmutex.S we still need.
5029 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5030 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5031 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5032 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5033 new mutex implementation.
5034 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5035 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5036 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5037 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5038 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5039 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5040 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5041 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5042 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5043 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5044 symbol for entry point to avoid cancellation.
5046 2003-10-07 Jakub Jelinek <jakub@redhat.com>
5048 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5050 (SAVE_OLDTYPE_0): Fix a typo.
5052 2003-10-03 Ulrich Drepper <drepper@redhat.com>
5054 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5055 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
5057 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5059 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5062 2003-10-02 Jakub Jelinek <jakub@redhat.com>
5064 * Makefile (tests): Add tst-cancel19.
5065 * tst-cancel19.c: New test.
5067 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5069 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5070 restoring of the old cancellation type.
5072 2003-09-30 Jakub Jelinek <jakub@redhat.com>
5074 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5076 2003-09-27 Wolfram Gloger <wg@malloc.de>
5078 * sysdeps/pthread/malloc-machine.h: New file
5080 2003-09-24 Roland McGrath <roland@redhat.com>
5082 * allocatestack.c (__make_stacks_executable): Don't ignore return
5083 value from _dl_make_stack_executable.
5085 2003-09-24 Ulrich Drepper <drepper@redhat.com>
5087 * allocatestack.c (__make_stacks_executable): Also change
5088 permission of the currently unused stacks.
5090 * allocatestack.c (change_stack_perm): Split out from
5091 __make_stacks_executable.
5092 (allocate_stack): If the required permission changed between the time
5093 we started preparing the stack and queueing it, change the permission.
5094 (__make_stacks_executable): Call change_stack_perm.
5096 * Makefile: Build tst-execstack-mod locally.
5097 * tst-execstack-mod.c: New file.
5099 2003-09-23 Jakub Jelinek <jakub@redhat.com>
5101 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5103 2003-09-23 Roland McGrath <roland@redhat.com>
5105 * tst-execstack.c: New file.
5106 * Makefile (tests): Add it.
5107 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5108 (LDFLAGS-tst-execstack): New variable.
5110 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5111 whether to use PROT_EXEC for stack mmap.
5112 (__make_stacks_executable): New function.
5113 * pthreadP.h: Declare it.
5114 * init.c (__pthread_initialize_minimal_internal): Set
5115 GL(dl_make_stack_executable_hook) to that.
5117 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5119 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5120 recommendation from AMD re avoidance of lock prefix.
5122 2003-09-22 Jakub Jelinek <jakub@redhat.com>
5124 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5125 lll_futex_timed_wait instead of lll_futex_wait.
5126 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5127 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5128 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5129 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5130 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5131 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5132 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5133 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5134 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5135 Completely revamp the locking macros. No distinction between
5136 normal and mutex locking anymore.
5137 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5138 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5139 __lll_lock_timedwait): Fix prototypes.
5140 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5141 __lll_lock_timedwait): Likewise.
5142 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5143 macros, add __builtin_expect.
5144 (lll_mutex_timedlock): Likewise. Fix return value.
5145 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5146 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5147 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5148 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5149 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5150 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5151 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5152 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5154 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5156 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5157 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5158 operation if possible.
5160 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5161 like jumping over the lock prefix.
5163 2003-09-21 Ulrich Drepper <drepper@redhat.com>
5165 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5166 locking macros. No distinction between normal and mutex locking
5168 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5169 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5170 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5171 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5172 locking. Merge bits from lowlevelmutex.S we still need.
5173 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5174 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5175 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5176 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5177 * Makefile (routines): Remove libc-lowlevelmutex.
5178 (libpthread-rountines): Remove lowlevelmutex.
5179 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5180 for new mutex implementation.
5181 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5182 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5183 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5184 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5185 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5187 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5189 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5190 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5191 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5192 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5193 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5194 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5195 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5196 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5198 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5200 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5201 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5202 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5204 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5205 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5207 2003-09-20 Ulrich Drepper <drepper@redhat.com>
5209 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5210 in parameters of asm with output parameters.
5212 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5213 type of DECR parameter to int.
5214 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5216 2003-09-18 Jakub Jelinek <jakub@redhat.com>
5218 * tst-attr3.c (tf, do_test): Print stack start/end/size and
5219 guardsize for each thread.
5221 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5223 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5224 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5225 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5227 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5228 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5230 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5231 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5232 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5233 (pthread_getaffinity_np): Add hidden_def.
5235 * Makefile (tests): Add tst-attr3.
5236 * tst-attr3.c: New test.
5238 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5240 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5242 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5243 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5245 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5247 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5248 * tst-align.c: Include tst-stack-align.h.
5249 (tf, do_test): Use TEST_STACK_ALIGN macro.
5251 2003-09-17 Ulrich Drepper <drepper@redhat.com>
5253 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5256 2003-09-16 Ulrich Drepper <drepper@redhat.com>
5258 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5259 stack-related values for the initial thread.
5261 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5263 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5265 2003-09-11 Ulrich Drepper <drepper@redhat.com>
5267 * pthread_mutex_lock.c: Minor code rearrangements.
5269 2003-09-05 Roland McGrath <roland@redhat.com>
5271 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5272 Instead, include ../nptl_db/db_info.c to do its magic.
5273 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5274 (__pthread_pthread_key_2ndlevel_size): Likewise.
5275 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5276 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5277 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5278 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5279 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5280 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5281 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5282 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5283 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5284 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5285 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5286 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5287 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5288 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5289 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5290 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5291 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5293 2003-09-08 Ulrich Drepper <drepper@redhat.com>
5295 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5296 of pthread_t to be compatible with LT.
5297 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5298 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5299 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5300 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5301 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5302 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5303 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5305 2003-09-04 Ulrich Drepper <drepper@redhat.com>
5307 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5309 2003-09-04 Jakub Jelinek <jakub@redhat.com>
5311 * unwind-forcedunwind.c: Move to...
5312 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5313 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5314 * sysdeps/pthread/jmpbuf-unwind.h: New file.
5315 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5316 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5317 * unwind.c: Include jmpbuf-unwind.h.
5318 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5320 2003-09-02 Jakub Jelinek <jakub@redhat.com>
5322 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5323 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5324 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5325 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5326 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5327 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5328 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5329 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5330 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5331 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5332 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5334 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5335 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5336 * Makefile (tests): Add tst-stack2.
5337 * tst-stack2.c: New test.
5338 * tst-stack1.c: Include limits.h and sys/param.h.
5339 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5341 * pthread_condattr_setpshared.c: Include errno.h.
5342 (pthread_condattr_setpshared): Return EINVAL if pshared
5343 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5345 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5346 defined symbol for entry point to avoid cancellation.
5347 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5349 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5351 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5353 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5355 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5357 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5358 __close_nocancel, __read_nocancel, __write_nocancel,
5359 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
5360 libpthread.so or librt.so, define to corresponding function
5361 without _nocancel suffix.
5362 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5363 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5364 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5366 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5368 2003-09-02 Ulrich Drepper <drepper@redhat.com>
5370 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5371 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5373 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5374 in subsections has a symbol associated with it.
5376 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5377 defined symbol for entry point to avoid cancellation.
5378 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5380 2003-09-01 Jakub Jelinek <jakub@redhat.com>
5382 * Makefile (tests): Add tst-tls5.
5383 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5384 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5385 ($(objpfx)tst-tls5): New.
5386 ($(objpfx)tst-tls6.out): Likewise.
5387 (tests): Depend on $(objpfx)tst-tls6.out.
5388 * tst-tls3.c: Include stdint.h and pthreaddef.h.
5389 (do_test): Check pthread_self () return value alignment.
5390 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5391 (tf): Check pthread_self () return value alignment.
5392 * tst-tls5.c: New test.
5394 * tst-tls5mod.c: New.
5395 * tst-tls5moda.c: New.
5396 * tst-tls5modb.c: New.
5397 * tst-tls5modc.c: New.
5398 * tst-tls5modd.c: New.
5399 * tst-tls5mode.c: New.
5400 * tst-tls5modf.c: New.
5401 * tst-tls6.sh: New test.
5403 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5404 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5405 * init.c (pthread_functions): Initialize them.
5406 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5407 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5408 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5409 pthread_cond_timedwait@@GLIBC_2.3.2.
5411 2003-09-01 Jakub Jelinek <jakub@redhat.com>
5413 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5414 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5415 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5416 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5417 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5418 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5420 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5422 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5423 _POSIX_THREAD_PRIORITY_SCHEDULING.
5424 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5426 2003-08-31 Ulrich Drepper <drepper@redhat.com>
5428 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5429 nested function, use static inline function from libio.h.
5430 Code by Richard Henderson.
5432 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5435 2003-08-30 Jakub Jelinek <jakub@redhat.com>
5437 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5438 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5439 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5440 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5441 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5442 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5443 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5444 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5445 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5446 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5447 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5448 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5449 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5450 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5451 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5452 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5453 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5454 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5455 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5456 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5457 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5458 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5459 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5460 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5461 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5462 * sysdeps/sparc/tls.h: New file.
5463 * sysdeps/sparc/tcb-offsets.sym: New file.
5464 * sysdeps/sparc/Makefile: New file.
5465 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5466 * init.c [__sparc__] (__NR_set_tid_address): Define.
5468 2003-08-29 Jakub Jelinek <jakub@redhat.com>
5470 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5471 _IO_release_lock): Define.
5473 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
5475 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5476 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
5478 2003-08-27 Ulrich Drepper <drepper@redhat.com>
5480 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5481 (__pthread_cleanup_class): Add missing return types of member
5484 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
5486 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5487 (lll_mutex_unlock_force): Add memory barrier between store and futex
5490 2003-08-25 Ulrich Drepper <drepper@redhat.com>
5492 * tst-cancel4.c (do_test): Also unlink tempfname and remove
5493 tempmsg in first loop.
5495 2003-08-18 Ulrich Drepper <drepper@redhat.com>
5497 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5498 _POSIX_THREAD_PRIORITY_SCHEDULING.
5499 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5501 2003-08-07 Jakub Jelinek <jakub@redhat.com>
5503 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5504 (__rtld_lock_default_lock_recursive,
5505 __rtld_lock_default_unlock_recursive): Define.
5506 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5507 __rtld_lock_unlock_recursive): Define using
5508 GL(_dl_rtld_*lock_recursive).
5509 * init.c (__pthread_initialize_minimal_internal): Initialize
5510 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5511 Lock GL(_dl_load_lock) the same number of times as
5512 GL(_dl_load_lock) using non-mt implementation was nested.
5514 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5515 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5517 2003-08-06 Jakub Jelinek <jakub@redhat.com>
5519 * tst-cancel17.c (do_test): Make len2 maximum of page size and
5522 2003-08-07 Jakub Jelinek <jakub@redhat.com>
5524 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5526 2003-08-03 Jakub Jelinek <jakub@redhat.com>
5528 * sysdeps/pthread/createthread.c (do_clone): Move error handling
5529 to first syscall error check. Move syscall error check for tkill
5530 into __ASSUME_CLONE_STOPPED #ifdef.
5532 2003-08-02 Ulrich Drepper <drepper@redhat.com>
5534 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5535 is not defined, do explicit synchronization.
5536 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
5537 is not defined also unlock pd->lock for non-debugging case in case
5539 * pthread_create.c (start_thread): Always get and release pd->lock
5540 if __ASSUME_CLONE_STOPPED is not defined.
5541 (start_thread_debug): Removed. Adjust users.
5542 * allocatestack.c (allocate_stack): Always initialize lock if
5543 __ASSUME_CLONE_STOPPED is not defined.
5544 * Makefile (tests): Add tst-sched1.
5545 * tst-sched1.c: New file.
5547 * sysdeps/pthread/createthread.c (do_clone): Only use
5548 sched_setschduler and pass correct parameters.
5550 2003-07-31 Jakub Jelinek <jakub@redhat.com>
5552 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5553 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5554 PTHREAD_STACK_MIN in comments.
5556 2003-07-31 Jakub Jelinek <jakub@redhat.com>
5558 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5559 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5561 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5562 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5563 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5564 (__pthread_cleanup_upto): Fix prototype.
5565 (_longjmp_unwind): Adjust caller.
5566 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5567 Change second argument to const struct pointer.
5568 * tst-sem8.c (main): Remove unused s2 and s3 variables.
5569 * tst-sem9.c (main): Likewise.
5570 * unwind.c: Include string.h for strlen prototype.
5572 2003-07-31 Ulrich Drepper <drepper@redhat.com>
5574 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5575 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5576 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5578 Patch by Nicholas Miell <nmiell@attbi.com>.
5580 2003-07-30 Jakub Jelinek <jakub@redhat.com>
5582 * init.c (__pthread_initialize_minimal_internal): Initialize
5583 GL(dl_init_static_tls).
5584 * pthreadP.h (__pthread_init_static_tls): New prototype.
5585 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5587 * Makefile (tests): Add tst-tls4.
5588 (modules-names): Add tst-tls4moda and tst-tls4modb.
5589 ($(objpfx)tst-tls4): Link against libdl and libpthread.
5590 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5592 * tst-tls4.c: New file.
5593 * tst-tls4moda.c: New file.
5594 * tst-tls4modb.c: New file.
5596 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
5598 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5599 before __timer_dealloc.
5600 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5601 Don't call list_unlink.
5603 2003-07-29 Roland McGrath <roland@redhat.com>
5605 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5607 2003-07-25 Jakub Jelinek <jakub@redhat.com>
5609 * tst-cancel17.c (do_test): Check if aio_cancel failed.
5610 Don't reuse struct aiocb A if it failed.
5611 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5612 not just one byte, as that does not block.
5614 2003-07-22 Jakub Jelinek <jakub@redhat.com>
5616 * sysdeps/pthread/unwind-resume.c: New file.
5617 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5618 unwind-resume in csu subdir.
5619 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5621 (librt-sysdep_routines, librt-shared-only-routines): Add
5623 * sysdeps/pthread/rt-unwind-resume.c: New file.
5624 * unwind-forcedunwind.c: New file.
5625 * Makefile (libpthread-routines): Add unwind-forcedunwind.
5626 (libpthread-shared-only-routines): Likewise.
5627 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5628 * pthreadP.h (pthread_cancel_init): New prototype.
5629 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5631 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5632 attr argument const struct pthread_attr *.
5634 * res.c (__res_state): Return __resp.
5635 * descr.h: Include resolv.h.
5636 (struct pthread): Add res field.
5637 * pthread_create.c: Include resolv.h.
5638 (start_thread): Initialize __resp.
5639 * Makefile (tests): Add tst-_res1.
5640 (module-names): Add tst-_res1mod1, tst-_res1mod2.
5641 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
5642 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
5644 * tst-_res1.c: New file.
5645 * tst-_res1mod1.c: New file.
5646 * tst-_res1mod2.c: New file.
5648 2003-07-21 Ulrich Drepper <drepper@redhat.com>
5650 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
5652 * Makefile: Define various *-no-z-defs variables for test DSOs
5653 which has undefined symbols.
5655 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
5657 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5658 Retry if the stwcx fails to store once_control.
5660 2003-07-20 Ulrich Drepper <drepper@redhat.com>
5662 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
5663 pthread_attr_setaffinity.
5664 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
5665 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
5666 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
5667 * pthread_attr_destroy.c: Free cpuset element if allocated.
5668 * pthread_create.c: Pass iattr as additional parameter to
5670 * sysdeps/pthread/createthread.c: If attribute is provided and
5671 a new thread is created with affinity set or scheduling parameters,
5672 start thread with CLONE_STOPPED.
5673 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
5674 pthread_attr_setaffinity.
5675 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5678 2003-07-15 Ulrich Drepper <drepper@redhat.com>
5680 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
5682 2003-07-14 Ulrich Drepper <drepper@redhat.com>
5684 * sysdeps/pthread/configure.in: Require CFI directives also for
5687 2003-07-15 Jakub Jelinek <jakub@redhat.com>
5689 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5692 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5694 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
5696 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
5697 registers as variables. Call __pthread_mutex_unlock_usercnt.
5698 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5699 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
5700 not self pointer in __writer. Compare with TID to determine
5702 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5703 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
5705 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
5707 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
5708 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5709 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
5710 macros also when compiling librt.
5712 2003-07-11 Jakub Jelinek <jakub@redhat.com>
5714 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
5715 -fasynchronous-unwind-tables.
5716 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5717 (PSEUDO): Add cfi directives.
5718 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
5720 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5723 2003-07-08 Jakub Jelinek <jakub@redhat.com>
5725 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
5726 __pthread_unregister_cancel): Add prototypes and hidden_proto.
5727 * unwind.c (__pthread_unwind_next): Add hidden_def.
5728 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
5730 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5731 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5732 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5734 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
5735 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
5737 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
5738 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
5739 __pthread_unregister_cancel and __pthread_unwind_next.
5741 2003-07-04 Jakub Jelinek <jakub@redhat.com>
5743 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
5744 different symbol for the cancellation syscall wrapper and
5745 non-cancellation syscall wrapper.
5746 (PSEUDO_END): Define.
5748 2003-07-05 Richard Henderson <rth@redhat.com>
5750 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
5751 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
5752 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
5753 return actual return value from the syscall, not 0.
5755 2003-07-07 Ulrich Drepper <drepper@redhat.com>
5757 * descr.h (struct pthread): Add pid field.
5758 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
5759 (__reclaim_stacks): Likewise.
5760 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
5761 also check for PID of the signal source.
5762 (__pthread_initialize_minimal_internal): Also initialize pid field
5763 of initial thread's descriptor.
5764 * pthread_cancel.c: Use tgkill instead of tkill if possible.
5765 * sysdeps/unix/sysv/linux/fork.c: Likewise.
5766 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
5767 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5768 * sysdeps/unix/sysv/linux/raise.c: Likewise.
5770 2003-07-05 Ulrich Drepper <drepper@redhat.com>
5772 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
5773 Fix use of parameter.
5774 (__libc_cleanup_pop): Likewise.
5776 2003-07-04 Ulrich Drepper <drepper@redhat.com>
5778 * init.c (sigcancel_handler): Change parameters to match handler
5779 for SA_SIGACTION. Check signal number and code to recognize
5780 invalid invocations.
5782 2003-07-03 Roland McGrath <roland@redhat.com>
5784 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
5785 Apply sizeof (struct pthread) bias to r13 value.
5787 2003-07-03 Ulrich Drepper <drepper@redhat.com>
5789 * sysdeps/pthread/configure.in: Require CFI directives.
5791 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
5793 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
5794 libpthread compilation.
5795 * unwind.c (__pthread_unwind): Add hidden_def.
5796 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
5798 2003-07-01 Ulrich Drepper <drepper@redhat.com>
5800 * libc-cancellation.c (__libc_cleanup_routine): Define.
5801 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
5802 (__pthread_cleanup_pop): Define.
5804 2003-07-01 Richard Henderson <rth@redhat.com>
5806 * sysdeps/alpha/elf/pt-initfini.c: New file.
5807 * sysdeps/alpha/pthread_spin_lock.S: New file.
5808 * sysdeps/alpha/pthread_spin_trylock.S: New file.
5809 * sysdeps/alpha/pthreaddef.h: New file.
5810 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
5811 * sysdeps/alpha/tls.h: New file.
5812 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
5813 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
5814 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
5815 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
5816 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
5817 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
5818 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
5819 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
5820 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
5821 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
5823 2003-07-01 Ulrich Drepper <drepper@redhat.com>
5825 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
5826 cleanup support and unwind info.
5828 2003-06-30 Ulrich Drepper <drepper@redhat.com>
5830 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5831 Use correct cleanup handler registration. Add unwind info.
5832 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
5833 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
5834 * tst-once3.c: Add cleanup handler and check it is called.
5835 * tst-once4.c: Likewise.
5836 * tst-oncex3.c: New file.
5837 * tst-oncex4.c: New file.
5838 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
5840 2003-06-29 Ulrich Drepper <drepper@redhat.com>
5842 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
5844 2003-06-27 Ulrich Drepper <drepper@redhat.com>
5846 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
5847 (tf_msgsnd): Likewise.
5849 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
5850 premature returns a bit more.
5852 2003-06-26 Ulrich Drepper <drepper@redhat.com>
5854 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
5855 definition to the front.
5857 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
5858 the cleanup functions to make the names unique. Fix dwarf opcode
5860 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
5861 functions to make the names unique. Fix CFA offset for two blocks.
5863 2003-06-25 Ulrich Drepper <drepper@redhat.com>
5865 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
5866 missing closing braces.
5867 Patch by Christophe Saout <christophe@saout.de>.
5869 2003-06-24 Roland McGrath <roland@redhat.com>
5871 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
5873 2003-06-24 Ulrich Drepper <drepper@redhat.com>
5875 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
5876 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
5878 * pthreadP.h: Declare __find_thread_by_id.
5879 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
5880 * pthread_clock_gettime.c: Allow using other thread's clock.
5881 * pthread_clock_settime.c: Likewise.
5882 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
5883 * Makefile: Add rules to build and run tst-clock2.
5884 * tst-clock2.c: New file.
5886 2003-06-23 Ulrich Drepper <drepper@redhat.com>
5888 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
5889 to use exception-based cleanup handler.
5890 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5892 * tst-cond8.c (ch): Announce that we are done.
5894 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
5896 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
5897 Also test aio_suspend with timeout value.
5899 2003-06-22 Ulrich Drepper <drepper@redhat.com>
5901 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
5902 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
5905 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
5906 (__pthread_mutex_lock_internal): Likewise.
5907 (__pthread_mutex_unlock_internal): Likewise.
5908 (__pthread_mutex_unlock_usercnt): Declare.
5909 * pthread_mutex_destroy.c: Always fail if used in any way.
5910 * pthread_mutex_init.c: Update comment.
5911 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
5912 * pthread_mutex_timedlock.c: Adjust __nusers.
5913 * pthread_mutex_trylock.c: Adjust __nusers.
5914 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
5915 and public interfaces are wrapper with pass additional parameter.
5916 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
5918 * tst-mutex8.c: New file.
5919 * Makefile (tests): Add tst-mutex8.
5920 * sysdeps/pthread/pthread_cond_timedwait.c: Call
5921 __pthread_mutex_unlock_usercnt.
5922 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5923 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5924 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5925 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5926 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5927 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
5928 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5930 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5931 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5932 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5933 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5934 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5936 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
5937 * pthread_mutex_timedlock.c: Likewise.
5938 * pthread_mutex_trylock.c: Adjust __nusers.
5939 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
5940 * tst-mutex9.c: New file.
5941 * Makefile (tests): Add tst-mutex9.
5942 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
5943 * sysdeps/ia64/tls.h: Likewise.
5944 * sysdeps/powerpc/tls.h: Likewise.
5945 * sysdeps/s390/tls.h: Likewise.
5946 * sysdeps/sh/tls.h: Likewise.
5947 * sysdeps/x86_64/tls.h: Likewise.
5948 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5949 Change type of __owner.
5950 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5951 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5952 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5953 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5954 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5956 2003-06-19 Jakub Jelinek <jakub@redhat.com>
5958 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
5959 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
5961 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
5962 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
5963 instead of nr to lll_futex_wake. Only set errno and return -1
5966 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
5967 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
5968 return actual return value from the syscall, not 0.
5970 2003-06-18 Ulrich Drepper <drepper@redhat.com>
5972 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
5973 find a random value.
5974 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
5977 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
5978 compat_timer_settime.
5979 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
5980 compat_timer_gettime.
5981 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
5982 compat_timer_getoverrun.
5983 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
5984 compat_timer_delete.
5986 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
5987 error-checking mutex detect busy mutexes.
5989 2003-06-17 Ulrich Drepper <drepper@redhat.com>
5991 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
5992 Add ax to clobber list.
5993 (lll_mutex_cond_lock): Likewise.
5994 (lll_mutex_unlock): Likewise.
5995 (lll_lock): Likewise.
5996 (lll_unlock): Likewise.
5998 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
5999 * tst-cancel18.c: New file.
6000 * tst-cancelx18.c: New file.
6002 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6005 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6006 * tst-cancel17.c: New file.
6007 * tst-cancelx17.c: New file.
6009 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6010 * sysdeps/unix/sysv/linux/sigwait.c: New file.
6011 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6013 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6015 2003-06-16 Jakub Jelinek <jakub@redhat.com>
6017 * sysdeps/pthread/createthread.c (create_thread): Set
6018 header.multiple_threads unconditionally.
6019 * allocatestack.c (allocate_stack): Likewise.
6020 * descr.h (struct pthread): Add header.multiple_threads
6022 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6023 Define for librt. #error if neither libpthread, libc nor librt.
6024 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6026 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6027 CDISABLE): Likewise.
6028 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6029 CDISABLE): Likewise.
6030 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6031 CDISABLE): Likewise.
6032 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6033 CDISABLE): Likewise. Access header.multiple_threads outside of
6034 libc and libpthread.
6035 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6037 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6038 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6040 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6042 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6043 Also test early cancellation before the thread reaches the cancellation
6046 * Makefile: Compile forward.c with exceptions.
6048 * sysdeps/unix/sysv/linux/sleep.c: New file.
6050 2003-06-16 Ulrich Drepper <drepper@redhat.com>
6052 * Makefile: Add CFLAGS definition to compile function wrappers
6053 duplicated from libc with exceptions.
6054 * tst-cancel4.c: Also check cancellation handlers.
6056 * Makefile: Add rules to build and run tst-cancel16 and
6057 tst-cancelx16. Add missing CFLAGS definitions.
6058 * tst-cancel16.c: New file.
6059 * tst-cancelx16.c: New file.
6061 2003-06-15 Ulrich Drepper <drepper@redhat.com>
6063 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6064 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6065 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6066 (DL_SYSINFO_IMPLEMENTATION): Likewise.
6068 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6069 (LIBC_CANCEL_RESET): Likewise.
6070 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6071 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6073 (CFLAGS-libcrt-cancellation.c): Define.
6074 * sysdeps/pthread/librt-cancellation.c: New file.
6075 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6076 macros also when compiling librt.
6077 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6078 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6079 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6080 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6081 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6082 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6083 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6085 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6086 compat_timer_create.
6088 2003-06-14 Ulrich Drepper <drepper@redhat.com>
6090 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6092 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6094 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6095 Add libc_hidden_def.
6097 2003-06-13 Roland McGrath <roland@redhat.com>
6099 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6100 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6102 2003-06-11 Ulrich Drepper <drepper@redhat.com>
6104 * allocatestack.c (queue_stack): Always inline.
6105 * ptreadhP.h (__do_cancel): Likewise.
6107 2003-06-10 Jakub Jelinek <jakub@redhat.com>
6109 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6112 2003-06-10 Ulrich Drepper <drepper@redhat.com>
6114 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6115 (__pthread_cond_signal): Remove incorrect second addition for
6118 2003-06-09 Ulrich Drepper <drepper@redhat.com>
6120 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6121 (__pthread_cond_signal): Use correct futex pointer in
6122 __lll_mutex_lock_wait call.
6124 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6125 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6127 2003-06-08 Ulrich Drepper <drepper@redhat.com>
6129 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6131 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6134 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6135 hand-written CFI generation code. Since ENTRY/END also initiated
6136 CFI frames this caused two CFI sets to be generated.
6138 2003-06-07 Ulrich Drepper <drepper@redhat.com>
6140 * cleanup_routine.c: New file.
6141 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6142 * sysdeps/pthread/pthread.h: Add support for fully exception-based
6144 * Makefile (libpthread-routines): Add cleanup_routine.
6145 Add more CFLAGS variables to compile with exceptions. Add comments
6146 why which file needs unwind tables.
6147 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6149 * tst-cancelx1.c: New file.
6150 * tst-cancelx2.c: New file.
6151 * tst-cancelx3.c: New file.
6152 * tst-cancelx4.c: New file.
6153 * tst-cancelx5.c: New file.
6154 * tst-cancelx6.c: New file.
6155 * tst-cancelx7.c: New file.
6156 * tst-cancelx8.c: New file.
6157 * tst-cancelx9.c: New file.
6158 * tst-cancelx10.c: New file.
6159 * tst-cancelx11.c: New file.
6160 * tst-cancelx12.c: New file.
6161 * tst-cancelx13.c: New file.
6162 * tst-cancelx14.c: New file.
6163 * tst-cancelx15.c: New file.
6164 * tst-cleanupx0.c: New file.
6165 * tst-cleanupx0.expect: New file.
6166 * tst-cleanupx1.c: New file.
6167 * tst-cleanupx2.c: New file.
6168 * tst-cleanupx3.c: New file.
6170 * tst-cleanup0.c: Make standard compliant.
6171 * tst-cleanup1.c: Likewise.
6173 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6174 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6175 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6176 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6177 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6178 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6179 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6181 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6182 * tst-cancel12.c: New file.
6183 * tst-cancel13.c: New file.
6184 * tst-cancel14.c: New file.
6185 * tst-cancel15.c: New file.
6186 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6189 * tst-cancel1.c: Add some comments.
6191 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6194 2003-06-06 Ulrich Drepper <drepper@redhat.com>
6196 * Makefile (CFLAGS-pthread_cancel.c): Define.
6198 2003-06-05 Ulrich Drepper <drepper@redhat.com>
6200 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6201 Change type of __writer element to int.
6202 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6203 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6204 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6205 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6206 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6207 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6208 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6209 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6210 Compare with TID to determine deadlocks.
6211 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6212 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6213 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6214 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6215 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6216 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6218 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6220 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6221 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6222 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6224 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6226 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6227 * Makefile (tests): Add tst-rwlock12.
6228 * tst-rwlock12.c: New file.
6230 2003-06-05 Jakub Jelinek <jakub@redhat.com>
6232 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6233 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6234 Remove bogus hidden_proto.
6235 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6237 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6238 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6239 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6240 ___lll_mutex_timedlock): Likewise.
6242 2003-06-04 Ulrich Drepper <drepper@redhat.com>
6244 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6245 (__pthread_cond_signal): Add some code to eventually handle
6248 2003-06-01 Ulrich Drepper <drepper@redhat.com>
6250 * Makefile (tests): Add tst-exec4.
6251 (tst-exec4-ARGS): Define.
6252 * tst-exec4.c: New file.
6254 2003-05-31 Ulrich Drepper <drepper@redhat.com>
6256 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6257 Also fail if tv_nsec < 0.
6258 (__lll_timedwait_tid): Likewise.
6259 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6260 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6262 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6264 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6266 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6268 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6270 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6273 * Makefile (tests): Add tst-sem8 and tst-sem9.
6274 * tst-sem8.c: New file.
6275 * tst-sem9.c: New file.
6276 * sem_open.c: Fix creation of in_use record if the file exists but
6279 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6282 * sysdeps/pthread/timer_create.c (timer_create): In case
6283 evp==NULL, assign timer ID to sival_ptr.
6285 * descr.h (struct pthread_unwind_buf): Change type of prev element to
6286 struct pthread_unwind_buf *.
6287 (struct pthread): Likewise for cleanup_jmp_buf element.
6289 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6290 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6291 * unwind.c (__pthread_unwind_next): Likewise.
6293 2003-05-30 Ulrich Drepper <drepper@redhat.com>
6295 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6296 (lll_futex_timed_wait): Use int for futex value parameter.
6297 (lll_futex_wake): Likewise.
6298 (lll_futex_requeue): Likewise.
6300 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6301 Replace one memory operation with one register operation.
6303 * tst-join4.c (do_test): Fix error message.
6305 * tst-rwlock6.c (do_test): Use correct format specifier.
6307 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6308 (__lll_mutex_lock_wait): Replace one memory operation with one
6310 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6311 (__lll_mutex_lock_wait): Likewise.
6313 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6314 (__lll_mutex_cond_lock): Add one to value parameter of
6315 __lll_lock_wait to reflect reality in the futex syscall.
6316 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6317 (lll_mutex_cond_lock): Likewise.
6319 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6321 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6323 (lll_mutex_cond_lock): Define.
6325 2003-05-29 Ulrich Drepper <drepper@redhat.com>
6327 * Makefile (tests): Add tst-signal6.
6328 * tst-signal6.c: New file.
6330 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6331 (__lll_mutex_unlock_force): New function
6332 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6334 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6335 (__lll_mutex_unlock_force): New function.
6336 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6338 * tst-rwlock7.c (do_test): Use correct format specifier.
6340 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6341 Find break parameter in correct asm argument.
6343 2003-05-27 Jakub Jelinek <jakub@redhat.com>
6345 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6347 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6349 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6351 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6352 lll_futex_requeue, lll_mutex_unlock_force): Define.
6354 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6356 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6357 (pthread_cond_t): Add __mutex.
6358 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6359 lll_futex_requeue, lll_mutex_unlock_force): Define.
6361 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6363 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6364 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6366 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6368 (lll_futex_wait, lll_futex_wake): Define.
6369 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6370 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6371 FUTEX_REQUEUE instead of FUTEX_WAIT.
6372 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6373 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6374 mutex which was used in condvar structure. Call
6375 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6376 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6378 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6379 include tcb-offsets.h. Read wakeup value in locked region.
6380 Use the value of gbr register as THREAD_ID.
6381 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6382 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6383 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6385 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6388 2003-05-28 Ulrich Drepper <drepper@redhat.com>
6390 * sysdeps/pthread/pthread_cond_broadcast.c
6391 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6393 2003-05-26 Ulrich Drepper <drepper@redhat.com>
6395 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6396 typo in register name.
6397 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6398 correctly. Actually use requeue. Little optimization.
6399 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6400 mutex address early. Handle cancellation state as 32-bit value.
6401 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6402 Remove unnecessary label.
6404 2003-05-25 Ulrich Drepper <drepper@redhat.com>
6406 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6407 instead of FUTEX_WAIT.
6408 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6409 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6410 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6411 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6412 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6413 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6414 used in condvar structure. Call __pthread_mutex_cond_lock instead
6415 of __pthread_mutex_lock_internal.
6416 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6417 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6418 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6419 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6420 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6421 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6422 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6423 Add pthread_mutex_cond_lock.
6424 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6425 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6426 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6427 lll_mutex_cond_lock.
6428 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6429 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6430 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6432 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6433 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6435 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6436 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6438 * pthreadP.h: Declare __pthread_mutex_cond_lock.
6439 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6440 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
6441 macro don't define aliases.
6443 * cancellation.c: Remove __pthread_enable_asynccancel_2.
6444 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6445 * sysdeps/pthread/pthread_cond_timedwait.c: Use
6446 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6447 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6448 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6449 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6450 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6451 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6453 2003-05-17 Ulrich Drepper <drepper@redhat.com>
6455 * sem_open.c: Fix one endless loop. Implement correct semantics
6456 wrt opening the same semaphore more then once.
6457 * sem_close.c: Adjust for sem_open change.
6458 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
6459 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6460 * Makefile (tests): Add tst-sem7.
6461 * tst-sem7.c: New file.
6463 2003-05-16 Roland McGrath <roland@redhat.com>
6465 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6466 uninitialized variable braino.
6468 2003-05-16 Ulrich Drepper <drepper@redhat.com>
6470 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6471 test for syscall availability.
6473 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6474 __no_posix_timers to -1 if the syscalls don't exist.
6476 * pthread_join.c (pthread_join): Set tid field of the joined
6477 thread to -1. This isn't necessary but helps to recognize some
6478 error conditions with almost no cost.
6480 * allocatestack.c (FREE_P): Also negative values indicate an
6483 * unwind.c: Include <unistd.h>.
6485 2003-05-14 Ulrich Drepper <drepper@redhat.com>
6487 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6489 2003-05-14 Jakub Jelinek <jakub@redhat.com>
6491 * Makefile (crti-objs, crtn-objs): New variables.
6492 (omit-deps, extra-objs): Add crtn.
6493 ($(objpfx)libpthread.so): Depend on both crti and crtn
6494 and links to them in multidir.
6495 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6497 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
6499 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6500 (lll_mutex_unlock): Use atomic_exchange_rel.
6502 2003-05-11 Ulrich Drepper <drepper@redhat.com>
6504 * cond-perf.c (cons): Add missing locking around setting of alldone.
6506 2003-05-10 Ulrich Drepper <drepper@redhat.com>
6508 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6510 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6512 2003-05-09 Ulrich Drepper <drepper@redhat.com>
6514 * tst-sem6.c: New file.
6515 * Makefile (tests): Add tst-sem6.
6517 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6518 Use atomic_exchange_rel instead of atomic_exchange.
6519 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6522 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6523 code for lll_futex_wait and lll_futex_wake in static apps. Use
6524 vsyscall is possible.
6526 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6527 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6528 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6529 pthread_setaffinity_np.
6530 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6531 and pthread_setaffinity_np.
6532 * Makefile (libpthread-routines): Add pthread_getaffinity and
6533 pthread_setaffinity.
6535 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6536 use it in case mmap to allocate the stack fails.
6537 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6538 ARCH_MAP_FLAGS here.
6539 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6542 2003-05-08 Ulrich Drepper <drepper@redhat.com>
6544 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6545 handler implementation. It is now lockless in fork().
6546 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6547 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6548 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
6549 declare the __fork_*_lists.
6550 (struct fork_handler): Include pointers to all three functions.
6551 Add next, refcntr and need_signal elements.
6552 (__fork_handlers): New declaration.
6553 (__register_atfork_malloc): Remove declaration.
6554 (HAVE_register_atfork_malloc): Remove definition.
6555 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6556 __pthread_child_handler variable.
6557 (__libc_pthread_init): Use __register_atfork instead of explicitly
6559 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6561 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6563 * unwind.c (unwind_cleanup): Print error message and then abort. This
6564 function must never be reached.
6566 * cond-perf.c: New file.
6568 2003-05-05 Ulrich Drepper <drepper@redhat.com>
6570 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6572 2003-05-04 Roland McGrath <roland@redhat.com>
6574 * Makefile ($(objpfx)../libc.so): New target.
6576 2003-05-02 Ulrich Drepper <drepper@redhat.com>
6578 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6579 (pthread_condattr_t): Size is only an int, don't use long for
6581 (pthread_mutexattr_t): Likewise.
6582 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6583 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6584 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6586 2003-05-01 Ulrich Drepper <drepper@redhat.com>
6588 * sysdeps/i386/tls.h: Define THREAD_ID.
6589 * sysdeps/ia64/tls.h: Likewise.
6590 * sysdeps/powerpc/tls.h: Likewise.
6591 * sysdeps/s390/tls.h: Likewise.
6592 * sysdeps/sh/tls.h: Likewise.
6593 * sysdeps/x86_64/tls.h: Likewise.
6594 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6596 * pthread_mutex_timedlock.c: Likewise.
6597 * pthread_mutex_trylock.c: Likewise.
6598 * pthread_mutex_unlock.c: Likewise.
6599 * pthread_rwlock_trywrlock.c: Likewise.
6600 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6601 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6602 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6603 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6605 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6608 2003-04-29 Jakub Jelinek <jakub@redhat.com>
6610 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6611 (__SIZEOF_PTHREAD_COND_T): Define to 48.
6612 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6613 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6614 Make __align long long instead of long.
6615 (pthread_rwlock_t): Formatting.
6616 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6617 (pthread_rwlock_t): Formatting.
6618 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6619 (pthread_cond_t): Make __align long long instead of long.
6620 (pthread_rwlock_t): Move __flags field to the same position as in
6623 2003-04-30 Ulrich Drepper <drepper@redhat.com>
6625 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6626 * tst-rwlock7.c (do_test): Likewise.
6628 2003-04-26 Roland McGrath <roland@redhat.com>
6630 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6632 2003-04-22 Jakub Jelinek <jakub@redhat.com>
6634 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6635 sizeof (struct pthread).
6636 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
6638 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6640 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
6642 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
6644 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
6646 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
6648 (NO_TLS_OFFSET): Define.
6649 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
6650 add TLS_TCB_SIZE unnecessarily.
6652 2003-04-22 Roland McGrath <roland@redhat.com>
6654 * Makeconfig (shared-thread-library): Reverse link order to work
6657 2003-04-22 Ulrich Drepper <drepper@redhat.com>
6659 * semaphore.h: Fix typo in comment.
6661 2003-04-21 Ulrich Drepper <drepper@redhat.com>
6663 * sysdeps/pthread/sigfillset.c: New file.
6665 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
6666 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
6667 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
6668 * sysdeps/pthread/sigaction.c: Likewise.
6669 * sysdeps/pthread/sigprocmask.c: New file.
6670 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
6672 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6673 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
6676 2003-04-19 Ulrich Drepper <drepper@redhat.com>
6678 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6679 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
6681 * sysdeps/unix/sysv/linux/unregister-atfork.c
6682 (__unregister_atfork): Don't free memory not allocated dynamically.
6684 * semaphore.h: Remove __THROW marker from cancellation points.
6685 * nptl/sysdeps/pthread/pthread.h: Likewise.
6687 2003-04-18 Ulrich Drepper <drepper@redhat.com>
6689 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
6690 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
6693 2003-04-16 Jakub Jelinek <jakub@redhat.com>
6695 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
6697 2003-04-15 Roland McGrath <roland@redhat.com>
6699 * forward.c (__pthread_unwind): Tweak to avoid warning.
6701 2003-04-15 Ulrich Drepper <drepper@redhat.com>
6703 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
6705 2003-04-14 Ulrich Drepper <drepper@redhat.com>
6707 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
6708 overflow CFA advance instructions.
6709 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6711 2003-04-14 Jakub Jelinek <jakub@redhat.com>
6713 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
6714 * sysdeps/i386/pthread_spin_lock.c: Likewise.
6715 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
6718 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
6719 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
6720 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
6721 DW_CFA_advance_loc for .Laddl-.Lsubl.
6723 2003-04-13 Ulrich Drepper <drepper@redhat.com>
6725 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
6726 position-independent unwind data for static libraries.
6727 Add missing unwind info. Add comments.
6729 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
6730 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6731 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6732 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6734 2003-04-12 Ulrich Drepper <drepper@redhat.com>
6736 * Makefile: Make sure all cancellation points are compiled with
6737 exception and asynchronous unwind tables.
6739 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
6740 which mishandles loading of global object addresses in PIC.
6741 (THREAD_SETMEM_NC): Likewise.
6743 2003-04-11 Ulrich Drepper <drepper@redhat.com>
6745 * pthread.h: Define new data structure for cleanup buffer. Declare
6746 new cleanup handler interfaces.
6747 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
6748 (struct pthread): Add cleanup_jmp_buf pointer. Define
6749 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
6750 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
6751 it. Declare old cleanup handler installation functions.
6752 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
6754 * cleanup_defer.c: Likewise.
6755 * cleanup_compat.c: New file. Old cleanup code.
6756 * cleanup_def_compat.c: New file. Old cleanup code.
6757 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
6758 if own thread descriptor.
6759 * unwind.c: New file.
6760 * forward.c: Add __pthread_unwind.
6761 * init.c (pthread_functions): Add __pthread_unwind.
6762 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
6763 Add ptr___pthread_unwind.
6764 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
6765 and unwind function.
6766 * Makefile (libpthread-routines): Add cleanup_compat,
6767 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
6768 table generation if necessary.
6769 * version.c: Record whether unwind support is compiled in.
6770 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
6771 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
6773 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
6774 complication to generate unwind information for syscall wrappers.
6775 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6776 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
6777 __cleanup_fct_attribute.
6779 * Makefile: Add rules to build and run tst-cleanup0.
6780 * tst-cleanup0.c: New file.
6781 * tst-cleanup0.expect: New file.
6783 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
6784 caller. Optimize to avoid often unecessary local variable.
6786 2003-04-11 Roland McGrath <roland@redhat.com>
6788 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
6789 sets variable `multidir'; include that.
6790 (generated): Add it.
6791 ($(objpfx)$(multidir)/crti.o): New target.
6792 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
6794 2003-04-11 Ulrich Drepper <drepper@redhat.com>
6796 * tst-attr2.c (do_test): Add cast to avoid warning.
6797 * tst-mutex4.c (do_test): Likewise.
6799 2003-04-10 Ulrich Drepper <drepper@redhat.com>
6801 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
6804 2003-04-09 Ulrich Drepper <drepper@redhat.com>
6806 * Makefile (tests): Add tst-detach1.
6807 * tst-detach1.c: New file.
6809 2003-04-08 Ulrich Drepper <drepper@redhat.com>
6811 * sysdeps/pthread/pthread.h: Remove duplicate
6812 pthread_cleanup_{push,pop} definitions.
6814 * tst-barrier2.c: Eliminate warnings.
6815 * tst-cancel4.c: Likewise.
6816 * tst-cond4.c: Likewise.
6817 * tst-cond6.c: Likewise.
6818 * tst-detach1.c: Likewise.
6819 * tst-rwlock4.c: Likewise.
6820 * tst-rwlock6.c: Likewise.
6821 * tst-rwlock7.c: Likewise.
6822 * tst-sem3.c: Likewise.
6823 * tst-spin2.c: Likewise.
6824 * tst-umask1.c: Likewise.
6826 2003-04-07 Ulrich Drepper <drepper@redhat.com>
6828 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
6830 2003-04-06 Ulrich Drepper <drepper@redhat.com>
6832 * descr.h (struct pthread): Move cancelhandling member to the front.
6834 2003-04-05 Ulrich Drepper <drepper@redhat.com>
6836 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
6837 malloc_parent, and malloc_child statically.
6838 (__register_atfork_malloc): New function.
6839 (free_mem): Don't free any of the malloc_* variables on the list.
6840 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
6841 Define HAVE_register_atfork_malloc.
6843 2003-04-04 Ulrich Drepper <drepper@redhat.com>
6845 * sysdeps/pthread/createthread.c (create_thread): Add some more
6846 comments explaining when to set multiple_threads and when not.
6848 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
6849 THREAD_ATOMIC_BIT_SET if not already defined.
6850 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
6851 THREAD_ATOMIC_BIT_SET:
6852 * sysdeps/x86_64/tls.h: Likewise.
6853 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
6854 THREAD_ATOMIC_CMPXCHG_VAL.
6855 (_pthread_cleanup_pop_restore): Likewise.
6856 * cancellation.c (__pthread_enable_asynccancel): Likewise.
6857 (__pthread_enable_asynccancel_2): Likewise.
6858 (__pthread_disable_asynccancel): Likewise.
6859 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
6860 (__libc_disable_asynccancel): Likewise.
6861 * init.c (sigcancel_handler): Likewise.
6862 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
6863 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
6865 2003-04-03 Ulrich Drepper <drepper@redhat.com>
6867 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
6868 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
6869 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
6870 * Makefile (tests): Add tst-cancel11.
6871 * tst-cancel11.c: New file.
6873 2003-04-01 Ulrich Drepper <drepper@redhat.com>
6875 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
6876 round, not the first. Use specific_used flag instead of local
6877 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
6878 (__free_tcb): Don't call deallocate_tsd here.
6879 (start_thread): Call deallocate_tsd here.
6880 * pthread_setspecific.c: Set specific_used flag really only when
6882 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6883 * tst-tsd3.c: New file.
6884 * tst-tsd4.c: New file.
6886 2003-03-31 Ulrich Drepper <drepper@redhat.com>
6888 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
6889 Use atomic_exchange_and_add instead of __lll_add.
6890 (__lll_mutex_timedlock): Likewise.
6891 Patch by Ian Wienand.
6893 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
6895 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
6896 (SINGLE_THREAD_P): Fix typo.
6897 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
6899 2003-03-31 Ulrich Drepper <drepper@redhat.com>
6901 * Makefile (tests): Add tst-align.
6902 * tst-align.c: New file.
6903 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
6905 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
6908 * tst-tsd2.c: Add casts to avoid warnings.
6910 2003-03-30 Ulrich Drepper <drepper@redhat.com>
6912 * descr.h (struct pthread): Move most often used elements to the front.
6914 2003-03-29 Ulrich Drepper <drepper@redhat.com>
6916 * Makefile (libpthread-routines): Add pthread_atfork.
6917 (libpthread-static-only-routines): Add pthread_atfork.
6919 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6921 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
6923 (INSTALL_DTV): Add parens.
6924 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
6925 Use passed descr instead of THREAD_SELF.
6926 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
6927 (__lll_mutex_timedlock_wait): Correct expected value after
6929 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
6930 Release lock before waking up the waiters.
6931 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
6932 criteria. Reorderstruct passed to cleanup handler. Fix
6933 handling of cancellation and failung pthread_mutex_unlock call.
6934 Use __pthread_enable_asynccancel_2 instead of
6935 __pthread_enable_asynccancel.
6936 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6937 Return result of lock re-get if it fails.
6938 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
6939 for __pthread_cleanup_push.
6940 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
6941 completely broken rwlock implementation.
6942 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6943 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6944 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6945 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6946 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6947 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
6948 versioned_symbol macro.
6949 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
6950 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
6952 2003-03-27 Ulrich Drepper <drepper@redhat.com>
6954 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
6955 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
6957 (struct timer): Remove th and bar field.
6958 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
6959 debugging code. Create only one helper thread.
6960 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
6962 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6963 Renamed. Define statically. Use thread info from siginfo.
6964 (__helper_once): New variable.
6965 (__helper_tid): New variable.
6966 (__reset_helper_control): New function.
6967 (__start_helper_thread): New function.
6969 * pthread_create.c (start_thread): Don't use setjmp inside
6970 __builtin_expect to work around gcc bug.
6972 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
6973 timer_delete syscall fails, but not with ENOSYS, set
6976 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
6977 (timer_settime): Fix typo.
6978 * sysdeps/unix/sysv/linux/timer_getoverr.c
6979 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
6981 2003-03-27 Jakub Jelinek <jakub@redhat.com>
6983 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
6984 offset of cleanupbuf.__prev.
6986 2003-03-26 Jakub Jelinek <jakub@redhat.com>
6988 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
6991 2003-03-26 Ulrich Drepper <drepper@redhat.com>
6993 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
6994 NULL provide default definition to syscall.
6996 2003-03-25 Roland McGrath <roland@redhat.com>
6998 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
6999 (timer_id2ptr): Fix typo.
7001 2003-03-25 Ulrich Drepper <drepper@redhat.com>
7003 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7004 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7005 * sysdeps/ia64/pthreaddef.h: Likewise.
7006 * sysdeps/powerpc/pthreaddef.h: Likewise.
7007 * sysdeps/s390/pthreaddef.h: Likewise.
7008 * sysdeps/sh/pthreaddef.h: Likewise.
7009 * sysdeps/x86_64/pthreaddef.h: Likewise.
7010 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7011 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7013 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7014 SIGTIMER is not unblocked.
7015 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7017 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7019 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7020 pass pointer through as ID.
7021 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7022 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7023 * sysdeps/unix/sysv/linux/timer_create.c: New file.
7024 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7025 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7026 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7027 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7028 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7029 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7030 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7031 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7032 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7033 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7034 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7035 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7036 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7037 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7038 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7039 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7040 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7041 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7042 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7043 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7044 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7045 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7046 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7047 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7048 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7049 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7050 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7051 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7052 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7053 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7055 * pthreadP.h: Remove FRAME_LEFT definition.
7056 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7057 already left frame. Programs which have this problem are not POSIX
7059 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7061 2003-03-24 Ulrich Drepper <drepper@redhat.com>
7063 * sysdeps/pthread/tst-timer.c: Check return values of the
7066 2003-03-23 Roland McGrath <roland@redhat.com>
7068 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7069 * tst-tls3mod.c: Likewise.
7070 * tst-tls1.c: Likewise.
7071 * tst-tls2.c: Likewise.
7073 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7076 * tst-join5.c (tf1, tf2): Add a cast.
7078 * Makeconfig (includes): Append -I$(..)nptl to this variable.
7080 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7081 Don't test anything.
7082 * tst-cond4.c: Likewise.
7083 * tst-cond6.c: Likewise.
7084 * tst-flock2.c: Likewise.
7085 * tst-mutex4.c: Likewise.
7086 * tst-rwlock4.c: Likewise.
7087 * tst-signal1.c: Likewise.
7088 * tst-spin2.c: Likewise.
7089 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7091 * tst-mutex4.c: Use test-skeleton.c.
7092 * tst-spin2.c: Likewise.
7093 * tst-sysconf.c: Likewise.
7094 * tst-barrier2.c: Likewise.
7095 * tst-cond4.c: Likewise.
7096 * tst-cond6.c: Likewise.
7097 * tst-rwlock4.c: Likewise.
7098 * tst-unload.c: Likewise.
7099 * tst-flock2.c (do_test): Use return instead of exit.
7101 2003-03-22 Jakub Jelinek <jakub@redhat.com>
7103 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7105 2003-03-21 Ulrich Drepper <drepper@redhat.com>
7107 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7108 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7109 instead of __lll_compare_and_swap.
7110 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7112 Removed definition if __lll_compare_and_swap.
7114 * cancellation.c: Adjust for new form of compare&exchange macros.
7115 * cleanup_defer.c: Likewise.
7117 * libc-cancellation.c: Likewise.
7118 * old_pthread_cond_broadcast.c: Likewise.
7119 * old_pthread_cond_signal.c: Likewise.
7120 * old_pthread_cond_timedwait.c: Likewise.
7121 * old_pthread_cond_wait.c: Likewise.
7122 * pthread_cancel.c: Likewise.
7123 * pthread_create.c: Likewise.
7124 * pthread_detach.c: Likewise.
7125 * pthread_join.c: Likewise.
7126 * pthread_key_delete.c: Likewise.
7127 * pthread_setcancelstate.c: Likewise.
7128 * pthread_setcanceltype.c: Likewise.
7129 * pthread_timedjoin.c: Likewise.
7130 * pthread_tryjoin.c: Likewise.
7131 * sysdeps/pthread/createthread.c: Likewise.
7133 2003-03-20 Ulrich Drepper <drepper@redhat.com>
7135 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7136 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7137 definitions. Replace uses with calls to atomic_* functions.
7138 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7139 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7140 __lll_test_and_set calls with atomic_exchange_and_add and
7141 atomic_exchange calls respectively.
7142 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7143 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7144 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7145 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7146 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7147 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7148 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7150 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7151 returns the old value.
7153 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
7155 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7156 int for variable OLDVAL and correct inline assembler contraint.
7157 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7158 type int for variable OLD.
7160 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7162 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7163 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7164 instead of multiple_threads field in the TCB.
7166 2003-03-19 Ulrich Drepper <drepper@redhat.com>
7168 * sysdeps/i386/i686/bits/atomic.h: Removed.
7169 * sysdeps/i386/i586/bits/atomic.h: Removed.
7170 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
7171 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
7172 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
7173 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
7174 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
7175 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
7176 * atomic.h: Removed. Moved to glibc.
7178 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7179 support for clock selection.
7181 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7184 2003-03-18 Roland McGrath <roland@redhat.com>
7186 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7187 Add __lll_rel_instr first. Add memory clobber.
7188 (lll_mutex_unlock): Use __lll_test_and_set.
7189 From Paul Mackerras <paulus@samba.org>.
7191 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7193 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7194 (SINGLE_THREAD_P): Add `header.' prefix.
7195 From Paul Mackerras <paulus@samba.org>.
7197 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7198 pthread_timedjoin_np to ...
7199 (libpthread: GLIBC_2.3.3): ... here.
7200 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7202 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7203 Avoid shadowing VAL variable.
7205 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7208 2003-03-18 Ulrich Drepper <drepper@redhat.com>
7210 * Makefile (tests): Add tst-cond11.
7211 * tst-cond11.c: New file.
7213 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7214 struct passed to cleanup handler to eliminate one more
7216 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7218 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7219 (pthrad_cond_t): Replace __unused field with __clock.
7221 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7222 waken all waiters in cleanup handler.
7223 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7224 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7226 * pthread_condattr_getclock.c: New file.
7227 * pthread_condattr_setclock.c: New file.
7228 * sysdeps/pthread/pthread.h: Declare these new functions.
7229 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7230 * Makefile (libpthread-routines): Add the new functions.
7231 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7232 Renamed field to value. Document use of the bits.
7233 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7235 * pthread_condattr_setpshared.c: Likewise.
7236 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7237 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7238 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7240 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7241 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7242 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7243 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7244 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7245 Implement clock selection.
7246 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7247 * pthread-errnos.sym: Add ENOSYS.
7248 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7249 _POSIX_CLOCK_SELECTION.
7250 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7252 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7253 invalid .size directive.
7255 2003-03-17 Roland McGrath <roland@redhat.com>
7257 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7260 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7262 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7263 Use __lll_add instead of spelling it out. Use protected symbol names.
7264 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7266 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7267 Renamed from lll_compare_and_swap. Use new name where necessary.
7268 (__lll_add): Defined.
7269 (__lll_dec_if_positive): Defined.
7270 (__lll_test_and_set): Defined.
7271 * sysdeps/ia64/pthread_spin_init.c: Removed.
7272 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7273 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7274 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7275 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7276 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7277 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7278 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7279 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7280 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7281 __sync_lock_release_si.
7282 Patch by Jakub Jelinek.
7284 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7285 Fix timeout handling.
7286 (__lll_timedwait_tid): Likewise.
7287 (lll_unlock_wake_cb): Wake up other waiters if necessary.
7288 Patch by Jakub Jelinek.
7290 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7292 2003-03-17 Roland McGrath <roland@redhat.com>
7294 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7295 * sysdeps/pthread/pthread_spin_init.c: New file.
7296 * sysdeps/pthread/pthread_spin_unlock.c: New file.
7297 * sysdeps/powerpc/Makefile: New file.
7298 * sysdeps/powerpc/pthread_spin_lock.c: New file.
7299 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7300 * sysdeps/powerpc/pthreaddef.h: New file.
7301 * sysdeps/powerpc/tcb-offsets.sym: New file.
7302 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7303 * sysdeps/powerpc/tls.h: New file.
7304 * sysdeps/powerpc/bits/atomic.h: New file.
7305 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7306 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7307 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7309 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7310 * sysdeps/unix/sysv/linux/sem_post.c: New file.
7311 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7312 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7313 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7314 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7315 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7316 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7317 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7318 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7319 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7320 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7321 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7322 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7323 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7325 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7327 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7328 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7329 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7330 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7331 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7333 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7335 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7336 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7337 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7338 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7339 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7341 2003-03-16 Roland McGrath <roland@redhat.com>
7343 * tst-fork4.c: Include <string.h>.
7344 * tst-signal2.c: Likewise.
7345 * tst-mutex5.c (do_test): exit -> return.
7346 * tst-mutex2.c: Include <stdlib.h>.
7348 2003-03-16 Ulrich Drepper <drepper@redhat.com>
7350 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7351 (__lll_mutex_timedlock_wait): Correct expected value after
7352 spurious wakeup. Otherwise we would never wait again.
7354 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7355 zone versus inline asm stupidity. Use correct instructions.
7357 * tst-rwlock6.c: Add some more status output.
7359 2003-03-15 Roland McGrath <roland@redhat.com>
7361 * sysdeps/pthread/configure.in: New file.
7362 * sysdeps/pthread/configure: New file (generated).
7364 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7366 * allocatestack.c (allocate_stack): Store the exact stack size of
7367 user allocated stacks.
7369 2003-03-15 Jakub Jelinek <jakub@redhat.com>
7371 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7372 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7373 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7374 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7375 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7376 Use `header.' prefix.
7377 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7379 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7381 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7382 __builtin_frame_address, use stack pointer.
7384 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7385 instead of __builtin_frame_pointer.
7387 2003-03-14 Ulrich Drepper <drepper@redhat.com>
7389 * tst-basic1.c (do_test): Add cast to avoid warning.
7390 * tst-basic2.c (do_test): Likewise.
7392 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7393 amount of stack correction.
7395 * tst-fork4.c: Use test-skeleton.c.
7397 2003-03-14 Roland McGrath <roland@redhat.com>
7399 * init.c: Fix typo "#eli" for "#else".
7401 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
7403 * allocatestack.c (__stack_user): Use hidden_data_def.
7404 * pthread_create.c (__pthread_keys): Likewise.
7406 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7408 2003-03-14 Roland McGrath <roland@redhat.com>
7410 * tst-fork4.c: New file.
7411 * Makefile (tests): Add it.
7413 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7414 we always define the padding space.
7415 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7416 stopped supporting its own extensions fully.
7417 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7418 struct also called `header', so `header.multiple_threads' is the field
7419 name to use on all machines.
7420 * allocatestack.c (allocate_stack): Use `header.' prefix.
7421 * sysdeps/pthread/createthread.c (create_thread): Likewise.
7422 * pthread_create.c (__pthread_create_2_1): Likewise.
7423 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7424 (THREAD_SELF): Likewise.
7425 * sysdeps/x86_64/tls.h: Likewise.
7426 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7427 (SINGLE_THREAD_P): Likewise.
7428 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7429 (SINGLE_THREAD_P): Likewise.
7430 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7431 (SINGLE_THREAD_P): Likewise.
7433 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7436 2003-03-14 Ulrich Drepper <drepper@redhat.com>
7438 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7439 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7441 * pthread_create.c (start_thread): setjmp is expected to return 0.
7443 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7444 (THREAD_GETMEM_NC): Likewise.
7446 2003-03-13 Ulrich Drepper <drepper@redhat.com>
7448 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7449 and the size of the stack which must be allocated is a multiple,
7450 allocate one more page.
7451 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7452 MULTI_PAGE_ALIASING.
7454 2003-03-13 Roland McGrath <roland@redhat.com>
7456 * pthread_create.c (start_thread): Set EXITING_BIT after the
7457 event-reporting (and destructors), not before.
7459 2003-03-13 Jakub Jelinek <jakub@redhat.com>
7461 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7462 lll_futex_wake): Declare register variables as long int instead of
7463 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7464 Make syscall arguments clobbered by the syscall.
7465 (lll_futex_wait): Define using lll_futex_timed_wait.
7467 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7470 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7473 * allocatestack.c (nptl_ncreated): Only declare if
7474 COLORING_INCREMENT != 0.
7476 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7477 (__libc_enable_asynccancel_2): Remove prototype.
7479 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7480 ctid to match kernel.
7482 2003-03-12 Ulrich Drepper <drepper@redhat.com>
7484 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7485 libc_multiple_threads.
7486 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7487 __libc_multiple_threads to...
7488 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
7490 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7492 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7493 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7495 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7496 (__pthread_once_internal): Define.
7498 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7499 macros instead of .symver directly.
7500 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7501 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7503 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7504 * sysdeps/x86_64/tcb-offsets.sym: New file.
7505 * sysdeps/x86_64/Makefile: New file.
7507 * sysdeps/i386/tcb-offsets.sym: Add SELF.
7508 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7509 to access own pthread_t in TCB.
7510 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7512 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7514 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7516 2003-03-12 Roland McGrath <roland@redhat.com>
7518 * pthread-errnos.sym: New file.
7519 * Makefile (gen-as-const-headers): New variable, list that file.
7520 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7521 header <pthread-errnos.h> instead of defining errno values here.
7522 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7523 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7524 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7525 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7526 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7528 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7530 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7531 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7532 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7533 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7534 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7535 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7536 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7537 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7538 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7539 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7540 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7541 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7542 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7543 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7544 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7545 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7546 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7547 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7548 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7549 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7550 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7551 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7552 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7553 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7554 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7555 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7556 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7558 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7559 CLONE_CHILD_SETTID worked.
7561 2003-03-12 Ulrich Drepper <drepper@redhat.com>
7563 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7565 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7568 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7569 (pthread_cond_t): Add padding.
7571 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7572 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7573 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7575 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7576 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7577 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7578 (__pthread_rwlock_timedrdlock): Likewise.
7579 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7580 (__pthread_rwlock_wrlock): Likewise.
7581 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7582 (__pthread_rwlock_rdlock): Likewise.
7584 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7586 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7587 result of lock re-get if it fails.
7589 2003-03-11 Ulrich Drepper <drepper@redhat.com>
7591 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7592 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7593 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7594 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7595 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7596 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7597 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7598 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7599 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7600 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7602 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7603 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7605 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7606 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7607 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7608 (create_thread): Likewise.
7609 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7610 * init.c (__pthread_initialize_minimal_internal): Initialize
7611 __libc_multiple_threads_ptr if necessary.
7612 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
7613 __pthread_multiple_threads and __libc_multiple_threads_ptr.
7614 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7615 __libc_multiple_threads.
7616 (__libc_pthread_init): Return pointer to __libc_pthread_init if
7619 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7620 (THREAD_SETMEM_NC): Likewise.
7622 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7623 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7624 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7625 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7627 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7628 Eliminate one entire instruction.
7630 * cancellation.c (__pthread_enable_asynccancel_2): New function.
7631 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7632 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7633 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7634 instead of __pthread_enable_asynccancel.
7635 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7636 (__pthread_cond_wait): Likewise.
7637 * sysdeps/pthread/pthread_cond_timedwait.c
7638 (__pthread_cond_timedwait): Likewise.
7639 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7641 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7642 (__condvar_cleanup): Wake up all waiters in case we got signaled
7643 after being woken up but before disabling asynchronous
7645 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7646 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7647 (__condvar_cleanup): Likewise.
7649 * init.c (__NR_set_tid_address): If already defined, don't redefine.
7650 Make it an error if architecture has no #if case. Add x86-64.
7652 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
7653 pt-initfini.s generation.
7655 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
7656 (TLS_INIT_TP): Fix typo.
7658 2003-03-11 Jakub Jelinek <jakub@redhat.com>
7660 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
7661 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
7663 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
7664 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7665 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
7666 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
7667 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
7668 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7669 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7670 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7672 2003-03-11 Ulrich Drepper <drepper@redhat.com>
7674 * sysdeps/pthread/pthread_cond_timedwait.c
7675 (__pthread_cond_timedwait): Return the result of the final
7676 locking. If it succeeds, the regular function return value.
7678 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
7679 Return result of the final locking.
7680 * version.c (__nptl_main): Work around problems with the strange
7681 INTERNAL_SYSCALL macro on ppc32.
7682 * init.c (__pthread_initialize_minimal_internal): Unblock
7683 SIGCANCEL in case the parent blocked it.
7684 Reported by Paul Mackerras <paulus@samba.org>.
7686 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
7687 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
7688 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
7690 2003-03-11 Jakub Jelinek <jakub@redhat.com>
7692 * sysdeps/pthread/pthread_cond_timedwait.c
7693 (__pthread_cond_timedwait): Unlock and fail if
7694 __pthread_mutex_unlock_internal failed.
7696 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
7697 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
7699 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
7700 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
7701 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
7702 ALLOCATE_STACK): New macros.
7703 (TLS_TPADJ): New macro.
7704 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
7705 (allocate_stack): Handle TLS_DTV_AT_TP and
7706 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
7707 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
7709 * init.c [__ia64__] (__NR_set_tid_address): Define.
7711 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
7712 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
7713 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
7714 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
7715 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
7716 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
7717 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
7718 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
7719 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
7720 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
7721 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
7722 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
7723 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
7724 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
7725 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
7726 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
7727 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
7728 * sysdeps/ia64/bits/atomic.h: New file.
7729 * sysdeps/ia64/Makefile: New file.
7730 * sysdeps/ia64/pthread_spin_init.c: New file.
7731 * sysdeps/ia64/pthread_spin_lock.c: New file.
7732 * sysdeps/ia64/pthread_spin_trylock.c: New file.
7733 * sysdeps/ia64/pthread_spin_unlock.c: New file.
7734 * sysdeps/ia64/pthreaddef.h: New file.
7735 * sysdeps/ia64/tcb-offsets.sym: New file.
7736 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
7737 * sysdeps/ia64/tls.h: New file.
7739 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
7740 to syscall instead of no arguments.
7742 2003-03-10 Ulrich Drepper <drepper@redhat.com>
7744 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
7745 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
7746 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
7747 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
7749 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
7752 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
7754 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
7755 lowlevelbarrier.sym.
7756 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
7757 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
7758 Include lowlevelbarrier.h and don't define offsets locally.
7759 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
7761 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
7762 (__lll_mutex_lock_wait): Reverse order of first two parameters.
7763 (__lll_mutex_timedlock_wait): Likewise.
7764 (lll_mutex_lock): Adjust asm for that.
7765 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
7766 (lll_lock): Adjust asm for operand order change.
7767 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
7768 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
7770 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
7771 Reverse order of parameters.
7772 (__lll_timedwait_tid): Remove regparms attribute.
7773 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
7774 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
7776 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7777 (__lll_timedwait_tid): Remove one unnecessary instruction.
7779 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
7780 __lll_mutex_timedlock_wait only for NOT_IN_libc.
7781 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
7784 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
7785 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
7787 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
7790 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
7791 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
7793 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
7794 define LOCK here (if UP is not defined). The actual code is in
7797 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
7798 LOCK is already defined. Don't define lll_unlock_wake_cb and
7799 __lll_timedwait_tid for libc.so.
7800 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
7801 define LOCK here (if UP is not defined). The actual code is in
7804 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
7805 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
7806 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
7807 instead of lowlevelsem.h.
7808 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7809 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7810 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7812 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
7814 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
7815 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
7816 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
7818 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
7820 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
7823 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
7825 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
7826 of __libc_locking_needed.
7827 (lll_trylock): Initialize %eax to zero.
7829 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
7830 pthread_cond_t definition.
7832 2003-03-10 Roland McGrath <roland@redhat.com>
7834 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
7835 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
7836 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
7837 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
7838 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
7840 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
7841 Instead of setting PD->multiple_threads, set globals
7842 __pthread_multiple_threads and __libc_multiple_threads.
7843 * sysdeps/pthread/createthread.c (create_thread): Likewise.
7844 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
7845 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
7847 * descr.h (struct pthread): Conditionalize first member on
7848 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
7849 containing an anonymous tcbhead_t. Move `list' member out.
7850 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
7851 * allocatestack.c: Remove use of `header.data.' prefix.
7852 * pthread_create.c: Likewise.
7853 * init.c (__pthread_initialize_minimal_internal): Likewise.
7854 * sysdeps/pthread/createthread.c (create_thread): Likewise.
7855 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
7856 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
7857 * sysdeps/x86_64/tls.h: Likewise.
7858 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7859 (SINGLE_THREAD_P): Likewise.
7860 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7861 (SINGLE_THREAD_P): Likewise.
7862 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
7863 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
7865 2003-03-09 Ulrich Drepper <drepper@redhat.com>
7867 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
7869 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
7870 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7872 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
7873 leftovers from the ia32 code.
7875 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
7877 (clear_once_control): Don't load %esi.
7879 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
7882 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7884 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
7885 * sysdeps/unix/sysv/linux/createthread.c: ...here.
7887 * Makefile (tests): Add tst-cond10.
7888 * tst-cond10.c: New file.
7890 2003-03-08 Ulrich Drepper <drepper@redhat.com>
7892 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
7893 * tst-signal3.c (do_test): Likewise.
7894 * tst-sem5.c (do_test): Likewise.
7895 * tst-kill6.c (do_test): Likewise.
7896 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
7898 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
7900 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
7901 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
7902 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7903 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7904 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7905 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7906 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7908 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7910 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7911 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7912 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7913 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7914 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7915 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
7916 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7917 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7919 * allocatestack.c (allocate_stack): If mprotect() fails free the
7922 2003-03-07 Ulrich Drepper <drepper@redhat.com>
7924 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
7926 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
7927 lll_wake_tid. This was used only to work around kernel limits in
7929 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
7930 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
7931 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7932 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
7934 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
7935 (__pthread_initialize_minimal_internal): Change initialization of
7936 __static_tls_align_m1 appropriately.
7937 * pthreadP.h (__static_tls_align_m1): Renamed from
7939 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
7940 instead of __static_tls_align-1.
7942 2003-03-04 Ulrich Drepper <drepper@redhat.com>
7944 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
7946 * pthread_create.c: Define __pthread_keys using nocommon
7947 attribute, not by placing it explicitly in bss.
7948 Remove DEFINE_DEALLOC definition. Not needed anymore.
7950 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
7951 Use it in mmap call to allocate stacks.
7953 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
7955 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
7956 result of the thread function.
7958 2003-03-03 Ulrich Drepper <drepper@redhat.com>
7960 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
7961 version is just fine.
7963 * sysdeps/unix/sysv/linux/libc_pthread_init.c
7964 (__pthread_child_handler): Renamed from pthread_child_handler,
7965 exported, and marked hidden. Change all users.
7966 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
7967 free __pthread_child_handler from child list.
7969 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
7971 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
7973 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7974 Fix handling of cancellation and failing pthread_mutex_unlock call.
7975 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7976 (__pthread_cond_wait): Likewise.
7978 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
7979 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
7980 lll_futex_timed_wait call.
7981 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
7982 (pthread_rwlock_timedwrlock): Likewise.
7984 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7985 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
7986 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
7988 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
7989 check of lll_futex_wake return value.
7991 2003-03-03 Roland McGrath <roland@redhat.com>
7993 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
7995 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
7996 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
7997 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
7999 2003-03-02 Ulrich Drepper <drepper@redhat.com>
8001 * sysdeps/pthread/timer_create.c (timer_create): Return correct
8002 error for CPU clocks.
8004 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8005 _POSIX_MONOTONIC_CLOCK.
8006 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8008 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8011 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8013 * descr.h (struct pthread): Move cleanup field to the front.
8015 2003-03-01 Roland McGrath <roland@redhat.com>
8017 * sem_open.c (sem_open): Braino fix.
8019 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8021 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8022 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8023 __pthread_cleanup_pop functionality.
8024 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8026 * descr.h (struct pthread): Move tid field to the front now that
8029 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8030 (__lll_mutex_timedlock_wait): Remove.
8031 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8032 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8033 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8034 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8035 (lll_unlock_wake_cb): Don't save and restore %esi.
8036 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8038 (__lll_timedwait_tid): Add alignment.
8039 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8040 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8042 (__lll_timedwait_tid): Removed.
8043 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8044 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8045 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8046 (pthread_barrier_wait): Don't save, load, and restore %esi for
8048 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8049 (__pthread_cond_signal): Don't save, load, and restore %esi.
8050 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8051 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8052 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8053 Don't save, load, and restore %esi.
8055 2003-02-27 Ulrich Drepper <drepper@redhat.com>
8057 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8058 Release lock before waking up the waiters.
8060 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8062 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8063 (reader_thread): Likewise.
8065 * sysdeps/pthread/pthread_rwlock_unlock.c
8066 (__pthread_rwlock_unlock): Release internal lock early. Don't try
8067 to wake up readers if there are none.
8069 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8070 Release internal lock before wake threads.
8072 2003-02-26 Ulrich Drepper <drepper@redhat.com>
8074 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8075 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
8077 * tst-rwlock9.c: Likewise.
8078 * tst-rwlock10.c: New file.
8079 * tst-rwlock11.c: New file.
8081 * Makefile (tests): Add tst-dlsym1.
8082 * tst-dlsym1.c: New file.
8084 * init.c (__pthread_initialize_minimal_internal): Set
8085 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8086 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8088 2003-02-24 Ulrich Drepper <drepper@redhat.com>
8090 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8092 * tst-cond2.c: Fix sychronization with child.
8094 * tst-rwlock8.c (reader_thread): Remove unused variable.
8096 * Makefile: Add rules to build and run tst-tls3.
8097 * tst-tls3.c: New file.
8098 * tst-tls3mod.c: New file.
8100 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8101 * tst-rwlock8.c: New file.
8102 * tst-rwlock9.c: New file.
8103 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8104 complete broken rwlock implementation.
8105 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8107 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8109 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8110 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8111 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8112 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8113 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8114 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8115 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8117 2003-02-23 Roland McGrath <roland@redhat.com>
8119 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8121 2003-02-23 Ulrich Drepper <drepper@redhat.com>
8123 * Makefile (tests): Add tst-context1.
8124 * tst-context1.c: New file.
8126 * Makefile (tests): Add tst-tls1 and tst-tls2.
8127 * tst-tls1.c: New file.
8128 * tst-tls2.c: New file.
8130 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8133 * pthread_create.c (start_thread): Set EXITING_BIT early.
8135 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8136 (THREAD_GETMEM_NC): Likewise.
8138 2003-02-22 Ulrich Drepper <drepper@redhat.com>
8140 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8141 off 3 more bytes by using offset-less instructions when possible.
8143 * Makefile: Add dependency for $(objpfx)version.d.
8145 * eintr.c (eintr_source): Add unnecessary return but the compiler
8148 * tst-kill3.c: Include <unistd.h>.
8150 2003-02-21 Roland McGrath <roland@redhat.com>
8152 * pthread_create.c (start_thread): Call __libc_thread_freeres.
8154 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8156 * Makefile (tests): Add tst-eintr1.
8157 (distribute): Add eintr.c.
8158 * tst-eintr1.c: New file.
8159 * eintr.c: New file.
8161 * pthread_cancel.c (pthread_cancel): Use tkill directly.
8163 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8164 Disallow sending SIGCANCEL.
8166 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
8167 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8168 * tst-kill1.c: New file.
8169 * tst-kill2.c: New file.
8170 * tst-kill3.c: New file.
8171 * tst-kill5.c: New file.
8172 * tst-kill6.c: New file.
8173 * tst-basic7.c: Renamed to...
8174 * tst-kill4.c: ...this.
8176 2003-02-21 Roland McGrath <roland@redhat.com>
8178 * Makefile (install-lib-ldscripts): New variable.
8180 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8182 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8183 * pthread_cancel.c: Use INVALID_TD_P.
8184 * pthread_detach.c: Likewise.
8185 * pthread_getschedparam.c: Likewise.
8186 * pthread_setschedparam.c: Likewise.
8187 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8188 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8189 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8190 * pthread_timedjoin.c: Likewise.
8192 * tst-basic7.c: Include <signal.h>.
8194 * pthread_join.c (pthread_join): Limited checking for invalid
8196 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8198 2003-02-20 Ulrich Drepper <drepper@redhat.com>
8200 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8201 beginning of the loop. Clear the entire first block of TSD.
8202 * Makefile (tests): Add tst-key4.
8203 * tst-key4.c: New file.
8205 2003-02-18 Ulrich Drepper <drepper@redhat.com>
8207 * Makefile (tests): Add tst-basic7.
8208 * tst-basic7.c: New file.
8210 * pthread_create.c (deallocate_tsd): Mark as internal_function.
8211 Add some more __builtin_expect.
8213 * pthreadP.h: Define dummy version of DEBUGGING_P.
8215 2003-02-17 Ulrich Drepper <drepper@redhat.com>
8217 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8218 _POSIX_THREAD_PRIORITY_SCHEDULING.
8219 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8220 _XOPEN_REALTIME_THREADS.
8221 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8223 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8224 kernel returns EINVAL for PID <= 0, work around it.
8226 * Makefile (tests): Add tst-signal5.
8227 * tst-signal5.c: New file.
8229 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8232 * tst-cancel1.c (tf): Block all signals.
8234 * Makefile (tests): Add tst-basic6.
8235 * tst-basic6.c: New file.
8237 * tst-basic1.c: Add test for process ID.
8239 * Makefile (tests): Add tst-cancel10.
8240 * tst-cancel10.c: New file.
8242 * Makefile (tests): Add tst-signal4.
8243 * tst-signal4.c: New file.
8245 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8246 __sigismember instead of sigismember. Add __builtin_expect.
8248 2003-02-16 Ulrich Drepper <drepper@redhat.com>
8250 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8251 pthread_setcancelstate, and pthread_rwlock_setpshared.
8253 * tst-cancel7.c (do_test): Make sure the pid file exists before
8254 canceling the thread.
8256 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8257 pthread_rwlock_timedrdlock tests.
8258 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8259 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8260 Check for invalid tv_nsec field.
8261 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8264 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8265 recursive mutex of overflow.
8267 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8269 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8270 going into an endless loop.
8271 * Makefile (tests): Add tst-cancel9.
8272 * tst-cancel9.c: New file.
8274 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8276 2003-02-15 Ulrich Drepper <drepper@redhat.com>
8278 * tst-mutex5.c (do_test): Add more timedlock tests.
8280 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8281 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8283 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8284 use INLINE_SYSCALL. Error number is returned, not -1.
8286 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8287 and __deallocate_stack with internal_function.
8288 * pthread_create.c: Adjust definitions appropriately.
8289 * allocatestack.c: Likewise.
8291 * pthread_join.c: Add one more __builtin_expect.
8292 * pthread_timedjoin.c: Likewise.
8294 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8295 not data of sequence number does not match.
8296 Add one __builtin_expect.
8298 * Makefile (tests): Add tst-clock1.
8299 * tst-clock1.c: New file.
8301 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8303 * Makefile (tests): Add tst-basic5.
8304 * tst-basic5.c: New file.
8306 2003-02-14 Ulrich Drepper <drepper@redhat.com>
8308 * Makefile (tests): Add tst-basic4.
8309 * tst-basic4.c: New file.
8311 * pthreadP.h: Add declaraction for __nptl_nthreads.
8312 * pthread_create.c: Define __nptl_nthreads
8313 (start_thread): Increment __nptl_nthreads at beginning. Decrement
8314 after thread is done. If then zero, call exit(0).
8315 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8316 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
8317 * init.c (pthread_functions): Initialize ptr_nthreads.
8318 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8319 (__reclaim_stacks): Decrement __nptl_nthreads.
8320 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8322 * Makefile (tests): Add tst-basic3.
8323 * tst-basic3.c: New file.
8325 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
8326 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
8327 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8328 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
8329 if asynchronous canceling is enabled.
8330 * pthread_join.c (pthread_join): When recognizing circular joins,
8331 take into account the other thread might be already canceled.
8332 * Makefile (tests): Add tst-join5.
8333 * tst-join5.c: New file.
8335 * Makefile (tests): Add tst-join4.
8336 * tst-join4.c: New file.
8338 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8340 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8342 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
8344 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8345 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8346 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8348 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8350 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8351 error if lll_futex_wake failed.
8353 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8355 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8356 handling of cancellation and failung pthread_mutex_unlock call.
8357 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8358 * Makefile (tests): Add tst-cond8 and tst-cond9.
8359 * tst-cond8.c: New file.
8360 * tst-cond9.c: New file.
8362 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8364 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
8365 non-standard initializers with __USE_GNU.
8367 * Makefile (tests): Add tst-cleanup3.
8368 * tst-cleanup3.c: New file.
8370 2003-02-12 Ulrich Drepper <drepper@redhat.com>
8372 * Makefile (tests): Add tst-attr1 and tst-attr2.
8373 * tst-attr1.c: New file.
8374 * tst-attr2.c: New file.
8376 * Makefile: Add rules to build and run tst-atfork2 test.
8377 * tst-atfork2.c: New file.
8378 * tst-atfork2mod.c: New file.
8380 * sysdeps/unix/sysv/linux/unregister-atfork.c
8381 (__unregister_atfork): Free the memory allocated for the handlers
8382 after removing them from the lists.
8384 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8387 * tst-atfork1.c (do_test): Wait for the child we forked.
8388 Report error in child.
8390 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8392 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8394 2003-02-10 Ulrich Drepper <drepper@redhat.com>
8396 * Makefile (tests): Add tst-cancel8.
8397 * tst-cancel8.c: New file.
8399 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8400 clearing of control variable.
8401 * Makefile (tests): Add tst-once3 and tst-once4.
8402 * tst-once3.c: New file.
8403 * tst-once4.c: New file.
8405 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
8407 * sysdeps/sh/Makefile: New file.
8408 * sysdeps/sh/bits/atomic.h: New file.
8409 * sysdeps/sh/pthread_spin_init.c: New file.
8410 * sysdeps/sh/pthread_spin_lock.c: New file.
8411 * sysdeps/sh/pthread_spin_trylock.S: New file.
8412 * sysdeps/sh/pthread_spin_unlock.S: New file.
8413 * sysdeps/sh/pthreaddef.h: New file.
8414 * sysdeps/sh/tcb-offsets.sym: New file.
8415 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8416 * sysdeps/sh/tls.h: New file.
8417 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8418 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8419 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8420 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8421 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8422 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8423 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8424 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8425 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8426 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8427 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8428 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8429 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8430 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8431 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8432 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8433 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8434 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8435 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8436 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8437 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8438 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8439 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8440 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8441 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8442 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8443 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8444 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8445 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8446 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8448 2003-02-08 Ulrich Drepper <drepper@redhat.com>
8450 * tst-cond2.c: Rearrange code to not rely on behavior undefined
8453 * tst-basic2.c (do_test): Lock mutex before creating the thread.
8455 2003-02-07 Ulrich Drepper <drepper@redhat.com>
8457 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8458 (TLS_GET_FS): New #define.
8459 (TLS_SET_FS): New #define.
8460 Correct value of __NR_set_thread_area.
8462 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8464 2003-02-06 Ulrich Drepper <drepper@redhat.com>
8466 * Makefile (tests): Add tst-popen1.
8467 * tst-popen1.c: New file.
8469 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8470 but inactive generalization.
8471 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8472 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8473 Minor optimization, remove one instruction.
8474 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8476 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
8478 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8480 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
8482 * init.c (__NR_set_tid_address): Add #ifdef for s390.
8483 * sysdeps/pthread/pthread_barrier_wait.c: New file.
8484 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8485 * sysdeps/pthread/pthread_cond_signal.c: New file.
8486 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8487 * sysdeps/pthread/pthread_cond_wait.c: New file.
8488 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8489 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8490 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8491 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8492 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8493 * sysdeps/s390/Makefile: New file.
8494 * sysdeps/s390/bits/atomic.h: New file.
8495 * sysdeps/s390/pthread_spin_init.c: New file.
8496 * sysdeps/s390/pthread_spin_lock.c: New file.
8497 * sysdeps/s390/pthread_spin_trylock.c: New file.
8498 * sysdeps/s390/pthread_spin_unlock.c: New file.
8499 * sysdeps/s390/pthreaddef.h: New file.
8500 * sysdeps/s390/tcb-offsets.sym: New file.
8501 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8502 * sysdeps/s390/tls.h: New file.
8503 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8504 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8505 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8506 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8507 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8508 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8509 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8510 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8511 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8512 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8513 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8514 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8515 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8516 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8517 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8518 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8519 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8520 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8521 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8522 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8523 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8524 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8525 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8527 2003-02-04 Ulrich Drepper <drepper@redhat.com>
8529 * atomic.h: Add a couple more default implementations.
8530 (atomic_compare_and_exchange_acq): Use
8531 __arch_compare_and_exchange_32_acq in return value definition. It
8533 (atomic_bit_set): Renamed from atomic_set_bit.
8534 Add missing atomic_ prefixes.
8536 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8537 thread library is available, use correct value to mark initialized
8540 2003-02-03 Ulrich Drepper <drepper@redhat.com>
8542 * allocatestack.c (allocate_stack): Use __getpagesize instead of
8543 __sysconf to determine pagesize.
8545 * pthread_create.c: Include <atomic.h>.
8546 * allocatestack.c (allocate_stack): Implement coloring of the
8547 allocated stack memory. Rename pagesize to pagesize_m1. It's the
8548 size minus one. Adjust users.
8549 * sysdeps/i386/i686/Makefile: New file.
8551 2003-02-02 Ulrich Drepper <drepper@redhat.com>
8553 * allocatestack.c: Improve comment throughout the file.
8555 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8556 (__lll_lock_wait): Add branch prediction.
8557 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8558 (__lll_lock_wait): Likewise.
8559 (lll_unlock_wake_cb): Removed.
8561 2003-01-31 Ulrich Drepper <drepper@redhat.com>
8563 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8564 _POSIX_THREAD_PRIORITY_SCHEDULING.
8566 2003-01-30 Jakub Jelinek <jakub@redhat.com>
8568 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8569 Fix return type of ptr___pthread_getspecific.
8571 2003-01-29 Ulrich Drepper <drepper@redhat.com>
8573 * Makefile (tests): Add tst-umask1.
8574 (tst-umask1-ARGS): Define.
8575 * tst-umask1.c: New file.
8577 2003-01-28 Ulrich Drepper <drepper@redhat.com>
8579 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
8580 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8581 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8582 pthread_rwlock_unlock.
8583 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8584 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8585 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8586 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8587 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8589 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8590 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8592 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8593 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8594 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8596 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8597 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8599 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8600 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8601 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8603 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8604 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8606 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8608 * Makefile (libpthread-routines): Remove lowlevelcond and
8609 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8610 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8611 and pthread_cond_broadcast.
8612 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8613 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8614 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8615 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8616 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8617 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8618 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8619 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8620 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8621 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8622 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8623 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8624 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8625 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8626 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8627 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8628 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8629 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8630 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8631 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8632 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8633 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8634 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8635 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8636 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8637 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8638 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8639 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8640 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
8641 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
8642 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
8644 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
8645 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
8646 of the code is moved to ...
8647 * sysdeps/pthread/createthread.c: ...here. New file.
8649 2003-01-27 Ulrich Drepper <drepper@redhat.com>
8651 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
8652 (__new_sem_post): Clear %eax before returning.
8653 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
8655 * Makefile (tests): Add tst-cleanup2.
8656 * tst-cleanup2.c: New file.
8658 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8659 Interpret first parameter correctly.
8661 2003-01-17 Ulrich Drepper <drepper@redhat.com>
8663 * Makefile (headers): Add bits/semaphore.h.
8665 2003-01-16 Jakub Jelinek <jakub@redhat.com>
8667 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
8670 2003-01-14 Ulrich Drepper <drepper@redhat.com>
8672 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
8673 must be used and mapping failed.
8674 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
8676 * Makefile (CFLAGS-pthread_self.os): Define this, not
8677 CFLAGS-pthread_self.c.
8679 2003-01-13 Ulrich Drepper <drepper@redhat.com>
8681 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
8684 * Makefile (libpthread-routines): Add version. Add rules to build
8685 version.os and banner.h.
8686 * version.c: New file.
8688 2003-01-13 Jakub Jelinek <jakub@redhat.com>
8690 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
8691 the alias unconditional.
8692 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
8694 2003-01-13 Ulrich Drepper <drepper@redhat.com>
8696 * Makefile (CFLAGS-pthread_self.c): New definition.
8698 2003-01-06 Jakub Jelinek <jakub@redhat.com>
8700 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
8701 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
8702 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
8703 * init.c (__pthread_initialize_minimal_internal): Likewise.
8705 2003-01-07 Jakub Jelinek <jakub@redhat.com>
8707 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
8709 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8710 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8711 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8712 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8713 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8714 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8716 2003-01-06 Jakub Jelinek <jakub@redhat.com>
8718 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
8719 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
8720 * tst-cancel-wrappers.sh: Remove all exceptions.
8722 2003-01-05 Ulrich Drepper <drepper@redhat.com>
8724 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
8725 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
8727 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
8728 Use __libc_pthread_functions array if SHARED.
8730 * pthreadP.h: Move pthread_cond_2_0_t definition to...
8731 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
8733 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
8734 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
8735 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
8736 __libc_ptf_call instead of __libc_maybe_call.
8738 (__libc_cleanup_region_start): Wrap function name with PTF call.
8739 (__libc_cleanup_region_end): Likewise.
8740 (__libc_cleanup_end): Likewise.
8742 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
8743 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
8744 * pthread_key_create.c: Add __pthread_key_create_internal alias.
8745 * pthreadP.h: Add prototypes.
8747 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
8748 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
8749 __pthread_rwlock_unlock aliases.
8750 * pthreadP.h: Add prototypes for new aliases.
8752 * pthreadP.h (struct pthead_functions): Moved to...
8753 * sysdeps/pthread/pthread-functions.h: ...here. New file.
8754 * init.c (pthread_functions): Add initializers for new elements.
8756 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
8757 __pthread_cleanup_pop_restore aliases.
8758 * pthreadP.h: Add prototypes.
8760 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
8761 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
8762 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
8763 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
8764 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8765 * pthreadP.h: Adjust prototypes and callers.
8767 2003-01-04 Ulrich Drepper <drepper@redhat.com>
8769 * Makefile (tests): Add tst-cancel7.
8770 (tst-cancel7-ARGS): New variable.
8771 * tst-cancel7.c: New file.
8773 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
8774 around gcc defficiencies.
8775 * old_pthread_cond_signal.c: Likewise.
8776 * old_pthread_cond_timedwait.c: Likewise.
8777 * old_pthread_cond_wait.c: Likewise.
8779 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
8781 2003-01-03 Ulrich Drepper <drepper@redhat.com>
8783 * Makefile (tests): Add tst-cond7.
8784 * tst-cond7.c: New file.
8786 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
8787 (condvar_cleanup): Get condvar address from the right place.
8789 * atomic.h: Correct definitions of atomic_full_barrier,
8790 atomic_read_barrier, atomic_write_barrier.
8792 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
8794 * old_pthread_cond_signal.c: Likewise.
8795 * old_pthread_cond_timedwait.c: Likewise.
8796 * old_pthread_cond_wait.c: Likewise.
8798 2003-01-03 Jakub Jelinek <jakub@redhat.com>
8800 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
8802 2003-01-03 Ulrich Drepper <drepper@redhat.com>
8804 * pthreadP.h (pthread_cond_2_0_t): New type.
8805 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
8806 Use new type for the 2.0 condvar function prototypes.
8807 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
8808 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
8810 * old_pthread_cond_destroy.c: Likewise.
8811 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
8812 * old_pthread_cond_signal.c: Likewise.
8813 * old_pthread_cond_timedwait.c: Likewise.
8814 * old_pthread_cond_wait.c: Likewise.
8816 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
8817 (__pthread_cond_wait): Don't save cancellation mode and seq value
8820 * herrno.c (__h_errno_location): Don't define as weak.
8822 2003-01-02 Jakub Jelinek <jakub@redhat.com>
8824 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
8825 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
8826 and pthread_cond_wait.
8827 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
8829 (__pthread_cond_broadcast_2_0): ... this.
8830 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
8832 (__pthread_cond_destroy_2_0): ... this.
8833 * old_pthread_cond_init.c (__old_pthread_cond_init):
8835 (__pthread_cond_init_2_0): ... this.
8836 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
8838 (__pthread_cond_signal_2_0): ... this.
8839 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
8841 (__pthread_cond_wait_2_0): ... this.
8842 * pthread_cond_destroy.c: Include shlib-compat.h.
8843 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
8844 * pthread_cond_init.c: Include shlib-compat.h.
8845 (pthread_cond_init): Change strong_alias into versioned_symbol.
8846 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
8847 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
8849 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
8850 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
8851 __pthread_cond_wait_2_0): New prototypes.
8852 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
8853 __old_pthread_cond_init, __old_pthread_cond_signal,
8854 __old_pthread_cond_wait): Removed.
8855 * init.c: Include shlib-compat.h.
8856 (pthread_functions): Guard ptr___pthread_attr_init_2_0
8857 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
8858 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
8859 ptr___pthread_cond_*_2_0 fields.
8860 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
8861 pthread_cond_*@GLIBC_2.0 compatibility symbols.
8863 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
8864 LIBC_SIGACTION was not yet defined.
8865 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
8866 [!defined LIBC_SIGACTION] (__sigaction): New function and
8868 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
8869 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
8871 2003-01-02 Jakub Jelinek <jakub@redhat.com>
8873 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
8875 2003-01-02 Ulrich Drepper <drepper@redhat.com>
8877 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8878 New, larger type definition.
8879 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
8881 * Versions [libpthread]: Add definitions for new pthread_cond_*
8882 interfaces for version GLIBC_2.3.2.
8883 * pthread_cond_init.c: Update initialization for new type definition.
8884 * Makefile (libpthread-routines): Remove pthread_cond_wait,
8885 pthread_cond_timedwait, pthread_cond_signal, and
8886 pthread_cond_broadcast. Add old_pthread_cond_init,
8887 old_pthread_cond_destroy, old_pthread_cond_wait,
8888 old_pthread_cond_timedwait, old_pthread_cond_signal, and
8889 old_pthread_cond_broadcast.
8890 * old_pthread_cond_broadcast.c: New file.
8891 * old_pthread_cond_destroy.c: New file.
8892 * old_pthread_cond_init.c: New file.
8893 * old_pthread_cond_signal.c: New file.
8894 * old_pthread_cond_timedwait.c: New file.
8895 * old_pthread_cond_wait.c: New file.
8896 * pthreadP.h: Add prototypes for the compatibility interfaces.
8898 * pthread_cond_destroy.c: Don't include <errno.h>.
8900 2003-01-01 Ulrich Drepper <drepper@redhat.com>
8902 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
8903 unnecessary zero offset when addressing MUTEX.
8905 2002-12-31 Ulrich Drepper <drepper@redhat.com>
8907 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8909 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
8910 for __register_atfork.
8912 2002-12-31 Jakub Jelinek <jakub@redhat.com>
8914 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
8915 instead of ASSEMBLER test macro.
8917 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
8918 __libc_current_sigrtmax): Add libc_hidden_def.
8920 * sysdeps/pthread/list.h: Remove assert.h include.
8922 2002-12-31 Ulrich Drepper <drepper@redhat.com>
8924 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
8925 __pthread_initialize_minimal_internal not
8926 __pthread_initialize_minimal.
8928 2002-12-30 Ulrich Drepper <drepper@redhat.com>
8930 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
8931 __pthread_initialize_minimal as hidden.
8933 * init.c (__pthread_initialize_minimal_internal): Don't mark as
8936 2002-12-31 Jakub Jelinek <jakub@redhat.com>
8938 * Makefile ($(inst_libdir)/libpthread.so): Depend on
8939 $(common-objpfx)format.lds, include that into the output script.
8941 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
8943 2002-12-28 Andreas Jaeger <aj@suse.de>
8945 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
8946 nsec resolution changes.
8947 (xstat64_conv): Likewise.
8948 (xstat32_conv): Likewise.
8949 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
8951 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
8952 structs stat and stat64.
8953 * time/time.h (__timespec_defined): Define for __USE_MISC.
8954 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8956 2002-12-30 Jakub Jelinek <jakub@redhat.com>
8958 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
8960 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
8961 (pthread_exit): Use strong_alias to avoid warnings.
8962 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
8963 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
8964 ptr___pthread_attr_init_2_*.
8965 * init.c (pthread_functions): Adjust.
8967 2002-12-29 Ulrich Drepper <drepper@redhat.com>
8969 * forward.c: Make all functions available by default again. It
8970 caused too much trouble.
8972 * pt-siglongjmp.c: Removed.
8974 2002-12-28 Jakub Jelinek <jakub@redhat.com>
8976 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
8977 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
8978 * sysdeps/i386/Makefile: New file.
8979 * sysdeps/i386/tcb-offsets.sym: New file.
8980 * sysdeps/pthread/tcb-offsets.h: New file.
8981 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
8982 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
8984 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
8985 __register_atfork...
8986 (GLIBC_2.3.2): ...here.
8988 2002-12-28 Ulrich Drepper <drepper@redhat.com>
8990 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
8991 pthread_attr_setstackaddr with __attribute_deprecated__.
8993 2002-12-27 Jakub Jelinek <jakub@redhat.com>
8995 * pt-system.c (system): Remove cancellation handling.
8996 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
8997 cancellation routines.
8999 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9001 * descr.h: Include <dl-sysdep.h>.
9002 (struct pthread): Move header.data.list to the back of the struct.
9003 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9004 (MULTIPLE_THREADS_OFFSET): Adjust offset.
9005 (SYSINFO_OFFSEET): Likewise.
9007 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9009 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9011 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9012 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9013 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9014 (USE_DL_SYSINFO): Undef.
9016 2002-12-22 Jakub Jelinek <jakub@redhat.com>
9018 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9019 $(common-objpfx)libc.so.
9020 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9021 it is bigger than pipe buffer size even on arches with bigger
9023 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9025 2002-12-25 Ulrich Drepper <drepper@redhat.com>
9027 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9028 correct errno access for case that USE___THREAD is not defined.
9030 2002-12-24 Ulrich Drepper <drepper@redhat.com>
9032 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9033 Patch by Marijn Ros <marijn@mad.scientist.com>.
9035 2002-12-22 Roland McGrath <roland@redhat.com>
9037 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9039 2002-12-20 Ulrich Drepper <drepper@redhat.com>
9041 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9043 2002-12-19 Ulrich Drepper <drepper@redhat.com>
9045 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9046 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9047 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9049 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9051 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9052 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9053 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9054 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9055 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9056 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9057 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9058 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9060 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9062 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9064 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9066 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9068 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9069 that sysinfo is properly initialized.
9070 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9071 to 1 only for ld.so.
9073 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9074 RTLD_CORRECT_DYNAMIC_WEAK.
9076 2002-12-19 Jakub Jelinek <jakub@redhat.com>
9078 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9079 Use return 0 as 6th argument to FORWARD4.
9080 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9082 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9084 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9085 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9086 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9087 (INIT_SYSINFO): New #define.
9088 (TLS_TP_INIT): Use INIT_SYSINFO.
9089 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9090 At test to make sure SYSINFO_OFFSET value is correct.
9091 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9093 2002-12-18 Jakub Jelinek <jakub@redhat.com>
9095 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9096 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9097 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9098 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9099 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9100 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9101 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9103 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9105 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9106 macro instead of using int $0x80 directly.
9108 * sysdeps/pthread/bits/stdio-lock.h: New file.
9109 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9110 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9111 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9112 * Makefile (routines): Add libc-lowlevelmutex.
9114 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9115 __i686.get_pc_thunk.dx.
9117 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9119 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9120 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9121 ($(objpfx)tst-cancel-wrappers.out): New rule.
9122 * tst-cancel-wrappers.sh: New test.
9123 * tst-locale1.c: Include signal.h.
9124 (uselocale): Test static linking of __libc_current_sigrt*.
9126 2002-12-17 Ulrich Drepper <drepper@redhat.com>
9128 * Makefile (tests): Add tst-cancel6.
9129 * tst-cancel6.c: New file
9131 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9133 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9134 Define meaningfully for assembler as well.
9135 * pthreadP.h (struct pthread_functions): Remove
9136 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
9137 and ptr_pthread_attr_init_2_1 fields.
9138 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9139 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9140 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9141 (FORWARD3): Define using FORWARD4.
9142 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9144 * pt-system.c: Remove duplicate stdlib.h include.
9146 2002-12-16 Ulrich Drepper <drepper@redhat.com>
9148 * sem_init.c: Define sem_init@GLIBC_2.0.
9149 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9150 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9152 * flockfile.c: Moved to...
9153 * sysdeps/pthread/flockfile.c: ...here. New file.
9154 * funlockfile.c: Moved to...
9155 * sysdeps/pthread/funlockfile.c: ...here. New file.
9156 * ftrylockfile.c: Moved to...
9157 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
9159 2002-12-16 Jakub Jelinek <jakub@redhat.com>
9161 * libc-cancellation.c: Guard both function with
9162 #if !defined NOT_IN_libc.
9163 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9164 automatically provided pthread wrappers.
9165 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9166 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9168 * pt-open.c: Removed.
9169 * pt-fcntl.c: Removed.
9170 * pt-fsync.c: Removed.
9171 * pt-lseek.c: Removed.
9172 * pt-msgrcv.c: Removed.
9173 * pt-msgsnd.c: Removed.
9174 * pt-msync.c: Removed.
9175 * pt-nanosleep.c: Removed.
9176 * pt-open64.c: Removed.
9177 * pt-pause.c: Removed.
9178 * pt-pread.c: Removed.
9179 * pt-pread64.c: Removed.
9180 * pt-pwrite.c: Removed.
9181 * pt-pwrite64.c: Removed.
9182 * pt-read.c: Removed.
9183 * pt-recv.c: Removed.
9184 * pt-recvfrom.c: Removed.
9185 * pt-recvmsg.c: Removed.
9186 * pt-send.c: Removed.
9187 * pt-sendto.c: Removed.
9188 * pt-sigtimedwait.c: Removed.
9189 * pt-sigwait.c: Removed.
9190 * pt-wait.c: Removed.
9191 * pt-waitpid.c: Removed.
9192 * pt-write.c: Removed.
9193 * pt-accept.c: Removed.
9194 * pt-close.c: Removed.
9195 * pt-connect.c: Removed.
9196 * pt-lseek64.c: Removed.
9197 * pt-sendmsg.c: Removed.
9198 * pt-tcdrain.c: Removed.
9200 2002-12-15 Ulrich Drepper <drepper@redhat.com>
9202 * init.c (__pthread_initialize_minimal_internal): Renamed from
9203 __pthread_initialize_minimal. Make old name an alias. This
9204 converts a normal relocation into a relative relocation.
9206 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9208 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9209 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9210 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9211 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9212 pt-sigwaitinfo, pt-waitid, and pt-writev.
9213 * pt-creat.c: Removed.
9214 * pt-poll.c: Removed.
9215 * pt-pselect.c: Removed.
9216 * pt-readv.c: Removed.
9217 * pt-select.c: Removed.
9218 * pt-sigpause.c: Removed.
9219 * pt-sigsuspend.c: Removed.
9220 * pt-sigwaitinfo.c: Removed.
9221 * pt-waitid.c: Removed.
9222 * pt-writev.c: Removed.
9224 * init.c (pthread_functions): New variable.
9225 (__pthread_initialize_minimal): Pass pointer to pthread_functions
9226 (or NULL) to __libc_pthread_init.
9227 * forward.c: Rewrite to use __libc:pthread_functions array to get
9229 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9231 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9232 Take new parameter. Copy content of variable pointed to by it
9233 to __libc_pthread_init.
9235 * pthreadP.h (struct pthread_functions): New type.
9236 (__libc_pthread_init): Declare.
9238 * pthread_attr_destroy.c: Add namespace protected alias.
9239 * pthread_attr_getdetachstate.c: Likewise.
9240 * pthread_attr_getinheritsched.c: Likewise.
9241 * pthread_attr_getschedparam.c: Likewise.
9242 * pthread_attr_getschedpolicy.c: Likewise.
9243 * pthread_attr_getscope.c: Likewise.
9244 * pthread_attr_setdetachstate.c: Likewise.
9245 * pthread_attr_setinheritsched.c: Likewise.
9246 * pthread_attr_setschedparam.c: Likewise.
9247 * pthread_attr_setschedpolicy.c: Likewise.
9248 * pthread_attr_setscope.c: Likewise.
9249 * pthread_cond_broadcast.c: Likewise.
9250 * pthread_cond_destroy.c: Likewise.
9251 * pthread_cond_init.c: Likewise.
9252 * pthread_cond_signal.c: Likewise.
9253 * pthread_cond_wait.c: Likewise.
9254 * pthread_condattr_destroy.c: Likewise.
9255 * pthread_condattr_init.c: Likewise.
9256 * pthread_equal.c: Likewise.
9257 * pthread_exit.c: Likewise.
9258 * pthread_getschedparam.c: Likewise.
9259 * pthread_self.c: Likewise.
9260 * pthread_setcancelstate.c: Likewise.
9261 * pthread_setschedparam.c: Likewise.
9262 * pthread_mutex_destroy.c: Likewise.
9263 * pthread_mutex_init.c: Likewise.
9264 * pthreadP.h: Add prototypes for the aliases.
9266 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9267 multiple_threads member in correct TCB to 1.
9269 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9270 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
9271 member of thread decriptor, otherwise return unconditionally 1.
9273 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9275 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9276 regular Linux version. Remove file.
9277 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
9278 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
9279 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
9280 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
9281 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
9282 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
9283 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
9284 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
9285 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
9286 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
9287 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
9288 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
9289 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
9290 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
9291 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
9292 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
9293 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
9294 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
9295 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
9296 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
9297 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
9298 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
9299 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
9300 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
9301 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
9302 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
9303 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
9304 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
9305 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
9306 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
9308 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9310 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9311 * sysdeps/unix/sysv/linux/open.c: Removed.
9312 * sysdeps/unix/sysv/linux/fsync.c: Removed.
9313 * sysdeps/unix/sysv/linux/lseek.c: Removed.
9314 * sysdeps/unix/sysv/linux/msync.c: Removed.
9315 * sysdeps/unix/sysv/linux/read.c: Removed.
9316 * sysdeps/unix/sysv/linux/close.c: Removed.
9317 * sysdeps/unix/sysv/linux/creat.c: Removed.
9318 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9319 * sysdeps/unix/sysv/linux/pause.c: Removed.
9320 * sysdeps/unix/sysv/linux/select.c: Removed.
9321 * sysdeps/unix/sysv/linux/write.c: Removed.
9323 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9325 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9326 element in TCB to see whether locking is needed.
9328 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9329 MULTIPLE_THREADS_OFFSET value is correct.
9331 * sysdeps/unix/sysv/linux/close.c: New file.
9332 * sysdeps/unix/sysv/linux/connect.S: New file.
9333 * sysdeps/unix/sysv/linux/creat.c: New file.
9334 * sysdeps/unix/sysv/linux/fsync.c: New file.
9335 * sysdeps/unix/sysv/linux/llseek.c: New file.
9336 * sysdeps/unix/sysv/linux/lseek.c: New file.
9337 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9338 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9339 * sysdeps/unix/sysv/linux/msync.c: New file.
9340 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9341 * sysdeps/unix/sysv/linux/open.c: New file.
9342 * sysdeps/unix/sysv/linux/open64.c: New file.
9343 * sysdeps/unix/sysv/linux/pause.c: New file.
9344 * sysdeps/unix/sysv/linux/poll.c: New file.
9345 * sysdeps/unix/sysv/linux/pread.c: New file.
9346 * sysdeps/unix/sysv/linux/pread64.c: New file.
9347 * sysdeps/unix/sysv/linux/pselect.c: New file.
9348 * sysdeps/unix/sysv/linux/pwrite.c: New file.
9349 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9350 * sysdeps/unix/sysv/linux/readv.c: New file.
9351 * sysdeps/unix/sysv/linux/recv.S: New file.
9352 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9353 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9354 * sysdeps/unix/sysv/linux/select.c: New file.
9355 * sysdeps/unix/sysv/linux/send.S: New file.
9356 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9357 * sysdeps/unix/sysv/linux/sendto.S: New file.
9358 * sysdeps/unix/sysv/linux/sigpause.c: New file.
9359 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9360 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9361 * sysdeps/unix/sysv/linux/sigwait.c: New file.
9362 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9363 * sysdeps/unix/sysv/linux/system.c: New file.
9364 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9365 * sysdeps/unix/sysv/linux/wait.c: New file.
9366 * sysdeps/unix/sysv/linux/waitid.c: New file.
9367 * sysdeps/unix/sysv/linux/waitpid.c: New file.
9368 * sysdeps/unix/sysv/linux/writev.c: New file.
9369 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9371 * pt-readv.c: Fix comment.
9373 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9375 * tst-cleanup1.c: Include stdlib.h.
9377 * tst-cancel5.c: New test.
9378 * Makefile (tests): Add tst-cancel5.
9379 (tst-cancel5): Link against libc.so libpthread.so in that order.
9381 2002-12-13 Ulrich Drepper <drepper@redhat.com>
9383 * forward.c (test_loaded): Prevent recursive calls.
9385 * Makefile (routines): Add libc-cancellation.
9386 * libc-cancellation.c: New file.
9387 * descr.h (struct pthread): Add multiple_threads field.
9388 * allocatestack.c (allocate_stack): Initialize multiple_header field of
9389 new thread descriptor to 1.
9390 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9391 Initialize multiple_thread field after successful thread creation.
9392 * cancellation.c (__do_cancel): Move to pthreadP.h.
9393 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9394 (__pthread_disable_asynccancel): Add internal_function attribute.
9395 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9396 * pthread_setcancelstate.c: Likewise.
9397 * pthread_setcanceltype.c: Likewise.
9398 * pthread_exit.c: Likewise.
9399 * pthreadP.h (CANCELLATION_P): Likewise.
9400 (__do_cancel): Define as static inline.
9401 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9402 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9404 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9405 fields. Define MULTIPLE_THREADS_OFFSET.
9406 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9408 * sysdeps/unix/sysv/linux/accept.S: New file.
9409 * sysdeps/unix/sysv/linux/read.c: New file.
9410 * sysdeps/unix/sysv/linux/write.c: New file.
9411 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9412 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9413 initialization of __libc_locking_needed.
9414 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9415 __libc_locking_needed, use multiple_threads field in TCB.
9416 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9418 2002-12-12 Ulrich Drepper <drepper@redhat.com>
9420 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9422 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9424 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9425 access to __libc_locking_needed for PIC.
9427 2002-12-12 Jakub Jelinek <jakub@redhat.com>
9429 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9430 declare for libc.so.
9431 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9433 (__libc_lock_lock): Put into statement expression.
9434 (__libc_lock_unlock): Remove trailing semicolon.
9435 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9437 2002-12-12 Roland McGrath <roland@redhat.com>
9439 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9440 "m" constraint to refer to __libc_locking_needed. Declare it here.
9442 2002-12-12 Ulrich Drepper <drepper@redhat.com>
9444 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9445 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9446 Initialize __libc_locking_needed.
9447 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9448 instead of __register_pthread_fork_handler.
9449 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9450 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9451 fork-gen with libc_pthread_init.
9452 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9453 of __register_pthread_fork_handler.
9454 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9455 of __register_pthread_fork_handler.
9456 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9457 __libc_locking_needed to determine whether lock prefix can be avoided.
9458 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9460 2002-12-11 Ulrich Drepper <drepper@redhat.com>
9462 * Makefile (tests): Add tst-cleanup1.
9463 * tst-cleanup1.c: New file.
9464 * cancellation.c (__cleanup_thread): Removed.
9465 (__do_cancel): Remove call to __cleanup_thread.
9466 * pthreadP.h: Remove __cleanup_thread prorotype.
9468 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9469 Remember function and argument even if cancellation handler
9470 function is not available.
9471 (__libc_cleanup_region_end): Execute registered function directly if
9472 pthread functions are not available.
9473 (__libc_cleanup_end): Likewise.
9475 * init.c (__pthread_initialize_minimal): Fix initialization in
9476 static lib by preventing gcc from being too clever.
9478 2002-12-10 Ulrich Drepper <drepper@redhat.com>
9480 * init.c (__pthread_initialize_minimal): Remove unneccesary
9483 * Makefile (tests): We can run tst-locale2 now.
9485 2002-12-09 Ulrich Drepper <drepper@redhat.com>
9487 * Versions: Remove duplicated sigwait entry.
9489 2002-12-08 Ulrich Drepper <drepper@redhat.com>
9491 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9494 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9496 * pthreadP.h: Declare __pthread_enable_asynccancel and
9497 __pthread_disable_asynccancel.
9498 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9499 (CANCEL_RESET): Use __pthread_disable_asynccancel.
9500 * cancellation.c (__pthread_enable_asynccancel): New function.
9501 (__pthread_disable_asynccancel): New function.
9502 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9503 * pt-close.c: Likewise.
9504 * pt-connect.c: Likewise.
9505 * pt-creat.c: Likewise.
9506 * pt-fcntl.c: Likewise.
9507 * pt-fsync.c: Likewise.
9508 * pt-lseek.c: Likewise.
9509 * pt-lseek64.c: Likewise.
9510 * pt-msgrcv.c: Likewise.
9511 * pt-msgsnd.c: Likewise.
9512 * pt-msync.c: Likewise.
9513 * pt-nanosleep.c: Likewise.
9514 * pt-open.c: Likewise.
9515 * pt-open64.c: Likewise.
9516 * pt-pause.c: Likewise.
9517 * pt-poll.c: Likewise.
9518 * pt-pread.c: Likewise.
9519 * pt-pread64.c: Likewise.
9520 * pt-pselect.c: Likewise.
9521 * pt-pwrite.c: Likewise.
9522 * pt-pwrite64.c: Likewise.
9523 * pt-read.c: Likewise.
9524 * pt-readv.c: Likewise.
9525 * pt-recv.c: Likewise.
9526 * pt-recvfrom.c: Likewise.
9527 * pt-recvmsg.c: Likewise.
9528 * pt-select.c: Likewise.
9529 * pt-send.c: Likewise.
9530 * pt-sendmsg.c: Likewise.
9531 * pt-sendto.c: Likewise.
9532 * pt-sigpause.c: Likewise.
9533 * pt-sigsuspend.c: Likewise.
9534 * pt-sigtimedwait.c: Likewise.
9535 * pt-sigwait.c: Likewise.
9536 * pt-sigwaitinfo.c: Likewise.
9537 * pt-system.c: Likewise.
9538 * pt-tcdrain.c: Likewise.
9539 * pt-wait.c: Likewise.
9540 * pt-waitid.c: Likewise.
9541 * pt-waitpid.c: Likewise.
9542 * pt-write.c: Likewise.
9543 * pt-writev.c: Likewise.
9544 * pthread_join.c: Likewise.
9545 * pthread_timedjoin.c: Likewise.
9547 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9548 (__xpg_sigpause): New function.
9549 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9551 2002-12-07 Ulrich Drepper <drepper@redhat.com>
9553 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9555 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9556 _GI_pthread_cleanup_pop to pthreadP.h.
9558 * ftrylockfile.c: Use _IO_lock_trylock instead of
9559 pthread_mutex_trylock.
9561 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9562 (CANCEL_RESET): Likewise.
9563 (__pthread_setcanceltype_): Declare.
9564 (__pthread_mutex_lock_internal): Declare.
9565 (__pthread_mutex_unlock_internal): Declare.
9566 (__pthread_once_internal): Declare.
9567 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9568 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9570 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9571 and pthread_mutex_unlock.
9572 * pthread_cond_wait.c: Likewise.
9573 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9574 * pthread_mutex_unlock.c: Likewise.
9576 * pthread_setcanceltype.c: Add additional alias
9577 __pthread_setcanceltype.
9579 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9580 * sem_open.c (sem_open): Likewise.
9581 Use __libc_open, __libc_write, and __libc_close instead of
9582 open, write, and close respectively.
9584 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9585 Rewrite as statement expression since it must return a value.
9587 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9588 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9591 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9592 alias __pthread_once_internal.
9594 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9596 2002-12-06 Ulrich Drepper <drepper@redhat.com>
9598 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9599 * tst-stdio1.c: New file.
9600 * tst-stdio2.c: New file.
9602 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9604 * Makefile (tests): Comment out tst-locale2 for now.
9605 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9607 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9609 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9610 Use _IO_lock_init instead of explicit assignment.
9612 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9613 Define __libc_lock_* and __libc_lock_recursive macros with
9614 lowlevellock macros, not pthread mutexes.
9616 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
9617 of pthread_mutex_lock.
9618 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
9619 instead of pthread_mutex_unlock.
9621 2002-12-06 Roland McGrath <roland@redhat.com>
9623 * allocatestack.c (__stack_user): Use uninitialized defn.
9624 * init.c (__pthread_initialize_minimal): Initialize it here.
9626 2002-12-05 Roland McGrath <roland@redhat.com>
9628 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9630 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9632 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9635 2002-12-05 Ulrich Drepper <drepper@redhat.com>
9637 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9639 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9640 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
9641 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
9642 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
9643 for __libc_lock_* macros.
9644 * Makefile (routines): Add libc-lowlevellock.
9646 2002-10-09 Roland McGrath <roland@redhat.com>
9648 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
9649 Under [__PIC__], call the function via the pointer fetched for
9650 comparison rather than a call by name that uses the PLT.
9651 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
9652 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
9653 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
9654 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
9655 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
9657 2002-12-04 Roland McGrath <roland@redhat.com>
9659 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
9661 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
9662 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
9664 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
9666 2002-12-04 Ulrich Drepper <drepper@redhat.com>
9668 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
9669 a completely opaque, non-integer type.
9670 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9672 2002-12-05 Jakub Jelinek <jakub@redhat.com>
9674 * sysdeps/i386/tls.h: Include stdlib.h.
9675 * sysdeps/x86_64/tls.h: Likewise.
9677 2002-12-04 Ulrich Drepper <drepper@redhat.com>
9679 * Makefile (tests): Add tst-locale2.
9680 (tests-static): Likewise.
9681 * tst-locale2.c: New file.
9683 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
9684 volatile and add memory clobbers to lock operations.
9686 2002-12-03 Ulrich Drepper <drepper@redhat.com>
9688 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
9689 * sysdeps/i386/i486/bits/atomic.h: New file.
9690 * sysdeps/i386/i586/bits/atomic.h: New file.
9691 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
9692 include i486 version.
9693 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
9694 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
9695 Patch by Marijn Ros <marijn@mad.scientist.com>.
9697 * allocatestack.c (get_cached_stack): Don't crash if we first
9698 found a stack with a larger size then needed.
9699 Reported by Hui Huang <hui.huang@sun.com>.
9701 * Makefile (tests): Add tst-sysconf.
9702 * tst-sysconf.c: New file.
9704 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
9705 PTHREAD_THREADS_MAX.
9707 2002-12-02 Roland McGrath <roland@redhat.com>
9709 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
9710 Declare using hidden_proto instead of attribute_hidden, so there are
9711 non-.hidden static symbols for gdb to find.
9712 (__pthread_keys): Likewise.
9713 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
9714 * allocatestack.c (__stack_user): Likewise.
9715 * pthread_create.c (__pthread_keys): Likewise.
9716 (__nptl_threads_events, __nptl_last_event): Make these static instead
9718 * pthread_key_create.c (__pthread_pthread_keys_max,
9719 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
9721 2002-12-02 Ulrich Drepper <drepper@redhat.com>
9723 * Makefile (tests): Add tst-locale1. If buid-static is yes link
9725 * tst-locale1.c: New file.
9727 * pthread_cond_timedwait.c: Include <stdlib.h>.
9729 * Makefile (tests): Add tst-fork2 and tst-fork3.
9730 * tst-fork2.c: New file.
9731 * tst-fork3.c: New file.
9733 2002-11-28 Ulrich Drepper <drepper@redhat.com>
9735 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
9737 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
9738 require it to 200112L.
9740 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
9741 instruction only if HAVE_CMOV is defined.
9742 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
9744 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
9746 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
9748 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
9750 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
9752 2002-11-27 Ulrich Drepper <drepper@redhat.com>
9754 * sysdeps/x86_64/bits/atomic.h: New file.
9756 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
9759 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
9760 possible since gettid cannot fail.
9762 * sysdeps/x86_64/pthreaddef.h: New file.
9764 * sysdeps/i386/pthreaddef.h (gettid): Removed.
9766 * sysdeps/x86_64/pthread_spin_init.c: New file.
9767 * sysdeps/x86_64/pthread_spin_lock.c: New file.
9768 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
9769 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
9771 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
9772 Add missing lock prefix. Minute optimization.
9774 * tst-spin2.c (main): Also check successful trylock call.
9776 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
9777 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
9779 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
9780 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
9782 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
9783 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
9784 value in case of an error. Add support for INTERNAL_SYSCALL.
9786 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
9787 value in case of an error.
9789 * sysdeps/x86_64/tls.h: New file.
9791 2002-11-26 Ulrich Drepper <drepper@redhat.com>
9793 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
9794 takes the array member name and the index as parameters.
9795 (THREAD_SETMEM_NC): Likewise.
9796 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
9797 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
9800 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
9801 to decide which code to use.
9802 (THREAD_SETMEM_NC): Likewise.
9804 * allocatestack.c (queue_stack): Don't remove stack from list here.
9805 Do it in the caller. Correct condition to prematurely terminate
9806 loop to free stacks.
9807 (__deallocate_stack): Remove stack from list here.
9809 2002-11-26 Ulrich Drepper <drepper@redhat.com>
9811 * Makefile (tests): Add tst-stack1.
9812 * tst-stack1.c: New file.
9814 * allocatestack.c (allocate_stack): Initialize the TCB on a user
9817 * pthread_attr_getstack.c: Return bottom of the thread area.
9819 2002-11-25 Ulrich Drepper <drepper@redhat.com>
9821 * Makefile (libpthread-routines): Add pt-allocrtsig and
9822 pthread_kill_other_threads.
9823 * pt-allocrtsig.c: New file.
9824 * pthread_kill_other_threads.c: New file.
9825 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
9826 all three functions.
9827 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9829 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
9830 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
9831 and __libc_allocate_rtsig_private.
9832 * Versions (libpthread): Export pthread_kill_other_threads_np,
9833 __libc_current_sigrtmin, and __libc_current_sigrtmax.
9835 2002-11-24 Ulrich Drepper <drepper@redhat.com>
9837 * allocatestack.c (allocate_stack): stackaddr in attribute points to
9838 the end of the stack. Adjust computations.
9839 When mprotect call fails dequeue stack and free it.
9840 * pthread_attr_setstack.c: Store top of the stack in stackaddr
9842 * pthread_getattr_np.c: Likewise.
9844 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
9847 2002-11-23 Ulrich Drepper <drepper@redhat.com>
9849 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
9850 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
9852 2002-11-22 Ulrich Drepper <drepper@redhat.com>
9854 * pthread_getspecific.c: Optimize access to first 2nd-level array.
9855 * pthread_setspecific.c: Likewise.
9857 2002-11-21 Ulrich Drepper <drepper@redhat.com>
9859 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
9860 definitions. Get them from the official place.
9861 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
9863 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
9864 Use new CLONE_ flags in clone() calls.
9866 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
9867 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
9869 * Versions: Add pthread_* functions for libc.
9870 * forward.c: New file.
9872 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
9874 * herrno.c: New file.
9877 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
9878 sem_trywait, and sem_timedwait. Add herrno and res.
9879 * sem_init.c: Don't initialize lock and waiters members.
9880 * sem_open.c: Likewise.
9881 * sem_post.c: Removed.
9882 * sem_wait.c: Removed.
9883 * sem_trywait.c: Removed.
9884 * sem_timedwait.c: Removed.
9885 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
9886 Includes full implementations of sem_post, sem_wait, sem_trywait,
9888 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
9889 for new implementation.
9890 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
9893 * tst-sem3.c: Improve error message.
9894 * tst-signal3.c: Likewise.
9896 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
9897 to tell the kernel about the termination futex and to initialize tid
9898 member. Don't initialize main_thread.
9899 * descr.h (struct pthread): Remove main_thread member.
9900 * cancelllation.c (__do_cancel): Remove code handling main thread.
9901 The main thread is not special anymore.
9903 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
9904 size of the stacks to stack_cache_actsize.
9906 * pt-readv.c: Add missing "defined".
9907 * pt-sigwait.c: Likewise.
9908 * pt-writev.c: Likewise.
9910 2002-11-09 Ulrich Drepper <drepper@redhat.com>
9912 * Versions: Export __connect from libpthread.
9913 Patch by Luca Barbieri <ldb@ldb.ods.org>.
9915 * Makefile (libpthread-routines): Add pt-raise.
9916 * sysdeps/unix/sysv/linux/raise.c: New file.
9917 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
9918 * sysdeps/generic/pt-raise.c: New file.
9920 * pthread_cond_init.c: Initialize all data elements of the condvar
9921 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
9923 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
9924 * pthread_create.c: Likewise.
9926 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
9927 * tst-key1.c: New file.
9928 * tst-key2.c: New file.
9929 * tst-key3.c: New file.
9931 * Versions: Export pthread_detach for version GLIBC_2.0.
9932 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
9934 2002-11-08 Ulrich Drepper <drepper@redhat.com>
9936 * pthread_key_create.c: Terminate search after an unused key was found.
9937 Patch by Luca Barbieri <ldb@ldb.ods.org>.
9939 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
9940 Patch by Luca Barbieri <ldb@ldb.ods.org>.
9942 2002-10-10 Ulrich Drepper <drepper@redhat.com>
9944 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
9945 dynamic lookup for errno in PIC.
9947 * allocatestack.c (get_cached_stack): Rearrange code slightly to
9948 release the stack lock as soon as possible.
9949 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
9950 the static TLS block.
9951 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
9953 * cancellation.c: Renamed from cancelation.c.
9954 * Makefile: Adjust accordingly.
9955 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
9956 * cleanup_defer.c: Use CANCELLATION_P.
9957 * pthread_testcancel.c: Likewise.
9958 * descr.h: Fix spelling in comments.
9960 * pthread_getattr_np.c: Likewise.
9961 * pthread_getschedparam.c: Likewise.
9962 * pthread_setschedparam.c: Likewise.
9963 * Versions: Likewise.
9965 * pt-pselect.c: New file.
9966 * Makefile (libpthread-routines): Add pt-pselect.
9967 * Versions: Add pselect.
9969 * tst-cancel4.c: New file.
9970 * Makefile (tests): Add tst-cancel4.
9972 2002-10-09 Ulrich Drepper <drepper@redhat.com>
9974 * pthread_mutex_lock.c: Always record lock ownership.
9975 * pthread_mutex_timedlock.c: Likewise.
9976 * pthread_mutex_trylock.c: Likewise.
9978 * pt-readv.c: New file.
9979 * pt-writev.c: New file.
9980 * pt-creat.c: New file.
9981 * pt-msgrcv.c: New file.
9982 * pt-msgsnd.c: New file.
9983 * pt-poll.c: New file.
9984 * pt-select.c: New file.
9985 * pt-sigpause.c: New file.
9986 * pt-sigsuspend.c: New file.
9987 * pt-sigwait.c: New file.
9988 * pt-sigwaitinfo.c: New file.
9989 * pt-waitid.c: New file.
9990 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
9991 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
9992 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
9993 * Versions: Add all the new functions.
9995 * tst-exit1.c: New file.
9996 * Makefile (tests): Add tst-exit1.
9998 * sem_timedwait.c: Minor optimization for more optimal fastpath.
10000 2002-10-08 Ulrich Drepper <drepper@redhat.com>
10002 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10004 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10005 call. pthread_join is an official cancellation point.
10006 * pthread_timedjoin.c: Likewise.
10008 * pthread_cond_wait.c: Revert order in which internal lock are dropped
10009 and the condvar's mutex are retrieved.
10010 * pthread_cond_timedwait.c: Likewise.
10011 Reported by dice@saros.East.Sun.COM.
10013 2002-10-07 Ulrich Drepper <drepper@redhat.com>
10015 * pthreadP.h: Cut out all type definitions and move them...
10016 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
10017 * pthreadP.h: Include <internaltypes.h>.
10019 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10020 performance tweaks.
10022 * sem_trywait.c: Shuffle #includes around to get right order.
10023 * sem_timedwait.c: Likewise.
10024 * sem_post.c: Likewise.
10025 * sem_wait.c: Likewise.
10027 * nptl 0.3 released.
10029 * Makefile (tests): Add tst-signal3.
10030 * tst-signal3.c: New file.
10032 2002-10-05 Ulrich Drepper <drepper@redhat.com>
10034 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10035 the asms modify the sem object.
10036 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10038 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10039 the actual members.
10040 * pthreadP.h (struct sem): New type. Actual semaphore type.
10041 * semaphoreP.h: Include pthreadP.h.
10042 * sem_getvalue.c: Adjust to sem_t change.
10043 * sem_init.c: Likewise.
10044 * sem_open.c: Likewise.
10045 * sem_post.c: Likewise.
10046 * sem_timedwait.c: Likewise.
10047 * sem_trywait.c: Likewise.
10048 * sem_wait.c: Likewise.
10050 2002-10-04 Ulrich Drepper <drepper@redhat.com>
10052 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10053 * tst-basic2.c: New file.
10054 * tst-exec1.c: New file.
10055 * tst-exec2.c: New file.
10056 * tst-exec3.c: New file.
10058 * tst-fork1.c: Remove extra */.
10060 * nptl 0.2 released. The API for IA-32 is complete.