1 2007-09-02 Ulrich Drepper <drepper@redhat.com>
3 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
6 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
8 2007-08-21 Ulrich Drepper <drepper@redhat.com>
11 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
12 reclaimed stack if necessary.
13 * Makefile (tests): Add tst-tsd6.
14 * tst-tsd6.c: New file.
16 2007-08-21 Jakub Jelinek <jakub@redhat.com>
18 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
21 2007-08-20 Ulrich Drepper <drepper@redhat.com>
23 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
24 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
26 2007-08-16 Jakub Jelinek <jakub@redhat.com>
28 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
29 (__lll_robust_timedlock): Pass private as last argument to
30 __lll_robust_timedlock_wait.
31 (__lll_unlock): Fix a pasto.
33 2007-08-15 Jakub Jelinek <jakub@redhat.com>
35 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
36 sparc_old_sem): New structs.
37 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
38 (__sem_wait_cleanup): New function.
39 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
40 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
41 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
43 (__old_sem_wait): New function.
44 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
45 nptl/sysdeps/unix/sysv/linux/sparc version.
46 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
48 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
49 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
50 (__new_sem_trywait): Use sparc_old_sem structure.
51 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
52 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
53 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
54 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
56 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
57 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
58 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
60 (__old_sem_post): New function.
61 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
62 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
63 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
64 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
65 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
66 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
68 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
70 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
71 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
72 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
73 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
74 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
75 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
76 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
78 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
79 kernel-features.h and tcb-offsets.h.
80 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
81 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
83 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
85 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
86 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
88 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
89 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
90 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
91 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
92 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
93 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
94 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
96 2007-08-14 Jakub Jelinek <jakub@redhat.com>
98 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
99 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
100 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
101 lll_futex_timed_wait.
103 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
104 __lll_robust_unlock): Rewrite as macros instead of inline functions.
105 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
106 __lll_robust_unlock, __lll_wait_tid): Likewise.
108 2007-08-13 Jakub Jelinek <jakub@redhat.com>
110 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
112 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
113 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
114 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
115 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
116 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
117 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
118 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
119 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
121 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
122 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
123 process private. Switch DW_CFA_advance_loc1 and some
124 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
125 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
126 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
127 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
128 process private. Switch DW_CFA_advance_loc{1,2} and some
129 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
130 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
131 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
132 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
134 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
135 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
136 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
138 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
139 (__pthread_cond_broadcast): Compare %r8 instead of
140 dep_mutex-cond_*(%rdi) with $-1.
141 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
142 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
145 2007-08-13 Ulrich Drepper <drepper@redhat.com>
147 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
149 2007-08-13 Jakub Jelinek <jakub@redhat.com>
151 * allocatestack.c: Include kernel-features.h.
152 * pthread_create.c: Likewise.
153 * pthread_mutex_init.c: Likewise.
155 * pthread_cond_timedwait.c: Likewise.
156 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
157 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
158 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
159 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
160 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
161 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
162 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
164 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
166 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
167 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
168 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
169 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
171 2007-08-12 Jakub Jelinek <jakub@redhat.com>
173 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
174 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
175 byte elements. One of them is the new __shared element.
176 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
177 adjust names of other padding elements.
178 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
179 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
180 byte elements. One of them is the new __shared element.
181 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
182 adjust names of other padding elements.
183 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
184 Renamed __pad1 element to __shared, adjust names of other padding
186 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
187 (pthread_rwlock_t): Likewise.
188 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
191 2007-08-09 Anton Blanchard <anton@samba.org>
193 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
195 2007-08-12 Ulrich Drepper <drepper@redhat.com>
197 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
199 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
201 2007-08-11 Ulrich Drepper <drepper@redhat.com>
203 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
204 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
205 dealing with robust mutexes.
206 * pthread_mutex_timedlock.c: Likewise.
207 * pthread_mutex_trylock.c: Likewise.
208 * pthread_mutex_unlock.c: Likewise.
209 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
211 2007-08-06 Jakub Jelinek <jakub@redhat.com>
213 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
214 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
215 (PTHREAD_MUTEX_PSHARED): Define.
216 * pthread_mutex_init.c (__pthread_mutex_init): Set
217 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
219 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
220 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
221 as second argument to lll_lock.
222 (LLL_MUTEX_TRYLOCK): Take mutex as argument
223 instead of its __data.__lock field.
224 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
225 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
227 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
228 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
229 instead of mutex->__data.__kind directly, pass
230 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
231 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
232 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
233 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
234 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
235 to lll_timedlock, lll_robust_timedlock, lll_unlock and
236 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
237 of mutex->__data.__kind directly.
238 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
239 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
240 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
241 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
242 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
243 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
245 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
246 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
247 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
249 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
250 Take mutex as argument instead of its __data.__lock field, pass
251 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
252 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
254 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
255 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
256 to lll_robust_cond_lock.
257 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
258 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
259 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
260 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
261 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
262 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
264 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
265 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
267 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
268 pshared variable, pass it to lll_lock, lll_unlock,
269 lll_futex_timedwait and lll_futex_wake.
270 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
271 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
273 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
274 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
276 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
277 lll_futex_wake_unlock): Likewise.
278 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
280 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
281 lll_futex_wake_unlock): Likewise.
282 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
284 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
285 lll_futex_wake_unlock): Likewise.
286 (lll_futex_wake): Fix a typo.
287 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
288 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
289 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
290 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
291 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
292 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
293 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
294 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
295 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
296 (__pthread_cond_timedwait): Likewise.
297 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
298 (__condvar_cleanup, __pthread_cond_wait): Likewise.
300 2007-08-05 Jakub Jelinek <jakub@redhat.com>
302 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
303 Don't use CGOTSETUP and CGOTRESTORE macros.
304 (CGOTSETUP, CGOTRESTORE): Remove.
305 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
308 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
310 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
311 definitions for private futexes.
312 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
313 kernel-features.h and lowlevellock.h. Use private futexes if
315 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
316 (__lll_mutex_lock_wait): Rename to
317 (__lll_lock_wait): ... this. Don't compile in for libc.so.
318 (__lll_mutex_timedlock_wait): Rename to ...
319 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
320 Don't compile in for libc.so.
321 (__lll_mutex_unlock_wake): Rename to ...
322 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
323 (__lll_timedwait_tid): Use __NR_gettimeofday.
324 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
325 the header from assembler. Renamed all lll_mutex_* resp.
326 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
327 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
328 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
330 (__lll_lock_wait_private): Add prototype.
331 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
332 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
333 __lll_unlock_wake): Likewise.
334 (lll_lock): Add private argument. Call __lll_lock_wait_private
335 if private is constant LLL_PRIVATE.
336 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
337 lll_timedlock, lll_robust_timedlock): Add private argument.
338 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
339 if private is constant LLL_PRIVATE.
340 (lll_robust_unlock, lll_robust_dead): Add private argument.
341 (lll_lock_t): Remove.
342 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
343 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
344 lll_cond_wake, lll_cond_broadcast): Remove.
345 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
346 kernel-features.h and lowlevellock.h.
347 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
348 (LOAD_FUTEX_WAIT): Define.
349 (__lll_robust_mutex_lock_wait): Rename to ...
350 (__lll_robust_lock_wait): ... this. Add private argument.
351 Use LOAD_FUTEX_WAIT macro.
352 (__lll_robust_mutex_timedlock_wait): Rename to ...
353 (__lll_robust_timedlock_wait): ... this. Add private argument.
354 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
355 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
357 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
358 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
359 __lll_mutex_{lock,unlock}_*.
360 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
361 lowlevellock.h and pthread-errnos.h.
362 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
363 FUTEX_CMP_REQUEUE, EINVAL): Remove.
364 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
365 __lll_mutex_{lock,unlock}_*.
366 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
367 lowlevellock.h and pthread-errnos.h.
368 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
369 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
370 __lll_mutex_{lock,unlock}_*.
371 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
373 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
374 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
375 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
376 (__condvar_tw_cleanup): Likewise.
377 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
379 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
380 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
381 __lll_mutex_{lock,unlock}_*.
382 ( __condvar_w_cleanup): Likewise.
383 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
384 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
385 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
387 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
388 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
389 __lll_mutex_{lock,unlock}_*.
390 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
392 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
393 FUTEX_PRIVATE_FLAG): Remove.
394 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
395 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
396 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
398 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
399 FUTEX_PRIVATE_FLAG): Remove.
400 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
401 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
402 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
404 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
405 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
406 __lll_mutex_{lock,unlock}_*.
407 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
409 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
410 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
411 __lll_mutex_{lock,unlock}_*.
412 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
413 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
414 (__new_sem_post): Use standard initial exec code sequences.
415 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
417 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
418 FUTEX_PRIVATE_FLAG): Remove.
419 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
421 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
422 (__new_sem_trywait): Use standard initial exec code sequences.
423 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
424 (__new_sem_wait): Use standard initial exec code sequences.
426 2007-07-31 Anton Blanchard <anton@samba.org>
428 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
429 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
432 2007-07-31 Jakub Jelinek <jakub@redhat.com>
434 * allocatestack.c (stack_cache_lock): Change type to int.
435 (get_cached_stack, allocate_stack, __deallocate_stack,
436 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
437 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
438 as second argument to lll_lock and lll_unlock macros on
440 * pthread_create.c (__find_in_stack_list): Likewise.
441 (start_thread): Similarly with pd->lock. Use lll_robust_dead
442 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
444 * descr.h (struct pthread): Change lock and setxid_futex field
446 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
447 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
448 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
449 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
451 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
452 * pthread_cond_init.c (__pthread_cond_init): Likewise.
453 * pthreadP.h (__attr_list_lock): Change type to int.
454 * pthread_attr_init.c (__attr_list_lock): Likewise.
455 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
456 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
458 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
459 also for lll_futex_{wake,wait}.
460 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
462 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
463 LLL_SHARED as second argument to lll_{,un}lock.
464 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
465 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
466 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
467 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
469 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
470 as second argument to lll_{,un}lock macros on pd->lock.
471 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
472 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
473 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
474 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
476 * sysdeps/pthread/createthread.c (do_clone, create_thread):
478 * pthread_once.c (once_lock): Change type to int.
479 (__pthread_once): Pass LLL_PRIVATE as second argument to
480 lll_{,un}lock macros on once_lock.
481 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
482 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
483 rwlock->__data.__shared as second argument to them and similarly
485 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
487 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
489 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
490 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
491 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
492 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
493 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
494 to lll_{,un}lock macros on __sem_mappings_lock.
495 * sem_open.c (check_add_mapping): Likewise.
496 (__sem_mappings_lock): Change type to int.
497 * semaphoreP.h (__sem_mappings_lock): Likewise.
498 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
499 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
500 instead of lll_*mutex_*, pass LLL_SHARED as last
502 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
503 pass LLL_SHARED as last argument.
504 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
505 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
506 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
507 pass LLL_SHARED as last argument.
508 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
509 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
510 LLL_SHARED as last argument.
511 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
512 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
514 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
515 __libc_lock_lock_recursive, __libc_lock_unlock,
516 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
517 argument to lll_{,un}lock.
518 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
519 _IO_lock_unlock): Likewise.
520 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
522 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
523 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
525 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
527 (__fork_lock): Change type to int.
528 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
529 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
530 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
532 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
533 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
534 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
536 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
537 pass it through to lll_futex_*wait, only compile in when
539 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
540 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
541 argument and pass it through to lll_futex_*wait.
542 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
543 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
544 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
545 inline functions to __lll_* resp. __lll_robust_*.
546 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
547 (lll_mutex_dead): Add private argument.
548 (__lll_lock_wait_private): New prototype.
549 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
550 __lll_robust_lock_timedwait): Add private argument to prototypes.
551 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
552 call __lll_lock_wait_private, otherwise pass private to
554 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
555 __lll_robust_timedlock): Add private argument, pass it to
556 __lll_*wait functions.
557 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
558 call __lll_unlock_wake_private, otherwise pass private to
560 (__lll_robust_unlock): Add private argument, pass it to
561 __lll_robust_unlock_wake.
562 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
563 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
564 argument, pass it through to __lll_* inline function.
565 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
566 (lll_lock_t): Remove.
567 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
568 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
569 lll_cond_wake, lll_cond_broadcast): Remove.
570 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
571 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
572 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
573 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
574 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
575 the header from assembler. Renamed all lll_mutex_* resp.
576 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
577 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
578 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
579 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
580 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
581 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
582 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
584 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
585 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
586 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
587 (lll_trylock): Likewise, use __lll_trylock_asm, pass
588 MULTIPLE_THREADS_OFFSET as another asm operand.
589 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
590 MULTIPLE_THREADS_OFFSET as last asm operand, call
591 __lll_lock_wait_private if private is constant LLL_PRIVATE,
592 otherwise pass private as another argument to __lll_lock_wait.
593 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
594 lll_timedlock, lll_robust_timedlock): Add private argument, pass
595 private as another argument to __lll_*lock_wait call.
596 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
597 MULTIPLE_THREADS_OFFSET as another asm operand, call
598 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
599 otherwise pass private as another argument to __lll_unlock_wake.
600 (lll_robust_unlock): Add private argument, pass private as another
601 argument to __lll_unlock_wake.
602 (lll_robust_dead): Add private argument, use __lll_private_flag
604 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
605 LLL_MUTEX_LOCK_INITIALIZER.
606 (lll_lock_t): Remove.
607 (LLL_LOCK_INITIALIZER_WAITERS): Define.
608 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
609 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
610 lll_cond_wake, lll_cond_broadcast): Remove.
611 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
612 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
613 2007-05-2{3,9} changes.
614 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
615 kernel-features.h and lowlevellock.h.
616 (LOAD_PRIVATE_FUTEX_WAIT): Define.
617 (LOAD_FUTEX_WAIT): Rewritten.
618 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
620 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
621 (__lll_mutex_lock_wait): Rename to ...
622 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
623 %ecx, %ecx is now private argument. Don't compile in for libc.so.
624 (__lll_mutex_timedlock_wait): Rename to ...
625 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
626 contains private argument. Don't compile in for libc.so.
627 (__lll_mutex_unlock_wake): Rename to ...
628 (__lll_unlock_wake): ... this. %ecx contains private argument.
629 Don't compile in for libc.so.
630 (__lll_timedwait_tid): Use __NR_gettimeofday.
631 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
632 kernel-features.h and lowlevellock.h.
633 (LOAD_FUTEX_WAIT): Define.
634 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
636 (__lll_robust_mutex_lock_wait): Rename to ...
637 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
638 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
640 (__lll_robust_mutex_timedlock_wait): Rename to ...
641 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
642 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
643 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
645 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
646 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
647 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
648 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
649 to __lll_lock_wait in %edx.
650 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
651 Include lowlevellock.h and pthread-errnos.h.
652 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
653 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
654 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
655 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
656 pass LLL_SHARED in %ecx to both __lll_lock_wait and
658 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
659 Include lowlevellock.h and pthread-errnos.h.
660 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
661 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
662 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
663 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
664 pass LLL_SHARED in %ecx to both __lll_lock_wait and
666 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
667 Include lowlevellock.h.
668 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
670 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
671 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
672 pass LLL_SHARED in %ecx to both __lll_lock_wait and
673 __lll_unlock_wake. Use __NR_gettimeofday.
674 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
675 Include lowlevellock.h.
676 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
677 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
678 to __lll_*, pass cond_lock address in %edx rather than %ecx to
679 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
680 and __lll_unlock_wake.
681 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
682 Include lowlevellock.h.
683 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
684 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
685 MUTEX(%ebx) address in %edx rather than %ecx to
686 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
687 and __lll_unlock_wake. Move return value from %ecx to %edx
689 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
690 Include lowlevellock.h.
691 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
693 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
694 MUTEX(%ebp) address in %edx rather than %ecx to
695 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
696 and __lll_unlock_wake. Move return value from %ecx to %edx
697 register. Use __NR_gettimeofday.
698 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
699 Include lowlevellock.h.
700 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
702 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
703 MUTEX(%ebp) address in %edx rather than %ecx to
704 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
705 and __lll_unlock_wake. Move return value from %ecx to %edx
706 register. Use __NR_gettimeofday.
707 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
708 Include lowlevellock.h.
709 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
710 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
711 MUTEX(%edi) address in %edx rather than %ecx to
712 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
713 and __lll_unlock_wake.
714 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
715 Include lowlevellock.h.
716 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
717 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
718 MUTEX(%ebx) address in %edx rather than %ecx to
719 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
720 and __lll_unlock_wake. Move return value from %ecx to %edx
722 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
724 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
726 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
727 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
728 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
730 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
731 (sem_timedwait): Use __NR_gettimeofday.
732 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
734 (LOCK): Don't define.
735 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
737 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
738 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
740 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
741 2007-05-2{3,9} changes.
742 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
743 kernel-features.h and lowlevellock.h.
744 (LOAD_PRIVATE_FUTEX_WAIT): Define.
745 (LOAD_FUTEX_WAIT): Rewritten.
746 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
747 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
748 (__lll_mutex_lock_wait): Rename to ...
749 (__lll_lock_wait): ... this. %esi is now private argument.
750 Don't compile in for libc.so.
751 (__lll_mutex_timedlock_wait): Rename to ...
752 (__lll_timedlock_wait): ... this. %esi contains private argument.
753 Don't compile in for libc.so.
754 (__lll_mutex_unlock_wake): Rename to ...
755 (__lll_unlock_wake): ... this. %esi contains private argument.
756 Don't compile in for libc.so.
757 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
758 kernel-features.h and lowlevellock.h.
759 (LOAD_FUTEX_WAIT): Define.
760 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
761 (__lll_robust_mutex_lock_wait): Rename to ...
762 (__lll_robust_lock_wait): ... this. %esi argument contains private.
763 Use LOAD_FUTEX_WAIT macro.
764 (__lll_robust_mutex_timedlock_wait): Rename to ...
765 (__lll_robust_timedlock_wait): ... this. %esi argument contains
766 private, use LOAD_FUTEX_WAIT macro.
767 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
769 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
770 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
771 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
772 __lll_lock_wait and __lll_unlock_wake.
773 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
774 Include lowlevellock.h and pthread-errnos.h.
775 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
776 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
777 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
778 pass LLL_SHARED in %esi to both __lll_lock_wait and
780 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
781 Include lowlevellock.h and pthread-errnos.h.
782 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
783 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
784 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
785 pass LLL_SHARED in %esi to both __lll_lock_wait and
787 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
788 Include lowlevellock.h.
789 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
790 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
791 pass LLL_SHARED in %esi to both __lll_lock_wait and
793 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
794 Include lowlevellock.h.
795 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
796 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
797 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
798 and __lll_unlock_wake.
799 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
800 Include lowlevellock.h.
801 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
803 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
804 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
805 and __lll_unlock_wake.
806 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
807 Include lowlevellock.h.
808 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
810 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
811 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
812 and __lll_unlock_wake.
813 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
814 Include lowlevellock.h.
815 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
817 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
818 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
819 and __lll_unlock_wake.
820 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
821 Include lowlevellock.h.
822 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
824 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
825 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
826 and __lll_unlock_wake.
827 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
828 Include lowlevellock.h.
829 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
831 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
832 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
833 and __lll_unlock_wake.
834 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
836 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
838 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
839 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
840 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
842 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
843 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
845 (LOCK): Don't define.
846 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
848 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
849 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
850 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
851 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
852 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
853 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
854 (__lll_lock_wait_private): New function.
855 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
856 it to lll_futex_*wait. Don't compile in for libc.so.
857 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
859 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
860 (struct sparc_pthread_barrier): Remove.
861 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
862 struct sparc_pthread_barrier. Pass
863 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
864 and lll_futex_wait macros.
865 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
867 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
868 Include sparc pthread_barrier_wait.c instead of generic one.
870 2007-07-30 Jakub Jelinek <jakub@redhat.com>
872 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
874 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
875 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
877 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
878 (pthread_rwlock_timedwrlock): Likewise.
879 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
880 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
882 2007-07-31 Jakub Jelinek <jakub@redhat.com>
884 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
886 2007-07-26 Jakub Jelinek <jakub@redhat.com>
888 * tst-locale2.c (useless): Add return statement.
890 2007-07-24 Jakub Jelinek <jakub@redhat.com>
892 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
893 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
894 * pthread_create.c (start_thread): Likewise.
895 * init.c (sighandler_setxid): Likewise.
896 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
897 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
898 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
899 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
900 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
901 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
902 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
903 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
904 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
906 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
908 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
910 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
911 __rtld_notify): Likewise.
912 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
913 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
914 __pthread_once): Likewise.
915 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
916 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
917 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
918 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
919 (lll_futex_wait): Add private argument, define as wrapper around
920 lll_futex_timed_wait.
921 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
922 use __lll_private_flag macro.
923 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
924 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
925 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
926 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
927 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
928 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
929 (lll_futex_wait): Add private argument, define as wrapper around
930 lll_futex_timed_wait.
931 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
932 use __lll_private_flag macro.
933 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
934 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
935 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
937 (lll_futex_timed_wait, lll_futex_wake): Use it.
938 (lll_private_futex_wait, lll_private_futex_timed_wait,
939 lll_private_futex_wake): Removed.
940 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
941 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
942 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
943 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
944 (lll_futex_wait): Add private argument, define as wrapper around
945 lll_futex_timed_wait.
946 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
947 use __lll_private_flag macro.
948 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
949 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
951 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
952 (lll_private_futex_wait, lll_private_futex_timed_wait,
953 lll_private_futex_wake): Removed.
954 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
955 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
956 (lll_private_futex_wait, lll_private_futex_timed_wait,
957 lll_private_futex_wake): Removed.
958 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
959 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
960 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
961 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
962 (lll_futex_wait): Add private argument, define as wrapper around
963 lll_futex_timed_wait.
964 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
965 use __lll_private_flag macro.
966 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
967 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
969 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
971 (lll_futex_timed_wait, lll_futex_wake): Use it.
972 (lll_private_futex_wait, lll_private_futex_timed_wait,
973 lll_private_futex_wake): Removed.
975 2007-07-27 Jakub Jelinek <jakub@redhat.com>
977 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
978 of the structure for sparc32.
980 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
982 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
984 2007-07-23 Ulrich Drepper <drepper@redhat.com>
986 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
987 code used when private futexes are assumed.
988 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
991 2007-07-23 Jakub Jelinek <jakub@redhat.com>
993 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
994 (__lll_private_flag): Define.
995 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
996 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
998 (lll_private_futex_wait, lll_private_futex_timedwait,
999 lll_private_futex_wake): Define as wrapper around non-_private
1001 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1002 (__lll_private_flag): Define.
1003 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1004 (lll_private_futex_wait, lll_private_futex_timedwait,
1005 lll_private_futex_wake): Define as wrapper around non-_private
1008 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
1010 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1011 parameter to lll_futex_wait call.
1012 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1014 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1015 Replace lll_futex_wait with lll_private_futex_wait.
1016 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1017 Add LLL_SHARED parameter to lll_futex_wake().
1019 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1020 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1021 lll_private_futex_wake.
1022 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1023 bit from private parm before syscall.
1024 (lll_futex_timed_wait): Likewise.
1025 (lll_futex_wake): Likewise.
1026 (lll_futex_wake_unlock): Likewise.
1027 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1028 (lll_robust_mutex_unlock): Likewise.
1029 (lll_mutex_unlock_force): Likewise.
1030 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1032 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1034 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1035 compilation when unconditionally using private futexes.
1036 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1037 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1039 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1040 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1042 2007-07-17 Jakub Jelinek <jakub@redhat.com>
1044 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1047 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1049 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1052 2007-05-16 Roland McGrath <roland@redhat.com>
1054 * init.c (__nptl_initial_report_events): New variable.
1055 (__pthread_initialize_minimal_internal): Initialize pd->report_events
1058 2007-06-22 Jakub Jelinek <jakub@redhat.com>
1060 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1061 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1063 2007-06-19 Ulrich Drepper <drepper@redhat.com>
1065 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1068 2007-06-18 Ulrich Drepper <drepper@redhat.com>
1070 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1071 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1072 * pthread_mutex_timedlock.c: Likewise.
1073 * pthread_mutex_trylock.c: Likewise.
1074 * pthread_mutex_unlock.c: Likewise.
1076 2007-06-17 Andreas Schwab <schwab@suse.de>
1078 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1081 2007-06-17 Ulrich Drepper <drepper@redhat.com>
1083 * allocatestack.c (allocate_stack): Make code compile if
1084 __ASSUME_PRIVATE_FUTEX is set.
1086 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1088 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1089 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1090 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1091 (__pthread_rwlock_wrlock): Likewise.
1092 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1093 (pthread_rwlock_timedrdlock): Likewise.
1094 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1095 (pthread_rwlock_timedwrlock): Likewise.
1096 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1097 (__pthread_rwlock_unlock): Likewise.
1099 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1101 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1102 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1103 Split __flags into __flags, __shared, __pad1 and __pad2.
1104 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1105 futexes if they are available.
1106 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1107 in libc-lowlevellock.S allow using private futexes.
1108 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1109 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
1110 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
1111 to call lll_futex_timed_wait. Add lll_private_futex_wait,
1112 lll_private_futex_timed_wait and lll_private_futex_wake.
1113 (lll_robust_mutex_unlock): Fix typo.
1114 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1115 field in futex command setup.
1116 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1117 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1118 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1119 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1120 if they are available. Remove clear_once_control.
1121 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1122 futexes if they are available.
1123 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1124 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1125 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1126 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1127 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1128 Wake only when there are waiters.
1129 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1130 support. Indicate that there are waiters. Remove unnecessary
1131 extra cancellation test.
1132 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
1133 left-over duplication of __sem_wait_cleanup.
1135 2007-06-07 Ulrich Drepper <drepper@redhat.com>
1137 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1138 parameter to lll_futex_wait, lll_futex_timed_wait, and
1139 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
1140 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1141 lll_private_futex_wake.
1142 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1143 * allocatestack.c: Adjust use of lll_futex_* macros.
1145 * lowlevellock.h: Likewise.
1146 * pthread_barrier_wait.c: Likewise.
1147 * pthread_cond_broadcast.c: Likewise.
1148 * pthread_cond_destroy.c: Likewise.
1149 * pthread_cond_signal.c: Likewise.
1150 * pthread_cond_timedwait.c: Likewise.
1151 * pthread_cond_wait.c: Likewise.
1152 * pthread_create.c: Likewise.
1153 * pthread_mutex_lock.c: Likewise.
1154 * pthread_mutex_setprioceiling.c: Likewise.
1155 * pthread_mutex_timedlock.c: Likewise.
1156 * pthread_mutex_unlock.c: Likewise.
1157 * pthread_rwlock_timedrdlock.c: Likewise.
1158 * pthread_rwlock_timedwrlock.c: Likewise.
1159 * pthread_rwlock_unlock.c: Likewise.
1160 * sysdeps/alpha/tls.h: Likewise.
1161 * sysdeps/i386/tls.h: Likewise.
1162 * sysdeps/ia64/tls.h: Likewise.
1163 * sysdeps/powerpc/tls.h: Likewise.
1164 * sysdeps/pthread/aio_misc.h: Likewise.
1165 * sysdeps/pthread/gai_misc.h: Likewise.
1166 * sysdeps/s390/tls.h: Likewise.
1167 * sysdeps/sh/tls.h: Likewise.
1168 * sysdeps/sparc/tls.h: Likewise.
1169 * sysdeps/unix/sysv/linux/fork.c: Likewise.
1170 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1171 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1172 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1173 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1174 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1175 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1176 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1177 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1178 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1180 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1181 * sysdeps/x86_64/tls.h: Likewise.
1183 2007-05-29 Ulrich Drepper <drepper@redhat.com>
1185 * pthread_getattr_np.c: No need to install a cancellation handler,
1186 this is no cancellation point.
1187 * pthread_getschedparam.c: Likewise.
1188 * pthread_setschedparam.c: Likewise.
1189 * pthread_setschedprio.c: Likewise.
1190 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1192 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1193 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1194 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1195 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1196 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1197 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1198 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1199 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1200 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1201 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1202 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1203 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1205 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1206 whether there are more than one thread makes no sense here since
1207 we only call the slow path if the locks are taken.
1208 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1210 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1211 COND_NWAITERS_SHIFT.
1212 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1214 * pthread_cond_init.c: Likewise.
1215 * pthread_cond_timedwait.c: Likewise.
1216 * pthread_cond_wait.c: Likewise.
1217 * pthread_condattr_getclock.c: Likewise.
1218 * pthread_condattr_setclock.c: Likewise.
1219 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1220 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1221 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1222 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1223 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1225 2007-05-28 Jakub Jelinek <jakub@redhat.com>
1227 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1230 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1232 (THREAD_GSCOPE_GET_FLAG): Remove.
1233 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1234 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1236 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1237 (THREAD_GSCOPE_GET_FLAG): Remove.
1238 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1239 instead of THREAD_GSCOPE_GET_FLAG.
1240 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
1242 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1243 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1244 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1245 THREAD_GSCOPE_WAIT): Define.
1246 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1247 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1248 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1249 THREAD_GSCOPE_WAIT): Define.
1250 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1251 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1252 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1253 THREAD_GSCOPE_WAIT): Define.
1254 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1255 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1256 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1257 THREAD_GSCOPE_WAIT): Define.
1259 2007-05-24 Richard Henderson <rth@redhat.com>
1261 * descr.h (struct pthread): Add header.gscope_flag.
1262 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1263 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1264 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1265 THREAD_GSCOPE_WAIT): Define.
1267 2007-05-27 Ulrich Drepper <drepper@redhat.com>
1269 * init.c: Make it compile with older kernel headers.
1271 * tst-initializers1.c: Show through exit code which test failed.
1273 * pthread_rwlock_init.c: Also initialize __shared field.
1274 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1275 element in rwlock structure into four byte elements. One of them is
1276 the new __shared element.
1277 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1279 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1280 __shared, adjust names of other padding elements.
1281 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1282 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1283 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1284 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1286 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1287 futex to use private operations if possible.
1288 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1290 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1292 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1293 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1294 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1295 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1297 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1299 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1300 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1302 2007-05-26 Ulrich Drepper <drepper@redhat.com>
1304 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1305 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1306 * pthread_rwlock_timedrdlock.c: Likewise.
1307 * pthread_rwlock_tryrdlock.c: Likewise.
1309 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1312 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1313 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1314 duplication of __sem_wait_cleanup.
1316 * allocatestack.c: Revert last change.
1318 * sysdeps/i386/tls.h: Likewise.
1319 * sysdeps/x86_64/tls.h: Likewise.
1320 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1322 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1324 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1326 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1327 * pthread_barrier_init.c: Set private flag if pshared and private
1328 futexes are supported.
1329 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1330 private field in futex command setup.
1331 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1333 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1335 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1337 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1338 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1339 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1340 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1341 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1343 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1344 * sem_init.c (__new_sem_init): Rewrite to initialize all three
1345 fields in the structure.
1346 (__old_sem_init): New function.
1347 * sem_open.c: Initialize all fields of the structure.
1348 * sem_getvalue.c: Adjust for renamed element.
1349 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1350 (gen-as-const-headers): Add structsem.sym.
1351 * sysdeps/unix/sysv/linux/structsem.sym: New file.
1352 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1353 struct new_sem. Add struct old_sem.
1354 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1355 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1356 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1357 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1358 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1359 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1360 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1361 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1362 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1363 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1364 * tst-sem10.c: New file.
1365 * tst-sem11.c: New file.
1366 * tst-sem12.c: New file.
1367 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1370 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1371 Jakub Jelinek <jakub@redhat.com>
1373 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1374 Move __pthread_enable_asynccancel right before futex syscall.
1375 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1378 2007-05-24 Jakub Jelinek <jakub@redhat.com>
1380 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1381 THREAD_COPY_PRIVATE_FUTEX): Define.
1382 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1383 THREAD_COPY_PRIVATE_FUTEX): Define.
1384 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1385 * init.c (__pthread_initialize_minimal_internal): Use
1386 THREAD_SET_PRIVATE_FUTEX.
1388 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1389 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1390 THREAD_GSCOPE_FLAG_WAIT): Define.
1391 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1392 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1393 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1395 (THREAD_GSCOPE_GET_FLAG): Define.
1396 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1397 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1398 instead of ->header.gscope_flag directly.
1400 2007-05-23 Ulrich Drepper <drepper@redhat.com>
1402 * init.c (__pthread_initialize_minimal_internal): Check whether
1403 private futexes are available.
1404 * allocatestack.c (allocate_stack): Copy private_futex field from
1405 current thread into the new stack.
1406 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1407 futexes if they are available.
1408 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1409 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1410 in libc-lowlevellock.S allow using private futexes.
1411 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1412 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1414 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1415 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1416 if they are available.
1417 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1418 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1419 * sysdeps/i386/tcb-offsets.sym: Likewise.
1420 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1421 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1423 2007-05-21 Ulrich Drepper <drepper@redhat.com>
1425 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1426 Remove ptr_wait_lookup_done again.
1427 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1428 (__pthread_initialize_minimal_internal): Initialize
1429 _dl_wait_lookup_done pointer in _rtld_global directly.
1430 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1431 Remove code to code _dl_wait_lookup_done.
1432 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1435 2007-05-21 Jakub Jelinek <jakub@redhat.com>
1437 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1438 pthread_mutex_init failed with ENOTSUP.
1440 2007-05-19 Ulrich Drepper <drepper@redhat.com>
1442 * allocatestack.c (__wait_lookup_done): New function.
1443 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1444 Add ptr_wait_lookup_done.
1445 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1446 * pthreadP.h: Declare __wait_lookup_done.
1447 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1448 Define macros to implement reference handling of global scope.
1449 * sysdeps/x86_64/tls.h: Likewise.
1450 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1451 Initialize GL(dl_wait_lookup_done).
1453 2007-05-17 Ulrich Drepper <drepper@redhat.com>
1456 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1458 * pthread_mutex_timedlock.c: Likewise.
1459 * pthread_mutex_trylock.c: Likewise.
1460 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1462 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1463 * tst-robust9.c: New file.
1464 * tst-robustpi9.c: New file.
1466 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1467 unnecessary extra cancellation test.
1469 2007-05-14 Ulrich Drepper <drepper@redhat.com>
1471 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1472 extra cancellation test.
1473 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1475 2007-05-10 Ulrich Drepper <drepper@redhat.com>
1477 * descr.h (struct pthread): Rearrange members to fill hole in
1480 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1481 (__pthread_setaffinity_new): If syscall was successful and
1482 RESET_VGETCPU_CACHE is defined, use it before returning.
1483 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1485 2007-05-10 Jakub Jelinek <jakub@redhat.com>
1488 * tst-align2.c: Include stackinfo.h.
1489 * tst-getpid1.c: Likewise.
1491 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
1494 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1495 * tst-getpid1.c (do_test): Likewise.
1498 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1499 (allocate_stack): Likewise.
1501 2007-05-07 Ulrich Drepper <drepper@redhat.com>
1503 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1504 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1505 (__lll_robust_timedlock_wait): Likewise.
1506 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1508 2007-05-06 Mike Frysinger <vapier@gentoo.org>
1511 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1512 * tst-cancel4.c (tf_fdatasync): New test.
1514 2007-04-27 Ulrich Drepper <drepper@redhat.com>
1517 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1518 check mutexes like normal mutexes.
1521 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1522 Initialize the whole sigevent structure to appease valgrind.
1524 2007-04-25 Ulrich Drepper <drepper@redhat.com>
1526 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1527 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1529 2007-04-06 Ulrich Drepper <drepper@redhat.com>
1531 * tst-locale1.c: Avoid warnings.
1532 * tst-locale2.c: Likewise.
1534 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
1536 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1537 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1539 2007-03-16 Jakub Jelinek <jakub@redhat.com>
1541 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1542 __extern_always_inline where appropriate.
1543 * sysdeps/pthread/pthread.h: Likewise.
1545 2007-03-13 Richard Henderson <rth@redhat.com>
1547 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1548 separate cfi regions for the two subsections.
1550 2007-02-25 Ulrich Drepper <drepper@redhat.com>
1552 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1553 new thread, don't just decrement it.
1554 Patch by Suzuki K P <suzuki@in.ibm.com>.
1556 2007-02-21 Ulrich Drepper <drepper@redhat.com>
1558 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1559 PTHFCT_CALL definition.
1561 2007-02-18 Ulrich Drepper <drepper@redhat.com>
1563 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1564 available, don't use it.
1566 2007-02-09 Jakub Jelinek <jakub@redhat.com>
1568 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1569 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1570 call into the kernel to delay.
1572 2007-01-18 Ulrich Drepper <drepper@redhat.com>
1574 * tst-initializers1.c: We want to test the initializers as seen
1575 outside of libc, so undefined _LIBC.
1577 * pthread_join.c (cleanup): Avoid warning.
1579 2007-01-17 Ulrich Drepper <drepper@redhat.com>
1581 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1582 (__lll_timedwait_tid): Add unwind info.
1584 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1585 function table, mangle the pointers.
1586 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1587 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1588 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1589 demangle pointers before use.
1590 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1592 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1593 * sysdeps/pthread/setxid.h: Likewise.
1595 2007-01-12 Ulrich Drepper <drepper@redhat.com>
1597 * tst-rwlock7.c: Show some more information in case of correct
1600 2007-01-11 Ulrich Drepper <drepper@redhat.com>
1602 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1603 (lll_futex_timed_wait): Undo part of last change, don't negate
1606 2007-01-10 Ulrich Drepper <drepper@redhat.com>
1608 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
1609 FUTEX_CMP_REQUEUE and lll_futex_requeue.
1611 2006-12-28 David S. Miller <davem@davemloft.net>
1613 * shlib-versions: Fix sparc64 linux target specification.
1615 2007-01-10 Jakub Jelinek <jakub@redhat.com>
1617 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1618 Adjust include path for pthread_barrier_wait.c move.
1620 2006-12-21 Jakub Jelinek <jakub@redhat.com>
1622 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1623 tid isn't reread from pd->tid in between ESRCH test and the syscall.
1625 2006-12-06 Jakub Jelinek <jakub@redhat.com>
1627 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1628 6 argument cancellable syscalls.
1629 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1630 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1631 6 argument cancellable syscalls.
1632 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1634 2006-12-09 Ulrich Drepper <drepper@redhat.com>
1636 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1637 (__rtld_mrlock_initialize): Add missing closing parenthesis.
1639 2006-10-30 Jakub Jelinek <jakub@redhat.com>
1641 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1642 __sync_lock_release instead of __sync_lock_release_si.
1644 2006-10-29 Jakub Jelinek <jakub@redhat.com>
1646 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1648 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1649 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1650 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1651 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1652 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1653 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1654 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1655 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1656 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1657 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1658 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1660 2006-10-27 Ulrich Drepper <drepper@redhat.com>
1662 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1663 * pthread_barrier_wait.c: ...here.
1664 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1665 * pthread_cond_broadcast.c: ...here.
1666 * sysdeps/pthread/pthread_cond_signal.c: Move to...
1667 * pthread_cond_signal.c: ...here.
1668 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1669 * pthread_cond_timedwait.c: ...here.
1670 * sysdeps/pthread/pthread_cond_wait.c: Move to...
1671 * pthread_cond_wait.c: ...here.
1672 * sysdeps/pthread/pthread_once.c: Move to...
1673 * pthread_once.c: ...here.
1674 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1675 * pthread_rwlock_rdlock.c: ...here.
1676 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1677 * pthread_rwlock_timedrdlock.c: ...here.
1678 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1679 * pthread_rwlock_timedwrlock.c: ...here.
1680 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1681 * pthread_rwlock_unlock.c: ...here.
1682 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1683 * pthread_rwlock_wrlock.c: ...here.
1684 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1685 * pthread_spin_destroy.c: ...here.
1686 * sysdeps/pthread/pthread_spin_init.c: Move to...
1687 * pthread_spin_init.c: ...here.
1688 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1689 * pthread_spin_unlock.c: ...here.
1690 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1691 * pthread_getcpuclockid.c: ...here.
1693 * init.c: USE_TLS support is now always enabled.
1694 * tst-tls5.h: Likewise.
1695 * sysdeps/alpha/tls.h: Likewise.
1696 * sysdeps/i386/tls.h: Likewise.
1697 * sysdeps/ia64/tls.h: Likewise.
1698 * sysdeps/powerpc/tls.h: Likewise.
1699 * sysdeps/s390/tls.h: Likewise.
1700 * sysdeps/sh/tls.h: Likewise.
1701 * sysdeps/sparc/tls.h: Likewise.
1702 * sysdeps/x86_64/tls.h: Likewise.
1704 2006-10-27 Jakub Jelinek <jakub@redhat.com>
1706 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1707 __rtld_mrlock_change): Update oldval if atomic compare and exchange
1710 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1711 Define to THREAD_SELF->header.multiple_threads.
1712 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1714 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1716 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1717 (SINGLE_THREAD_P): Likewise.
1718 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1719 (SINGLE_THREAD_P): Likewise.
1720 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1721 (SINGLE_THREAD_P): Likewise.
1722 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1723 (SINGLE_THREAD_P): Likewise.
1724 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1726 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1727 (SINGLE_THREAD_P): Likewise.
1728 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1729 (SINGLE_THREAD_P): Likewise.
1730 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1733 2006-10-26 Jakub Jelinek <jakub@redhat.com>
1735 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1736 by default rather than 2_3_3.
1738 2006-10-17 Jakub Jelinek <jakub@redhat.com>
1740 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1741 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1742 atomic_* instead of catomic_* macros.
1744 2006-10-12 Ulrich Drepper <drepper@redhat.com>
1747 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1748 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1749 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1750 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1751 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1752 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1753 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1754 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1755 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1756 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1757 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1758 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1759 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1761 2006-10-11 Ulrich Drepper <drepper@redhat.com>
1763 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1764 cancelable syscalls with six parameters.
1766 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1767 operations instead of atomic_*.
1769 2006-10-09 Ulrich Drepper <drepper@redhat.com>
1771 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
1773 2006-10-07 Ulrich Drepper <drepper@redhat.com>
1775 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1776 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1777 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1779 * pthread_attr_setstack.c: Allow overwriting the version number of the
1781 * pthread_attr_setstacksize.c: Likewise.
1782 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1784 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1785 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
1787 2006-09-24 Ulrich Drepper <drepper@redhat.com>
1790 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
1791 Patch by Petr Baudis.
1793 2006-09-18 Jakub Jelinek <jakub@redhat.com>
1795 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
1797 * tst-cancel2.c (tf): Loop as long as something was written.
1799 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1801 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
1802 mutexes wake all mutexes.
1803 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
1804 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1805 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1807 2006-09-12 Ulrich Drepper <drepper@redhat.com>
1809 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
1810 to guarantee the thread is always canceled.
1812 2006-09-08 Jakub Jelinek <jakub@redhat.com>
1814 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
1816 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
1817 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
1818 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1819 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1820 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1822 2006-09-08 Ulrich Drepper <drepper@redhat.com>
1825 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
1826 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1827 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1828 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1829 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1830 * Makefile (tests): Add tst-cond22.
1831 * tst-cond22.c: New file.
1833 2006-09-05 Ulrich Drepper <drepper@redhat.com>
1836 * descr.h (struct pthread): Add parent_cancelhandling.
1837 * sysdeps/pthread/createthread.c (create_thread): Pass parent
1838 cancelhandling value to child.
1839 * pthread_create.c (start_thread): If parent thread was canceled
1840 reset the SIGCANCEL mask.
1841 * Makefile (tests): Add tst-cancel25.
1842 * tst-cancel25.c: New file.
1844 2006-09-05 Jakub Jelinek <jakub@redhat.com>
1845 Ulrich Drepper <drepper@redhat.com>
1847 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
1848 counterp if it is already zero.
1849 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
1851 2006-03-04 Jakub Jelinek <jakub@redhat.com>
1852 Roland McGrath <roland@redhat.com>
1854 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
1855 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1856 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
1857 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1858 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1859 lll_robust_mutex_timedlock, lll_mutex_unlock,
1860 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1861 Add _L_*_ symbols around the subsection.
1862 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
1863 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
1865 2006-03-03 Jakub Jelinek <jakub@redhat.com>
1866 Roland McGrath <roland@redhat.com>
1868 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1869 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1870 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
1871 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1872 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1873 lll_robust_mutex_timedlock, lll_mutex_unlock,
1874 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1875 Add _L_*_ symbols around the subsection.
1876 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
1877 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1879 2006-08-31 Ulrich Drepper <drepper@redhat.com>
1881 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
1882 change because it can disturb too much existing code. If real hard
1883 reader preference is needed we'll introduce another type.
1884 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1885 (pthread_rwlock_timedwrlock): Likewise.
1886 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1889 2006-08-30 Ulrich Drepper <drepper@redhat.com>
1891 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
1893 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1894 (pthread_rwlock_timedwrlock): Likewise.
1895 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1898 2006-08-25 Jakub Jelinek <jakub@redhat.com>
1900 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
1901 Only define ifdef SHARED.
1903 2006-08-23 Ulrich Drepper <drepper@redhat.com>
1905 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
1906 (free_stacks): ...here.
1907 (__free_stack_cache): New function.
1908 * pthreadP.h: Declare __free_stack_cache.
1909 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1911 * init.c (pthread_functions): Initialize ptr_freeres.
1912 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
1913 New freeres function.
1915 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
1918 * Makefile (extra-objs): Add modules to extra-test-objs instead.
1920 2006-08-20 Ulrich Drepper <drepper@redhat.com>
1922 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1923 _XOPEN_REALTIME_THREADS.
1925 2006-08-15 Jakub Jelinek <jakub@redhat.com>
1927 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
1928 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
1929 HAVE_CLOCK_GETTIME_VSYSCALL.
1930 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
1932 2006-08-14 Jakub Jelinek <jakub@redhat.com>
1934 * sysdeps/unix/sysv/linux/bits/posix_opt.h
1935 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
1936 * descr.h (struct priority_protection_data): New type.
1937 (struct pthread): Add tpp field.
1938 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
1939 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
1940 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
1941 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
1943 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
1944 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
1945 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
1946 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
1948 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
1950 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1951 * pthread_mutexattr_getprioceiling.c
1952 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
1953 in the SCHED_FIFO priority range.
1954 * pthread_mutexattr_setprioceiling.c
1955 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
1956 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
1957 if mutex is not TPP. Ceiling is now in __data.__lock.
1958 * pthread_mutex_setprioceiling.c: Include stdbool.h.
1959 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
1960 is now in __data.__lock. Add locking.
1961 * pthread_create.c (__free_tcb): Free pd->tpp structure.
1962 * Makefile (libpthread-routines): Add tpp.
1963 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
1964 * tst-tpp.h: New file.
1965 * tst-mutexpp1.c: New file.
1966 * tst-mutexpp6.c: New file.
1967 * tst-mutexpp10.c: New file.
1968 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
1969 * tst-mutex6.c (TEST_FUNCTION): Likewise.
1971 2006-08-12 Ulrich Drepper <drepper@redhat.com>
1974 * pthread_join.c (pthread_join): Account for self being canceled
1975 when checking for deadlocks.
1976 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
1977 (tf1): Don't print anything after pthread_join returns, this would be
1978 another cancellation point.
1980 * tst-join6.c: New file.
1981 * Makefile (tests): Add tst-join6.
1983 2006-08-03 Ulrich Drepper <drepper@redhat.com>
1986 * pthread_setspecific.c (__pthread_setspecific): Check
1987 out-of-range index before checking for unused key.
1989 * sysdeps/pthread/gai_misc.h: New file.
1991 2006-08-01 Ulrich Drepper <drepper@redhat.com>
1993 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
1994 file. Don't use sysctl.
1995 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
1996 overwrite the file if this is likely not true.
1998 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
2000 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2001 * Makefile (tests): Add tst-getpid3.
2002 * tst-getpid3.c: New file.
2004 2006-07-30 Roland McGrath <roland@redhat.com>
2006 * Makefile (libpthread-routines): Add ptw-sigsuspend.
2008 * sysdeps/unix/sysv/linux/i386/not-cancel.h
2009 (pause_not_cancel): New macro.
2010 (nanosleep_not_cancel): New macro.
2011 (sigsuspend_not_cancel): New macro.
2012 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2013 nanosleep_not_cancel macro from <not-cancel.h>.
2014 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2015 macro from <not-cancel.h>.
2017 2006-07-28 Ulrich Drepper <drepper@redhat.com>
2018 Jakub Jelinek <jakub@redhat.com>
2020 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2021 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
2022 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2023 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2024 * pthread_mutex_init.c: Add support for priority inheritance mutex.
2025 * pthread_mutex_lock.c: Likewise.
2026 * pthread_mutex_timedlock.c: Likewise.
2027 * pthread_mutex_trylock.c: Likewise.
2028 * pthread_mutex_unlock.c: Likewise.
2029 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2031 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2032 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2033 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2034 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2035 pthread-pi-defines.sym.
2036 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2037 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2038 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2039 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2040 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2041 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2042 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2043 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2044 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2045 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2046 _POSIX_THREAD_PRIO_INHERIT to 200112L.
2047 * tst-mutex1.c: Adjust to allow use in PI mutex test.
2048 * tst-mutex2.c: Likewise.
2049 * tst-mutex3.c: Likewise.
2050 * tst-mutex4.c: Likewise.
2051 * tst-mutex5.c: Likewise.
2052 * tst-mutex6.c: Likewise.
2053 * tst-mutex7.c: Likewise.
2054 * tst-mutex7a.c: Likewise.
2055 * tst-mutex8.c: Likewise.
2056 * tst-mutex9.c: Likewise.
2057 * tst-robust1.c: Likewise.
2058 * tst-robust7.c: Likewise.
2059 * tst-robust8.c: Likewise.
2060 * tst-mutexpi1.c: New file.
2061 * tst-mutexpi2.c: New file.
2062 * tst-mutexpi3.c: New file.
2063 * tst-mutexpi4.c: New file.
2064 * tst-mutexpi5.c: New file.
2065 * tst-mutexpi6.c: New file.
2066 * tst-mutexpi7.c: New file.
2067 * tst-mutexpi7a.c: New file.
2068 * tst-mutexpi8.c: New file.
2069 * tst-mutexpi9.c: New file.
2070 * tst-robust1.c: New file.
2071 * tst-robust2.c: New file.
2072 * tst-robust3.c: New file.
2073 * tst-robust4.c: New file.
2074 * tst-robust5.c: New file.
2075 * tst-robust6.c: New file.
2076 * tst-robust7.c: New file.
2077 * tst-robust8.c: New file.
2078 * Makefile (tests): Add the new tests.
2080 * pthread_create.c (start_thread): Add some casts to avoid warnings.
2081 * pthread_mutex_destroy.c: Remove unneeded label.
2083 2006-07-01 Ulrich Drepper <drepper@redhat.com>
2085 * pthread_mutex_init.c (__pthread_mutex_init): Move some
2086 computations to compile time.
2088 2006-06-04 Ulrich Drepper <drepper@redhat.com>
2090 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2092 2006-05-15 Ulrich Drepper <drepper@redhat.com>
2094 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2096 2006-05-11 Ulrich Drepper <drepper@redhat.com>
2098 * pthread_key_create.c (__pthread_key_create): Do away with
2099 __pthread_keys_lock.
2101 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2102 (__kernel_cpumask_size): Mark as hidden.
2103 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2105 * sem_open.c (__sem_mappings_lock): Mark as hidden.
2106 * semaphoreP.h (__sem_mappings_lock): Likewise.
2108 2006-05-10 Ulrich Drepper <drepper@redhat.com>
2110 * pthread_atfork.c: Mark __dso_handle as hidden.
2112 2006-05-09 Ulrich Drepper <drepper@redhat.com>
2115 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2116 the reload problem. Change the one path in pthread_cancel_init
2117 which causes the problem. Force gcc to reload. Simplify callers.
2118 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2119 (_Unwind_GetBSP): Undo last patch.
2121 2006-05-07 Ulrich Drepper <drepper@redhat.com>
2123 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2124 function pointer is reloaded after pthread_cancel_init calls.
2127 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2128 pointers are reloaded after pthread_cancel_init calls.
2130 2006-05-01 Ulrich Drepper <drepper@redhat.com>
2132 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2135 2006-04-27 Ulrich Drepper <drepper@redhat.com>
2137 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2138 Allocate new object which is passed to timer_sigev_thread so that
2139 the timer can be deleted before the new thread is scheduled.
2141 2006-04-26 Roland McGrath <roland@redhat.com>
2143 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2145 2006-04-08 Ulrich Drepper <drepper@redhat.com>
2147 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2148 suffix for conditional jumps.
2149 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2150 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2151 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2152 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2153 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2154 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2156 * init.c (sigcancel_handler): Compare with correct PID even if the
2157 thread is in the middle of a fork call.
2158 (sighandler_setxid): Likewise.
2159 Reported by Suzuki K P <suzuki@in.ibm.com> .
2161 2006-04-07 Jakub Jelinek <jakub@redhat.com>
2163 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2165 2006-04-06 Ulrich Drepper <drepper@redhat.com>
2167 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2168 fails [Coverity CID 105].
2170 2006-04-05 Ulrich Drepper <drepper@redhat.com>
2172 * sysdeps/pthread/pthread.h: Add nonnull attributes.
2174 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
2177 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2178 Define __lll_rel_instr using lwsync.
2180 2006-03-27 Ulrich Drepper <drepper@redhat.com>
2182 * allocatestack.c (allocate_stack): Always initialize robust_head.
2183 * descr.h: Define struct robust_list_head.
2184 (struct pthread): Use robust_list_head in robust mutex list definition.
2185 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2186 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2187 (__pthread_initialize_minimal_internal): Register robust_list with
2189 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2190 Declare __set_robust_list_avail.
2191 * pthread_create.c (start_thread): Register robust_list of new thread.
2192 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2194 * pthread_mutex_destroy.c: For robust mutexes don't look at the
2195 number of users, it's unreliable.
2196 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2197 set_robust_list syscall is available.
2198 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2199 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2200 Set robust_head.list_op_pending before trying to lock a robust mutex.
2201 * pthread_mutex_timedlock.c: Likewise.
2202 * pthread_mutex_trylock.c: Likewise.
2203 * pthread_mutex_unlock.c: Likewise for unlocking.
2204 * Makefile (tests): Add tst-robust8.
2205 * tst-robust8.c: New file.
2207 2006-03-08 Andreas Schwab <schwab@suse.de>
2209 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2210 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2212 2006-03-05 Roland McGrath <roland@redhat.com>
2214 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2215 and $config_os doesn't match *linux*.
2217 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
2219 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2220 Use __syscall_error.
2221 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2222 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2223 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2224 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2225 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2226 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2228 2006-03-02 Ulrich Drepper <drepper@redhat.com>
2230 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2232 2006-03-01 Ulrich Drepper <drepper@redhat.com>
2234 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2235 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2237 (__lll_robust_timedlock_wait): Likewise.
2238 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2239 (__lll_robust_lock_wait): Likewise.
2240 (__lll_robust_timedlock_wait): Likewise.
2241 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2242 (__lll_robust_lock_wait): Likewise.
2243 (__lll_robust_timedlock_wait): Likewise.
2245 2006-03-01 Jakub Jelinek <jakub@redhat.com>
2247 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2248 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2249 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2250 lll_robust_mutex_unlock): Define.
2251 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2253 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
2255 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2256 instead of <clone.S>.
2258 2006-02-27 Jakub Jelinek <jakub@redhat.com>
2260 * Makefile (libpthread-routines): Add
2261 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2262 and pthread_mutex_[sg]etprioceiling.
2263 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2264 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2265 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2266 pthread_mutex_setprioceiling.
2267 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2268 PTHREAD_PRIO_PROTECT): New enum values.
2269 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2270 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2271 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2273 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2274 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2275 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2277 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2278 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2279 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2280 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2281 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2282 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2283 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2285 * pthread_mutex_getprioceiling.c: New file.
2286 * pthread_mutex_setprioceiling.c: New file.
2287 * pthread_mutexattr_getprioceiling.c: New file.
2288 * pthread_mutexattr_setprioceiling.c: New file.
2289 * pthread_mutexattr_getprotocol.c: New file.
2290 * pthread_mutexattr_setprotocol.c: New file.
2292 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2294 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2296 2006-02-27 Roland McGrath <roland@redhat.com>
2298 * sysdeps/pthread/Subdirs: List nptl here too.
2299 * configure (libc_add_on_canonical): New variable.
2301 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2303 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2304 self to get main source tree's file.
2305 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2306 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2307 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2308 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2309 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2310 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2311 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2312 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2313 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2314 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2315 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2316 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2317 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2319 * Makefile: Use $(sysdirs) in vpath directive.
2321 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2322 (CPPFLAGS-timer_routines.c): Likewise.
2324 * Makeconfig (includes): Variable removed.
2326 2006-02-26 Roland McGrath <roland@redhat.com>
2328 * sysdeps/generic/pt-raise.c: Moved to ...
2329 * pt-raise.c: ... here.
2330 * sysdeps/generic/lowlevellock.h: Moved to ...
2331 * lowlevellock.h: ... here.
2333 2006-02-23 Roland McGrath <roland@redhat.com>
2335 * descr.h (struct pthread): Add final member `end_padding'.
2336 (PTHREAD_STRUCT_END_PADDING): Use it.
2338 2006-02-20 Roland McGrath <roland@redhat.com>
2340 * sysdeps/mips: Directory removed, saved in ports repository.
2341 * sysdeps/unix/sysv/linux/mips: Likewise.
2343 2006-02-18 Ulrich Drepper <drepper@redhat.com>
2345 * tst-robust1.c: Add second mutex to check that the mutex list is
2348 2006-02-17 Jakub Jelinek <jakub@redhat.com>
2350 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2351 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2352 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2353 lll_robust_mutex_unlock): New macros.
2354 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2355 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2356 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2357 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2358 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2360 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2362 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2364 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2366 2006-02-17 Ulrich Drepper <drepper@redhat.com>
2368 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2369 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2370 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2371 (lll_robust_mutex_unlock): Likewise.
2373 2006-02-13 Jakub Jelinek <jakub@redhat.com>
2375 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2376 Set robust_list.__next rather than robust_list.
2377 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2378 (__pthread_list_t): New typedef.
2379 (pthread_mutex_t): Replace __next and __prev fields with __list.
2380 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2381 (__pthread_list_t): New typedef.
2382 (pthread_mutex_t): Replace __next and __prev fields with __list.
2383 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2384 (__pthread_list_t, __pthread_slist_t): New typedefs.
2385 (pthread_mutex_t): Replace __next and __prev fields with __list.
2386 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2387 (__pthread_list_t, __pthread_slist_t): New typedefs.
2388 (pthread_mutex_t): Replace __next and __prev fields with __list.
2389 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2390 (__pthread_list_t, __pthread_slist_t): New typedefs.
2391 (pthread_mutex_t): Replace __next and __prev fields with __list.
2392 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2393 (__pthread_slist_t): New typedef.
2394 (pthread_mutex_t): Replace __next field with __list.
2396 2006-02-15 Ulrich Drepper <drepper@redhat.com>
2398 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2399 PTHREAD_MUTEX_OWNERDEAD.
2400 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2401 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2402 * Makefile (libpthread-routines): Add lowlevelrobustlock.
2403 * pthread_create.c (start_thread): Very much simplify robust_list loop.
2404 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2405 to PTHREAD_MUTEX_INCONSISTENT.
2406 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2407 * pthread_mutex_lock.c: Reimplement robust mutex handling.
2408 * pthread_mutex_trylock.c: Likewise.
2409 * pthread_mutex_timedlock.c: Likewise.
2410 * pthread_mutex_unlock.c: Likewise.
2411 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2412 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2413 lowlevelrobustlock.sym.
2414 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2415 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2417 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2418 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2419 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2420 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2421 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2423 2006-02-12 Ulrich Drepper <drepper@redhat.com>
2425 * allocatestack.c (allocate_stack): Initialize robust_list.
2426 * init.c (__pthread_initialize_minimal_internal): Likewise.
2427 * descr.h (struct xid_command): Pretty printing.
2428 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2429 robust_list. Adjust macros.
2430 * pthread_create.c (start_thread): Adjust robust_list handling.
2431 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2432 but the owner for all robust mutex types.
2433 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2434 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
2435 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2436 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2438 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2439 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2441 2006-02-08 Jakub Jelinek <jakub@redhat.com>
2443 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2444 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2446 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2448 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2450 (lll_futex_timed_wait): Define.
2452 2006-01-19 Ulrich Drepper <drepper@redhat.com>
2454 * tst-cancel4.c: Test ppoll.
2456 2006-01-18 Andreas Jaeger <aj@suse.de>
2459 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2460 (pthread_mutex_t): Follow changes for other archs. Based on patch
2461 by Jim Gifford <patches@jg555.com>.
2463 2006-01-13 Richard Henderson <rth@redhat.com>
2465 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2467 2006-01-10 Roland McGrath <roland@redhat.com>
2469 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2470 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2471 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2472 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2473 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2474 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2475 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2476 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2477 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2478 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2480 2006-01-09 Roland McGrath <roland@redhat.com>
2482 * tst-initializers1-c89.c: New file.
2483 * tst-initializers1-c99.c: New file.
2484 * tst-initializers1-gnu89.c: New file.
2485 * tst-initializers1-gnu99.c: New file.
2486 * Makefile (tests): Add them.
2487 (CFLAGS-tst-initializers1-c89.c): New variable.
2488 (CFLAGS-tst-initializers1-c99.c): New variable.
2489 (CFLAGS-tst-initializers1-gnu89.c): New variable.
2490 (CFLAGS-tst-initializers1-gnu99.c): New variable.
2492 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2493 Use __extension__ on anonymous union definition.
2494 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2495 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2496 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2497 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2498 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2500 2006-01-08 Jakub Jelinek <jakub@redhat.com>
2502 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2503 Don't give the union a name because it changes the mangled name.
2504 Instead name the struct for __data.
2505 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2507 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2510 2006-01-09 Jakub Jelinek <jakub@redhat.com>
2512 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2513 stack bias to mc_ftp field.
2515 2006-01-07 Ulrich Drepper <drepper@redhat.com>
2517 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2518 being too clever and reloading the futex value where it shouldn't.
2520 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2522 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2525 2006-01-06 Jakub Jelinek <jakub@redhat.com>
2527 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2530 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2532 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2533 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2534 rename in tcbhead_t.
2536 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2537 Don't give the union a name because it changes the mangled name.
2538 Instead name the struct for __data.
2539 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2540 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2541 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2542 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2543 * pthread_create.c (start_thread): Adjust robust mutex free loop.
2544 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2546 2006-01-05 Ulrich Drepper <drepper@redhat.com>
2548 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2550 (lll_futex_timed_wait): Define.
2551 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2552 * sysdeps/pthread/aio_misc.h: New file.
2554 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
2556 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2558 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
2560 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2561 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2562 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2564 2006-01-04 Ulrich Drepper <drepper@redhat.com>
2566 * tst-cancel24.cc: Use C headers instead of C++ headers.
2568 2006-01-03 Jakub Jelinek <jakub@redhat.com>
2570 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2571 sparc-linux configured glibc.
2572 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2573 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2574 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2575 atomic_compare_and_exchange_val_24_acq instead of
2576 atomic_compare_and_exchange_val_acq.
2577 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2578 instead of atomic_exchange_rel.
2579 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2580 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2582 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2584 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2585 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2586 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2587 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2588 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2589 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2591 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2593 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2594 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2595 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2597 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2599 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2601 2006-01-03 Ulrich Drepper <drepper@redhat.com>
2603 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2606 2006-01-02 Jakub Jelinek <jakub@redhat.com>
2608 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2609 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2610 THREAD_COPY_POINTER_GUARD): Define.
2611 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2612 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2614 2006-01-01 Ulrich Drepper <drepper@redhat.com>
2616 * version.c: Update copyright year.
2618 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2620 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2621 .eh_frame section, use cfi_* directives.
2622 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2624 2005-12-30 Ulrich Drepper <drepper@redhat.com>
2626 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2629 2005-12-29 Ulrich Drepper <drepper@redhat.com>
2631 * sysdeps/pthread/sigaction.c: Removed.
2632 * sigaction.c: New file.
2633 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2635 2005-12-28 Ulrich Drepper <drepper@redhat.com>
2637 * Makefile (tests): Add tst-signal7.
2638 * tst-signal7.c: New file.
2640 2005-12-27 Roland McGrath <roland@redhat.com>
2642 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2643 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2644 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2645 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2646 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2647 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2648 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2649 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2650 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2651 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2652 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2654 2005-12-27 Jakub Jelinek <jakub@redhat.com>
2656 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2657 and __prev field to pthread_mutex_t.
2658 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2659 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2660 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2661 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2662 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2665 2005-12-26 Ulrich Drepper <drepper@redhat.com>
2667 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2668 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2669 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2670 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2671 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2672 and PTHREAD_MUTEXATTR_FLAG_BITS.
2673 * descr.h (struct pthread): Add robust_list field and define
2674 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2675 * pthread_mutexattr_getrobust.c: New file.
2676 * pthread_mutexattr_setrobust.c: New file.
2677 * pthread_mutex_consistent.c: New file.
2678 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2679 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2680 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2681 Adjust pthread_mutex_t initializers.
2682 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2683 field to pthread_mutex_t.
2684 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2685 and __prev field to pthread_mutex_t.
2686 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2687 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2688 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2689 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2690 * pthread_mutexattr_gettype.c: Likewise.
2691 * pthread_mutexattr_setpshared.c: Likewise.
2692 * pthread_mutexattr_settype.c: Likewise.
2693 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2694 Initialize mutex kind according to robust flag.
2695 * pthread_mutex_lock.c: Implement local robust mutex.
2696 * pthread_mutex_timedlock.c: Likewise.
2697 * pthread_mutex_trylock.c: Likewise.
2698 * pthread_mutex_unlock.c: Likewise.
2699 * pthread_create.c (start_thread): Mark robust mutexes which remained
2701 * tst-robust1.c: New file.
2702 * tst-robust2.c: New file.
2703 * tst-robust3.c: New file.
2704 * tst-robust4.c: New file.
2705 * tst-robust5.c: New file.
2706 * tst-robust6.c: New file.
2707 * tst-robust7.c: New file.
2708 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2709 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2710 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2711 tst-robust5, tst-robust6, and tst-robust7.
2713 * tst-typesizes.c: New file.
2714 * Makefile (tests): Add tst-typesizes.
2716 * tst-once3.c: More debug output.
2718 2005-12-24 Ulrich Drepper <drepper@redhat.com>
2720 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2721 missing after last change.
2723 * version.c: Update copyright year.
2725 2005-12-23 Ulrich Drepper <drepper@redhat.com>
2727 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2728 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2729 * pthread_mutex_trylock.c: Likewise.
2730 * pthread_mutex_timedlock.c: Likewise.
2731 * pthread_mutex_unlock.c: Likewise.
2733 2005-12-22 Roland McGrath <roland@redhat.com>
2735 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2736 so that #include_next's search location is not reset to the -I..
2737 directory where <nptl/...> can be found.
2739 2005-12-22 Ulrich Drepper <drepper@redhat.com>
2742 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2743 Fix unwind info. Remove useless branch prediction prefix.
2744 * tst-cancel24.cc: New file.
2745 * Makefile: Add rules to build and run tst-cancel24.
2747 2005-12-21 Roland McGrath <roland@redhat.com>
2749 * libc-cancellation.c: Use <> rather than "" #includes.
2750 * pt-cleanup.c: Likewise.
2751 * pthread_create.c: Likewise.
2752 * pthread_join.c: Likewise.
2753 * pthread_timedjoin.c: Likewise.
2754 * pthread_tryjoin.c: Likewise.
2755 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2756 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2757 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2758 * unwind.c: Likewise.
2760 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2762 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2763 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2764 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2765 THREAD_COPY_POINTER_GUARD): Define.
2767 2005-12-19 Jakub Jelinek <jakub@redhat.com>
2769 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2771 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2772 THREAD_COPY_POINTER_GUARD): Define.
2773 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2774 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2775 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2776 THREAD_COPY_POINTER_GUARD): Define.
2777 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2778 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2779 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2780 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2781 Use PTR_DEMANGLE for B0 if defined.
2783 2005-12-17 Ulrich Drepper <drepper@redhat.com>
2785 * pthread_create.c (__pthread_create_2_1): Use
2786 THREAD_COPY_POINTER_GUARD if available.
2787 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2788 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2789 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
2790 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
2791 * sysdeps/x86_64/tls.h: Likewise.
2793 2005-12-15 Roland McGrath <roland@redhat.com>
2795 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
2797 2005-12-13 Ulrich Drepper <drepper@redhat.com>
2799 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
2801 * errno-loc.c: New file.
2803 2005-12-12 Roland McGrath <roland@redhat.com>
2805 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
2806 adjustments before choosing stack size. Update minimum stack size
2807 calculation to match allocate_stack change.
2809 2005-12-12 Ulrich Drepper <drepper@redhat.com>
2811 * allocatestack.c (allocate_stack): Don't demand that there is an
2812 additional full page available on the stack beside guard, TLS, the
2815 2005-11-24 Ulrich Drepper <drepper@redhat.com>
2817 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2818 (__cleanup_fct_attribute): Use __regparm__ not regparm.
2820 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
2821 compiling 32-bit code we must define __cleanup_fct_attribute.
2823 005-11-24 Jakub Jelinek <jakub@redhat.com>
2826 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
2827 __attribute__ instead of __attribute.
2828 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2829 (__cleanup_fct_attribute): Likewise.
2831 2005-11-17 Jakub Jelinek <jakub@redhat.com>
2833 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
2834 a write barrier before writing libgcc_s_getcfa.
2836 2005-11-06 Ulrich Drepper <drepper@redhat.com>
2838 * sysdeps/unix/sysv/linux/configure: Removed.
2840 2005-11-05 Ulrich Drepper <drepper@redhat.com>
2842 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
2843 optional init_array/fini_array support.
2845 2005-10-24 Roland McGrath <roland@redhat.com>
2847 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
2848 versioned_symbol use.
2850 2005-10-16 Roland McGrath <roland@redhat.com>
2852 * init.c (__pthread_initialize_minimal_internal): Even when using a
2853 compile-time default stack size, apply the minimum that allocate_stack
2854 will require, and round up to page size.
2856 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
2858 * Makefile ($(test-modules)): Remove static pattern rule.
2860 2005-10-14 Jakub Jelinek <jakub@redhat.com>
2861 Ulrich Drepper <drepper@redhat.com>
2863 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
2864 alignment in callback function.
2865 * Makefile: Add rules to build and run tst-align3.
2866 * tst-align3.c: New file.
2868 2005-10-03 Jakub Jelinek <jakub@redhat.com>
2870 * allocatestack.c (setxid_signal_thread): Add
2871 INTERNAL_SYSCALL_DECL (err).
2873 2005-10-02 Jakub Jelinek <jakub@redhat.com>
2875 * allocatestack.c (setxid_signal_thread): Need to use
2876 atomic_compare_and_exchange_bool_acq.
2878 2005-10-01 Ulrich Drepper <drepper@redhat.com>
2879 Jakub Jelinek <jakub@redhat.com>
2881 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
2883 (struct pthread): Move specific_used field to avoid padding.
2884 Add setxid_futex field.
2885 * init.c (sighandler_setxid): Reset setxid flag and release the
2887 * allocatestack.c (setxid_signal_thread): New function. Broken
2888 out of the bodies of the two loops in __nptl_setxid. For undetached
2889 threads check whether they are exiting and if yes, don't send a signal.
2890 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
2891 * pthread_create.c (start_thread): For undetached threads, check
2892 whether setxid bit is set. If yes, wait until signal has been
2895 * allocatestack.c (STACK_VARIABLES): Initialize them.
2896 * pthread_create.c (__pthread_create_2_1): Initialize pd.
2898 2004-09-02 Jakub Jelinek <jakub@redhat.com>
2900 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
2901 waiters, awake all waiters on the associated mutex.
2903 2005-09-22 Roland McGrath <roland@redhat.com>
2905 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
2906 ../sysdeps/x86_64/hp-timing.h).
2908 2005-08-29 Jakub Jelinek <jakub@redhat.com>
2910 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
2911 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2912 (lll_futex_wake_unlock): Define.
2913 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
2914 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2915 (lll_futex_wake_unlock): Define.
2916 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
2917 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2918 (lll_futex_wake_unlock): Define.
2919 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
2920 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2921 (lll_futex_wake_unlock): Define.
2922 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
2923 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2924 (lll_futex_wake_unlock): Define.
2925 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
2926 lll_futex_wake_unlock.
2927 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2928 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2929 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
2930 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2931 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2932 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
2934 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2936 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2937 Fix typo in register name.
2939 2005-08-23 Ulrich Drepper <drepper@redhat.com>
2941 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2942 Use __sigfillset. Document that sigfillset does the right thing wrt
2945 2005-07-11 Jakub Jelinek <jakub@redhat.com>
2948 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
2949 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
2950 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
2951 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
2952 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
2953 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
2955 * Makefile (tests): Add tst-initializers1.
2956 (CFLAGS-tst-initializers1.c): Set.
2957 * tst-initializers1.c: New test.
2959 2005-07-11 Jakub Jelinek <jakub@redhat.com>
2961 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
2962 Make sure __flags are located at offset 48 from the start of the
2965 2005-07-02 Roland McGrath <roland@redhat.com>
2967 * Makeconfig: Comment fix.
2969 2005-07-05 Jakub Jelinek <jakub@redhat.com>
2971 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
2972 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
2973 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
2974 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
2975 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
2976 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2977 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
2978 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
2979 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
2980 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
2982 2005-06-25 Jakub Jelinek <jakub@redhat.com>
2984 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
2985 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2986 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
2988 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2989 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
2990 field. Put in sysinfo field unconditionally.
2991 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2992 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
2993 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2994 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
2996 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2997 * pthread_create.c (__pthread_create_2_1): Use
2998 THREAD_COPY_STACK_GUARD macro.
2999 * Makefile: Add rules to build and run tst-stackguard1{,-static}
3001 * tst-stackguard1.c: New file.
3002 * tst-stackguard1-static.c: New file.
3004 2005-06-14 Alan Modra <amodra@bigpond.net.au>
3006 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3007 Invoke CGOTSETUP and CGOTRESTORE.
3008 (CGOTSETUP, CGOTRESTORE): Define.
3010 2005-05-29 Richard Henderson <rth@redhat.com>
3012 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3013 (tf_write, tf_writev): Use it.
3014 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
3017 2005-05-23 Jakub Jelinek <jakub@redhat.com>
3019 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3020 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3021 __librt_*_asynccancel@local.
3023 2005-05-17 Alan Modra <amodra@bigpond.net.au>
3025 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3026 all occurrences of JUMPTARGET. Instead append @local to labels.
3028 2005-05-20 Jakub Jelinek <jakub@redhat.com>
3030 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3031 size/alignment of struct pthread rather than tcbhead_t.
3032 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3034 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3036 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3039 2005-05-19 Richard Henderson <rth@redhat.com>
3041 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3042 __sync_val_compare_and_swap, not explicit _si variant.
3043 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3045 2005-05-03 Ulrich Drepper <drepper@redhat.com>
3048 * sysdeps/pthread/pthread.h: Avoid empty initializers.
3050 2005-05-03 Jakub Jelinek <jakub@redhat.com>
3052 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3053 .eh_frame section, use cfi_* directives.
3055 2005-04-27 Jakub Jelinek <jakub@redhat.com>
3057 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3060 2005-04-27 Ulrich Drepper <drepper@redhat.com>
3063 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3066 2005-04-27 Roland McGrath <roland@redhat.com>
3068 * Makefile (tests): Remove tst-clock2.
3070 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3071 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3072 translating to the kernel clockid_t for our own process/thread clock.
3074 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3076 2005-04-15 Jakub Jelinek <jakub@redhat.com>
3078 * old_pthread_cond_init.c: Include <errno.h>.
3079 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3080 process shared or uses clock other than CLOCK_REALTIME.
3081 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3083 2005-04-13 David S. Miller <davem@davemloft.net>
3085 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3086 * sysdeps/sparc/sparc64/clone.S: New file.
3088 2005-04-05 Jakub Jelinek <jakub@redhat.com>
3091 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3092 __inline instead of inline.
3093 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3095 2005-03-31 Jakub Jelinek <jakub@redhat.com>
3097 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3098 functionally equivalent, but shorter instructions.
3099 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3100 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3101 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3103 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3104 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3105 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3106 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3107 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3108 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3109 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3111 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3112 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3113 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3114 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3115 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3117 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
3119 * sysdeps/mips/Makefile: New file.
3120 * sysdeps/mips/nptl-sysdep.S: New file.
3121 * sysdeps/mips/tcb-offsets.sym: New file.
3122 * sysdeps/mips/pthread_spin_lock.S: New file.
3123 * sysdeps/mips/pthread_spin_trylock.S: New file.
3124 * sysdeps/mips/pthreaddef.h: New file.
3125 * sysdeps/mips/tls.h: New file.
3126 * sysdeps/mips/jmpbuf-unwind.h: New file.
3127 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3128 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3129 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3130 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3131 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3132 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3133 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3134 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3135 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3136 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3138 2005-03-23 Ulrich Drepper <drepper@redhat.com>
3141 * pthread_create.c (__pthread_create_2_1): Rename syscall error
3144 2005-03-10 Jakub Jelinek <jakub@redhat.com>
3146 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3148 2005-02-25 Roland McGrath <roland@redhat.com>
3150 * alloca_cutoff.c: Correct license text.
3151 * tst-unload.c: Likewise.
3152 * sysdeps/pthread/allocalim.h: Likewise.
3153 * sysdeps/pthread/pt-initfini.c: Likewise.
3154 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3155 * sysdeps/pthread/bits/sigthread.h: Likewise.
3156 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3157 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3159 2005-02-16 Roland McGrath <roland@redhat.com>
3161 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3162 Use unsigned int * for ptr_nthreads.
3164 2005-02-14 Alan Modra <amodra@bigpond.net.au>
3167 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3170 2005-02-07 Richard Henderson <rth@redhat.com>
3173 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3176 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
3178 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3179 order of arguments in invocation of atomic_add_zero.
3181 2005-01-26 Jakub Jelinek <jakub@redhat.com>
3184 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3185 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3186 at least gotntpoff relocation and addition.
3187 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3189 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3191 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3194 2005-01-06 Ulrich Drepper <drepper@redhat.com>
3196 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3197 entry for static tls deallocation fix.
3198 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3199 also contains information whether the memory pointed to is static
3201 * sysdeps/i386/tls.h: Likewise.
3202 * sysdeps/ia64/tls.h: Likewise.
3203 * sysdeps/powerpc/tls.h: Likewise.
3204 * sysdeps/s390/tls.h: Likewise.
3205 * sysdeps/sh/tls.h: Likewise.
3206 * sysdeps/sparc/tls.h: Likewise.
3207 * sysdeps/x86_64/tls.h: Likewise.
3209 2004-12-27 Ulrich Drepper <drepper@redhat.com>
3211 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3213 2004-12-21 Jakub Jelinek <jakub@redhat.com>
3215 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3217 * Makefile (tests): Add tst-align2.
3218 * tst-align2.c: New test.
3219 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3220 -mpreferred-stack-boundary=4.
3222 2004-12-18 Roland McGrath <roland@redhat.com>
3224 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3225 New file removed withdrawn for the moment.
3227 2004-12-17 Richard Henderson <rth@redhat.com>
3229 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3230 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3232 2004-12-16 Ulrich Drepper <drepper@redhat.com>
3234 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3235 Increased PTHREAD_STACK_MIN.
3237 * tst-context1.c (stacks): Use bigger stack size.
3239 2004-12-16 Jakub Jelinek <jakub@redhat.com>
3241 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3242 * sysdeps/sparc/tcb-offsets.sym: Add TID.
3244 2004-12-15 Jakub Jelinek <jakub@redhat.com>
3246 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3247 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3248 * sysdeps/s390/tcb-offsets.sym (TID): Add.
3250 2004-12-15 Ulrich Drepper <drepper@redhat.com>
3252 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3254 2004-12-14 Ulrich Drepper <drepper@redhat.com>
3256 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3257 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3259 * tst-getpid1.c: If child crashes, report this first. Print which
3262 2004-12-09 Ulrich Drepper <drepper@redhat.com>
3264 * init.c (__pthread_initialize_minimal_internal): Also unblock
3267 2004-12-01 Jakub Jelinek <jakub@redhat.com>
3269 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3270 _POSIX_THREAD_CPUTIME): Define to 0.
3271 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3272 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3273 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3274 __timer_signal_thread_tclk): Remove.
3275 (init_module): Remove their initialization.
3276 (thread_cleanup): Remove their cleanup assertions.
3277 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3278 __timer_signal_thread_tclk): Remove.
3279 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3280 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3281 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3283 2004-12-07 Jakub Jelinek <jakub@redhat.com>
3285 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3286 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3288 * Makefile (tests): Add tst-getpid2.
3289 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3290 (do_test): Use it. Use __clone2 instead of clone on ia64.
3291 * tst-getpid2.c: New test.
3293 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3295 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3297 2004-12-04 Ulrich Drepper <drepper@redhat.com>
3299 * Makefile (tests): Add tst-getpid1.
3300 * tst-getpid1.c: New file.
3301 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3302 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3304 2004-12-02 Roland McGrath <roland@redhat.com>
3306 * Makefile (libpthread-nonshared): Variable removed.
3307 ($(objpfx)libpthread_nonshared.a): Target removed.
3308 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3309 These are now handled by generic magic from
3310 libpthread-static-only-routines being set.
3312 2004-11-27 Ulrich Drepper <drepper@redhat.com>
3314 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3315 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3316 _POSIX_THREAD_PRIO_PROTECT): Define.
3317 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3318 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3319 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3321 2004-11-26 Jakub Jelinek <jakub@redhat.com>
3323 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3324 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3325 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3326 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3327 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3328 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3329 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3331 2004-11-24 Ulrich Drepper <drepper@redhat.com>
3333 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3335 * Makefile (libpthread-routines): Add pthread_setschedprio.
3336 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3337 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3338 * pthread_setschedprio.c: New file.
3340 2004-11-20 Jakub Jelinek <jakub@redhat.com>
3342 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3343 * pthread_cancel.c (pthread_create): Likewise.
3345 * Makefile (libpthread-routines): Add vars.
3346 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3347 * init.c (__default_stacksize, __is_smp): Remove.
3349 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3350 and define a wrapper macro.
3351 (PTHREAD_STATIC_FN_REQUIRE): Define.
3352 * allocatestack.c (__find_thread_by_id): Undefine.
3353 * pthread_create (__pthread_keys): Remove.
3354 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3355 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3356 PTHREAD_STATIC_FN_REQUIRE.
3358 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3360 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3361 parameter to REGISTER macro.
3363 2004-11-17 Roland McGrath <roland@redhat.com>
3365 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3366 Make sure SIGCANCEL is blocked as well.
3368 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3370 * sysdeps/pthread/setxid.h: New file.
3371 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3372 (struct xid_command): Add forward decl.
3373 (struct pthread_functions): Change return type of __nptl_setxid hook
3375 * pthreadP.h (__nptl_setxid): Change return type to int.
3376 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3377 calling thread, return its return value and set errno on failure.
3378 * descr.h (struct xid_command): Change id type to long array.
3380 * Makefile: Add rules to build and test tst-setuid1 and
3382 * tst-setuid1.c: New test.
3383 * tst-setuid1-static.c: New test.
3385 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3387 * Makefile (tests): Add tst-exit3.
3388 * tst-exit3.c: New test.
3390 2004-11-09 Ulrich Drepper <drepper@redhat.com>
3392 * Makefile (tests): Add tst-exit2.
3393 * tst-exit2.c: New file.
3395 2004-11-09 Roland McGrath <roland@redhat.com>
3398 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3399 here, before calling clone.
3400 * pthread_create.c (start_thread): Don't do it here.
3402 2004-11-02 Jakub Jelinek <jakub@redhat.com>
3404 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3406 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3408 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3409 Set ETIMEDOUT to errno when time is up. Tweak to avoid
3412 2004-10-28 Jakub Jelinek <jakub@redhat.com>
3414 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3415 if sched_priority is not between minprio and maxprio.
3417 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3419 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3420 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3422 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3423 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3425 2004-10-24 Ulrich Drepper <drepper@redhat.com>
3427 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3428 not-cancelable I/O functions.
3430 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3432 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3433 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3434 make sure 2 is stored in the futex and we looked at the old value.
3435 Fix a few other problems to return the correct value.
3437 2004-10-14 Richard Henderson <rth@redhat.com>
3439 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3442 2004-10-06 Jakub Jelinek <jakub@redhat.com>
3444 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3445 of pthread-functions.h and pthreaddef.h.
3446 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3448 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3449 Change __data.__nwaiters from int to unsigned int.
3451 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3452 sysconf (_SC_THREAD_CPUTIME) returns negative value.
3454 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3457 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3458 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3460 2004-10-06 Ulrich Drepper <drepper@redhat.com>
3462 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
3463 test fails, remove message queue.
3464 (tf_msgsnd): Likewise.
3466 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3468 * tst-clock1.c: Change #ifdef to #if defined.
3469 * tst-clock2.c: Likewise.
3470 * tst-cond11.c: Likewise.
3472 * sysdeps/pthread/timer_create.c (timer_create): Use
3473 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3474 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3477 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3479 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3480 _POSIX_THREAD_CPUTIME): Define to 0.
3482 2004-10-04 Ulrich Drepper <drepper@redhat.com>
3484 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3485 and _POSIX_THREAD_CPUTIME to zero.
3486 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3487 * tst-barrier2.c: Fix testing for POSIX feature.
3488 * tst-clock1.c: Likewise.
3489 * tst-clock2.c: Likewise.
3490 * tst-cond11.c: Likewise.
3491 * tst-cond4.c: Likewise.
3492 * tst-cond6.c: Likewise.
3493 * tst-flock2.c: Likewise.
3494 * tst-mutex4.c: Likewise.
3495 * tst-mutex9.c: Likewise.
3496 * tst-rwlock12.c: Likewise.
3497 * tst-rwlock4.c: Likewise.
3498 * tst-signal1.c: Likewise.
3499 * tst-spin2.c: Likewise.
3500 * sysdeps/pthread/posix-timer.h: Likewise.
3501 * sysdeps/pthread/timer_create.c: Likewise.
3502 * sysdeps/pthread/timer_routines.c: Likewise.
3504 2004-10-01 Ulrich Drepper <drepper@redhat.com>
3506 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3507 (__lll_mutex_timedlock_wait): Address futex correctly.
3509 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3510 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3511 make sure 2 is stored in the futex and we looked at the old value.
3512 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3513 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
3514 which might very well made the code not working at all before.
3517 2004-09-28 Ulrich Drepper <drepper@redhat.com>
3519 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3520 allow SIGSETXID to be sent.
3521 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3522 for SIGSETXID to be defined.
3523 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3524 SIGSETXID cannot be blocked.
3526 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3527 Add __extension__ to long long types.
3528 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3529 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3530 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3531 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3532 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3533 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3534 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3536 2004-09-25 Ulrich Drepper <drepper@redhat.com>
3538 * descr.h (struct pthread): Add stopped_start field.
3539 * sysdeps/pthread/createthread.c (create_thread): Set
3540 start_stopped flag in descriptor for new thread appropriately.
3541 * pthread_create.c (start_thread): Only take lock to be stopped on
3542 startup if stopped_start flag says so.
3544 2004-09-24 Ulrich Drepper <drepper@redhat.com>
3546 * pthread_create.c (__pthread_create_2_1): Remember whether thread
3547 is created detached and if yes, do not try to free the stack in case
3548 the thread creation failed.
3549 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3550 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3551 case there has been no error. [BZ #405]
3553 * pthread_create.c (start_thread): Don't wait for scheduler data
3554 etc to be set at the beginning of the function. The cancellation
3555 infrastructure must have been set up. And enable async
3556 cancellation before potentially going to sleep. [BZ #401]
3558 2004-09-20 Ulrich Drepper <drepper@redhat.com>
3560 * Versions: Remove exports for pthread_set*id_np functions.
3561 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3563 * Makefile: Don't build pthread_set*id code for now.
3565 2004-09-19 Ulrich Drepper <drepper@redhat.com>
3567 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3569 * allocatestack.c (__nptl_setxid): New function.
3570 * descr.h (struct xid_command): Define type.
3571 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3572 (sighandler_setxid): New function.
3573 (__pthread_initialize_minimal): Register sighandler_setxid for
3575 * pt-allocrtsig.c: Update comment.
3576 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
3577 Declare __nptl_setxid.
3578 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3579 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3580 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3581 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3582 and pthread_setresuid_np.
3583 * pthread_setgid_np.c: New file.
3584 * pthread_setuid_np.c: New file.
3585 * pthread_setegid_np.c: New file.
3586 * pthread_seteuid_np.c: New file.
3587 * pthread_setregid_np.c: New file.
3588 * pthread_setreuid_np.c: New file.
3589 * pthread_setresgid_np.c: New file.
3590 * pthread_setresuid_np.c: New file.
3591 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3592 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3593 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3594 and pthread_setresuid_np.
3595 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3596 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3597 pthread_setregid, and pthread_setresgid.
3599 2004-09-18 Ulrich Drepper <drepper@redhat.com>
3601 * allocatestack.c (allocate_stack): Return EAGAIN instead of
3602 ENOMEM when out of memory.
3604 2004-09-10 Roland McGrath <roland@redhat.com>
3607 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3608 code, since we don't try to use the broken CLONE_STOPPED any more.
3609 * pthread_create.c (start_thread): Likewise.
3611 2004-09-15 Richard Henderson <rth@redhat.com>
3613 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3615 2004-09-01 David Mosberger <davidm@hpl.hp.com>
3617 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3618 (__libc_unwind_longjmp): Delete macro and declare as function.
3619 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3620 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3622 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3623 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3624 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3626 2004-09-12 Ulrich Drepper <drepper@redhat.com>
3628 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3630 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3631 types also for __USE_XOPEN2K.
3632 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3633 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3634 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3635 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3636 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3637 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3638 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3641 2004-09-08 Ulrich Drepper <drepper@redhat.com>
3643 * sysdeps/pthread/pthread.h
3644 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3645 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3646 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3647 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3650 2004-09-07 Ulrich Drepper <drepper@redhat.com>
3652 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3653 PSEUDO to be used with . prefix.
3655 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3656 Use atomic_increment instead of atomic_exchange_and_add.
3657 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3659 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3661 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3664 * allocatestack.c (allocate_stack): Use atomic_increment_val
3665 instead of atomic_exchange_and_add.
3666 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3667 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3669 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3672 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3673 the initialization function might throw.
3675 2005-09-05 Richard Henderson <rth@redhat.com>
3677 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3678 Move definition inside libpthread, libc, librt check. Provide
3679 definition for rtld.
3681 2004-09-02 Ulrich Drepper <drepper@redhat.com>
3683 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3684 * sysdeps/i386/jmpbuf-unwind.h: Likewise
3685 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3686 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3687 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3688 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3689 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3690 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3693 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3694 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3695 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3697 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3698 Decrement __nwaiters. If pthread_cond_destroy has been called and
3699 this is the last waiter, signal pthread_cond_destroy caller and
3700 avoid using the pthread_cond_t structure after unlock.
3701 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3702 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3703 Read clock type from the least significant bits of __nwaiters instead
3705 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3706 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3708 2004-08-31 Jakub Jelinek <jakub@redhat.com>
3711 * Makefile (tests): Add tst-cond20 and tst-cond21.
3712 * tst-cond20.c: New test.
3713 * tst-cond21.c: New test.
3714 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3715 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3717 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3719 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3720 (pthread_cond_t): Likewise.
3721 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3723 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3725 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3727 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3728 (cond_nwaiters): New.
3730 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3731 if there are waiters not signalled yet.
3732 Wait until all already signalled waiters wake up.
3733 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3734 __nwaiters. If pthread_cond_destroy has been called and this is the
3735 last waiter, signal pthread_cond_destroy caller and avoid using
3736 the pthread_cond_t structure after unlock.
3737 (__pthread_cond_wait): Increment __nwaiters in the beginning,
3738 decrement it when leaving. If pthread_cond_destroy has been called
3739 and this is the last waiter, signal pthread_cond_destroy caller.
3740 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3741 Likewise. Read clock type from the least significant bits of
3742 __nwaiters instead of __clock.
3743 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3744 whether clock ID can be encoded in COND_CLOCK_BITS bits.
3745 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3746 clock type just from the last COND_CLOCK_BITS bits of value.
3747 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3748 instead of __clock, just from second bit of condattr's value.
3750 2004-08-30 Jakub Jelinek <jakub@redhat.com>
3752 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3753 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
3755 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3757 2004-08-15 Roland McGrath <roland@frob.com>
3759 * pthread_atfork.c: Update copyright terms including special exception
3760 for these trivial files, which are statically linked into executables
3761 that use dynamic linking for the significant library code.
3763 2004-08-09 Jakub Jelinek <jakub@redhat.com>
3765 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3766 pthread_rwlock_rdlock.
3767 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3768 Decrease __nr_readers_queued after reacquiring lock.
3769 * sysdeps/pthread/pthread_rwlock_timedrdlock
3770 (pthread_rwlock_timedrdlock): Likewise.
3771 Reported by Bob Cook <bobcook47@hotmail.com>.
3773 2004-08-11 Jakub Jelinek <jakub@redhat.com>
3775 * tst-rwlock14.c (tf): Read main thread handle from *ARG
3776 before pthread_barrier_wait.
3778 2004-08-07 Ulrich Drepper <drepper@redhat.com>
3780 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3781 Remove unnecessary exception handling data.
3783 2004-07-23 Jakub Jelinek <jakub@redhat.com>
3786 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3787 instead of clockid_t.
3789 2004-07-21 Roland McGrath <roland@redhat.com>
3791 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
3793 2004-07-19 Roland McGrath <roland@redhat.com>
3795 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
3797 2004-07-02 Roland McGrath <roland@redhat.com>
3799 * configure: Don't exit.
3801 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3803 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3804 (__pthread_cond_timedwait): Check for invalid nanosecond in
3807 2004-07-07 Ulrich Drepper <drepper@redhat.com>
3809 * Makefile: Add rules to build and run tst-fini1.
3810 * tst-fini1.c: New file.
3811 * tst-fini1mod.c: New file.
3813 2004-07-05 Ulrich Drepper <drepper@redhat.com>
3815 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
3816 if no cancellation support is needed.
3817 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3818 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3819 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3820 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3821 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3822 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3823 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3824 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3825 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3827 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
3828 only if not already defined.
3830 2004-07-05 Jakub Jelinek <jakub@redhat.com>
3832 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
3833 constraint "m" instead of "0" for futex.
3835 * shlib-versions: Add powerpc64-.*-linux.*.
3837 2004-07-04 Jakub Jelinek <jakub@redhat.com>
3839 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
3840 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
3842 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
3843 1 billion and 64-bit tv_nsec which is valid when truncated to 32
3846 2004-06-29 Roland McGrath <roland@redhat.com>
3848 * Banner: NPTL no longer has its own version number.
3849 * Makefile (nptl-version): Variable removed.
3850 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
3851 using $(version), the glibc version number.
3853 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3855 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
3856 Fix branch offset for a PLT entry.
3857 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
3859 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3861 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
3863 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
3866 2004-06-28 Jakub Jelinek <jakub@redhat.com>
3868 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
3871 2004-06-28 Jakub Jelinek <jakub@redhat.com>
3873 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3874 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
3876 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
3877 (pthread_rwlock_timedrdlock): Likewise.
3879 2004-06-22 Jakub Jelinek <jakub@redhat.com>
3881 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3882 Set __r7 to val, not mutex.
3884 2004-06-27 Ulrich Drepper <drepper@redhat.com>
3886 * Makefile: Add rules to build tst-rwlock14.
3887 * tst-rwlock14.c: New file.
3889 2004-06-24 Boris Hu <boris.hu@intel.com>
3891 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
3893 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
3895 2004-06-19 Andreas Jaeger <aj@suse.de>
3897 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
3898 assembler in last patch.
3900 2004-06-17 Ulrich Drepper <drepper@redhat.com>
3902 * sysdeps/pthread/pthread_cond_timedwait.c
3903 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
3904 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3905 (__pthread_cond_timedwait): Check for invalid nanosecond in
3907 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3908 * tst-cond19.c: New file.
3909 * Makefile: Add rules to build and run tst-cond19.
3911 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
3913 * tst-context1.c (GUARD_PATTERN): Defined.
3914 (tst_context_t): Define struct containing ucontext_t & guard words.
3915 (ctx): Declare as an array of tst_context_t.
3916 (fct): Verify uc_link & guard words are still valid.
3917 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
3919 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3921 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3922 Add __data.__futex field, reshuffle __data.__clock.
3923 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
3924 (__pthread_cond_signal): Increment __futex at the same time as
3925 __wakeup_seq or __total_seq. Pass address of __futex instead of
3926 address of low 32-bits of __wakeup_seq to futex syscall.
3927 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
3928 (__pthread_cond_wait): Likewise. Pass __futex value from before
3929 releasing internal lock to FUTEX_WAIT.
3930 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3931 (__pthread_cond_timedwait): Likewise.
3932 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
3933 (FUTEX_CMP_REQUEUE): Define.
3934 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3935 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3936 Pass __futex value from before the unlock and __futex address instead
3937 of address of low 32-bits of __wakeup_seq to futex syscall.
3938 Fallback to FUTEX_WAKE all on any errors.
3940 2004-06-08 Jakub Jelinek <jakub@redhat.com>
3942 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
3944 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
3945 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
3946 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
3947 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
3948 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
3950 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
3952 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
3953 Add memory clobber to inline assembly.
3954 (__lll_mutex_trylock): Likewise.
3955 (__lll_mutex_cond_trylock): Likewise.
3957 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
3959 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3960 Pass val argument as 6th system call argument in %r7.
3962 2004-05-21 Jakub Jelinek <jakub@redhat.com>
3964 * Makefile (tests): Add tst-cond16.
3965 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
3966 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
3967 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3968 Add __data.__futex field, reshuffle __data.__clock.
3969 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
3970 (__pthread_cond_signal): Increment __futex at the same time as
3971 __wakeup_seq or __total_seq. Pass address of __futex instead of
3972 address of low 32-bits of __wakeup_seq to futex syscall.
3973 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
3974 (__pthread_cond_wait): Likewise. Pass __futex value from before
3975 releasing internal lock to FUTEX_WAIT.
3976 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
3977 (__pthread_cond_timedwait): Likewise.
3978 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
3979 (FUTEX_CMP_REQUEUE): Define.
3980 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3981 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3982 Pass __futex value from before the unlock and __futex address instead
3983 of address of low 32-bits of __wakeup_seq to futex syscall.
3984 Fallback to FUTEX_WAKE all on any errors.
3985 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
3987 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3988 internally. Return non-zero if error, zero if success.
3989 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
3990 Add __data.__futex field, reshuffle __data.__clock.
3991 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
3993 (lll_futex_requeue): Add val argument, return 1 unconditionally
3995 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3996 Add __data.__futex field, reshuffle __data.__clock.
3997 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
3999 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4000 internally. Return non-zero if error, zero if success.
4001 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4002 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4003 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4005 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4006 internally. Return non-zero if error, zero if success.
4007 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4008 Add __data.__futex field, reshuffle __data.__clock.
4009 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4011 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4012 internally. Return non-zero if error, zero if success.
4013 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4014 Add __data.__futex field, reshuffle __data.__clock.
4015 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4016 Add __data.__futex field, reshuffle __data.__clock.
4017 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4018 Increment __futex at the same time as __wakeup_seq or __total_seq.
4019 Pass address of __futex instead of address of low 32-bits of
4020 __wakeup_seq to futex syscall.
4021 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4022 Pass __futex value from before releasing internal lock
4024 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4025 Likewise. Avoid unnecessary shadowing of variables.
4026 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4027 Set __futex to 2 * __total_seq. Pass __futex value from before the
4028 unlock and __futex address instead of address of low 32-bits of
4029 __wakeup_seq to futex_requeue macro, adjust for new return value
4031 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4032 (__pthread_cond_signal): Increment __futex at the same time as
4033 __wakeup_seq or __total_seq. Pass address of __futex instead of
4034 address of low 32-bits of __wakeup_seq to futex syscall.
4035 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4036 (__pthread_cond_wait): Likewise. Pass __futex value from before
4037 releasing internal lock to FUTEX_WAIT.
4038 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4039 (__pthread_cond_timedwait): Likewise.
4040 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4041 (FUTEX_CMP_REQUEUE): Define.
4042 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4043 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4044 Pass __futex value from before the unlock and __futex address instead
4045 of address of low 32-bits of __wakeup_seq to futex syscall.
4046 Fallback to FUTEX_WAKE all on any errors.
4048 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4050 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4051 Add nop to align the end of critical section.
4052 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4054 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4056 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4057 Add __broadcast_seq field.
4058 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4059 all waiters as woken with woken_seq and bump broadcast counter.
4060 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4061 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
4062 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4063 Comment typo fixes. Avoid returning -ETIMEDOUT.
4065 2004-06-01 Ulrich Drepper <drepper@redhat.com>
4067 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4068 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4069 Reported by Kaz Kojima.
4071 2004-05-25 Jakub Jelinek <jakub@redhat.com>
4073 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4075 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4077 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4078 __broadcast_seq with bc_seq after acquiring internal lock instead of
4081 2004-05-18 Jakub Jelinek <jakub@redhat.com>
4083 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4085 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4086 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4087 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4088 (pthread_cond_t): Add __data.__broadcast_seq field.
4089 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4090 (FRAME_SIZE): Define.
4091 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
4093 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4095 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
4097 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4098 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
4101 2004-05-18 Ulrich Drepper <drepper@redhat.com>
4103 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4104 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4105 Add __broadcast_seq field.
4106 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4107 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4108 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4109 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4110 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4111 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4112 all waiters as woken with woken_seq and bump broadcast counter.
4113 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4114 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4115 __broadcast_seq field.
4116 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4117 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4118 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4119 * pthread_cond_init.c: Initialize __broadcast_seq field.
4120 * Makefile (tests): Add tst-cond17 and tst-cond18.
4121 Add .NOTPARALLEL goal.
4122 * tst-cond16.c: New file. From Jakub.
4123 * tst-cond17.c: New file. From Jakub.
4124 * tst-cond18.c: New file. From Jakub.
4126 2004-05-16 Ulrich Drepper <drepper@redhat.com>
4128 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4131 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4132 Parametrize frame size. Correct some unwind info.
4133 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4135 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4137 * tst-stack3.c: Note testing functionality beyond POSIX.
4139 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4141 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4142 Change conditional from ifdef to if.
4144 2004-04-23 Jakub Jelinek <jakub@redhat.com>
4146 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4147 SYSDEP_CANCEL_ERROR): Define.
4150 2004-05-01 Jakub Jelinek <jakub@redhat.com>
4152 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4154 2004-04-20 Jakub Jelinek <jakub@redhat.com>
4156 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4158 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4160 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4161 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4162 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4163 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4165 2004-04-19 Ulrich Drepper <drepper@redhat.com>
4167 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4168 thread has all signals blocked.
4170 2004-04-18 Andreas Jaeger <aj@suse.de>
4172 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4173 (SEM_VALUE_MAX): Add missing brace.
4175 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4177 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4179 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4180 * sysdeps/pthread/tst-mqueue8x.c: New test.
4181 * tst-cancel4.c: Update comment about message queues.
4183 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4184 return it_value { 0, 0 }.
4185 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4187 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4188 assertion for SIGEV_NONE.
4189 (thread_attr_compare): Compare all attributes, not just a partial
4192 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4194 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4196 2004-04-17 Ulrich Drepper <drepper@redhat.com>
4198 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4199 Just use a plain number.
4200 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4201 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4202 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4203 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4204 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4205 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4206 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4208 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4210 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4212 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4214 2004-04-15 Jakub Jelinek <jakub@redhat.com>
4216 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4217 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4218 of calling sigwaitinfo.
4220 2004-04-16 Ulrich Drepper <drepper@redhat.com>
4222 * allocatestack.c (allocate_stack): Set reported_guardsize
4224 * pthread_getattr_np.c (pthread_getattr_np): Use
4225 reported_guardsize instead of guardsize.
4226 * descr.h (struct pthread): Add reported_guardsize field.
4228 2004-04-13 Jakub Jelinek <jakub@redhat.com>
4230 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4232 2004-04-12 Ulrich Drepper <drepper@redhat.com>
4234 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4236 2004-04-08 Jakub Jelinek <jakub@redhat.com>
4238 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4239 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4240 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4241 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4242 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4244 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4245 (_POSIX_MESSAGE_PASSING): Define.
4246 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4247 (_POSIX_MESSAGE_PASSING): Define.
4248 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4249 (_POSIX_MESSAGE_PASSING): Define.
4251 2004-04-04 Ulrich Drepper <drepper@redhat.com>
4253 * tst-context1.c (fct): Check whether correct stack is used.
4255 2004-04-03 Ulrich Drepper <drepper@redhat.com>
4257 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4258 matching constraints for asm mem parameters.
4260 * tst-clock2.c (tf): Don't define unless needed.
4262 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
4264 * Makefile (link-libc-static): Use $(static-gnulib) instead of
4267 2004-03-30 Ulrich Drepper <drepper@redhat.com>
4269 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4270 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4271 * pthreadP.h: Declare __nptl_deallocate_tsd.
4272 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4275 * Makefile (tests): Add tst-tsd5.
4276 * tst-tsd5.c: New file.
4278 2004-03-29 Ulrich Drepper <drepper@redhat.com>
4280 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4281 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4282 is SHLIB_COMPAT check.
4283 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4284 (__pthread_attr_getaffinity_old): Likewise.
4285 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4286 (__pthread_getaffinity_old): Likewise.
4287 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4288 (__pthread_setaffinity_old): Likewise.
4290 2004-03-26 Ulrich Drepper <drepper@redhat.com>
4292 * allocatestack.c (_make_stacks_executable): Call
4293 _dl_make_stack_executable first.
4295 2004-03-24 Roland McGrath <roland@redhat.com>
4297 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4298 constraint instead of "0".
4300 2004-03-24 Ulrich Drepper <drepper@redhat.com>
4302 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4303 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4305 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4306 code to avoid warning.
4308 2004-03-24 Andreas Jaeger <aj@suse.de>
4310 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4311 (__pthread_attr_setaffinity_old): Remove const.
4313 2004-03-23 Ulrich Drepper <drepper@redhat.com>
4315 * sysdeps/unix/sysv/linux/smp.h: New file.
4316 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4317 * init.c: Define __is_smp.
4318 (__pthread_initialize_minimal_internal): Call is_smp_system to
4319 initialize __is_smp.
4320 * pthreadP.h: Declare __is_smp.
4321 Define MAX_ADAPTIVE_COUNT is necessary.
4322 * pthread_mutex_init.c: Add comment regarding __spins field.
4323 * pthread_mutex_lock.c: Implement adaptive mutex type.
4324 * pthread_mutex_timedlock.c: Likewise.
4325 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4326 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4328 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4329 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4330 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4331 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4332 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4333 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4334 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4335 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4336 lll_mutex_cond_trylock.
4337 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4338 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4339 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4340 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4341 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4342 Define BUSY_WAIT_NOP.
4343 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4344 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4346 * tst-mutex5.c: Add support for testing adaptive mutexes.
4347 * tst-mutex7.c: Likewise.
4348 * tst-mutex5a.c: New file.
4349 * tst-mutex7a.c: New file.
4350 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4352 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4353 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4354 vgettimeofday call might destroy the content.
4356 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4359 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4360 No need to restrict type of ret. Make it int. Add comment.
4362 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4363 Remove unnecessary setne instruction.
4365 2004-03-22 Jakub Jelinek <jakub@redhat.com>
4367 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4368 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4369 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4370 If realloc fails, break out of the loop.
4372 2004-03-20 Andreas Jaeger <aj@suse.de>
4374 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4375 (__pthread_setaffinity_old): Fix interface.
4376 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4377 (__pthread_getaffinity_old): Likewise.
4379 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4380 (__pthread_setaffinity_new): Remove duplicate declaration.
4382 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4384 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4385 the return value to a safe register.
4386 (CDISABLE): Set the function argument correctly.
4388 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4390 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4391 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4392 Rewrite so that only one locked memory operation per round is needed.
4393 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4394 (pthread_barrier_wait): After wakeup, release lock only when the
4395 last thread stopped using the barrier object.
4396 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4397 (__pthread_cond_wait): Don't store mutex address if the current
4398 value is ~0l. Add correct cleanup support and unwind info.
4399 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4400 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4401 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4402 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4403 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4404 Add correct cleanup support and unwind info.
4405 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4406 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4407 information for syscall wrappers.
4409 2004-03-18 Ulrich Drepper <drepper@redhat.com>
4411 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4412 cpusetsize field, remove next.
4413 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4414 parameter for size of the CPU set.
4415 (pthread_setaffinity_np): Likewise.
4416 (pthread_attr_getaffinity_np): Likewise.
4417 (pthread_attr_setaffinity_np): Likewise.
4418 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4419 interface change, keep compatibility code.
4420 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4421 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4422 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4423 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
4424 __pthread_getaffinity_np.
4425 * Versions: Add version for changed interfaces.
4426 * tst-attr3.c: Adjust test for interface change.
4427 * pthread_getattr_np.c: Query the kernel about the affinity mask with
4428 increasing buffer sizes.
4429 * pthread_attr_destroy.c: Remove unused list handling.
4430 * pthread_attr_init.c: Likewise.
4432 2004-03-17 Roland McGrath <roland@redhat.com>
4434 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4435 first argument to clock_getres so we ever enable kernel timers.
4437 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
4439 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4441 2004-03-12 Richard Henderson <rth@redhat.com>
4443 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4444 oldvalue from CENABLE to CDISABLE.
4446 2004-03-12 Ulrich Drepper <drepper@redhat.com>
4448 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4449 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4450 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4451 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4453 2004-03-11 Richard Henderson <rth@redhat.com>
4455 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4456 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4457 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4459 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4461 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4462 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4463 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4465 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4467 * forward.c (__pthread_cond_broadcast_2_0,
4468 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4469 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4470 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4472 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4474 * sysdeps/sh/tcb-offsets.sym: Add PID.
4475 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4476 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4478 2004-03-10 Ulrich Drepper <drepper@redhat.com>
4480 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4481 include <sysdep-cancel.h>, vfork is no cancellation point.
4482 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4483 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4484 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4486 2004-03-10 Jakub Jelinek <jakub@redhat.com>
4488 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4490 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4491 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4493 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4495 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4496 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4497 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4498 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4499 of DO_CALL_VIA_BREAK. Work around a gas problem.
4501 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4502 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4503 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4504 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4505 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4506 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4508 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4509 a local register for saving old PID. Negate PID in parent upon exit.
4511 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4513 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4514 before syscall, set to the old value in the parent afterwards.
4515 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4516 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4518 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4519 before syscall, set to the old value in the parent afterwards.
4520 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4521 * sysdeps/s390/tcb-offsets.sym: Add PID.
4523 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4524 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4525 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4526 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4527 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4528 * sysdeps/sparc/tcb-offsets.sym: Add PID.
4530 2004-03-10 Andreas Schwab <schwab@suse.de>
4532 * sysdeps/ia64/tcb-offsets.sym: Add PID.
4533 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4534 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4536 2004-03-09 Jakub Jelinek <jakub@redhat.com>
4538 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4539 * tst-cancel21.c (do_one_test): Likewise.
4540 Reported by Gordon Jin <gordon.jin@intel.com>.
4542 2004-02-09 Jakub Jelinek <jakub@redhat.com>
4544 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4545 if non-zero and set to INT_MIN if zero.
4546 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4547 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4548 (SAVE_PID, RESTORE_PID): Define.
4550 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4551 Use relative path to avoid including NPTL i386/vfork.S.
4552 (SAVE_PID, RESTORE_PID): Define.
4553 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4554 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4555 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4557 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4558 * tst-vfork1.c: New test.
4559 * tst-vfork2.c: New test.
4560 * tst-vfork1x.c: New test.
4561 * tst-vfork2x.c: New test.
4563 2004-03-08 Ulrich Drepper <drepper@redhat.com>
4565 * sysdeps/i386/tcb-offsets.sym: Add PID.
4566 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4567 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4568 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4570 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
4572 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4574 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
4576 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4579 2004-03-07 Ulrich Drepper <drepper@redhat.com>
4581 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4584 * tst-once4.c: Remove unnecessary macro definition.
4586 * tst-mutex7.c (do_test): Limit thread stack size.
4587 * tst-once2.c (do_test): Likewise.
4588 * tst-tls3.c (do_test): Likewise.
4589 * tst-tls1.c (do_test): Likewise.
4590 * tst-signal3.c (do_test): Likewise.
4591 * tst-kill6.c (do_test): Likewise.
4592 * tst-key4.c (do_test): Likewise.
4593 * tst-join4.c (do_test): Likewise.
4594 * tst-fork1.c (do_test): Likewise.
4595 * tst-context1.c (do_test): Likewise.
4596 * tst-cond2.c (do_test): Likewise.
4597 * tst-cond10.c (do_test): Likewise.
4598 * tst-clock2.c (do_test): Likewise.
4599 * tst-cancel10.c (do_test): Likewise.
4600 * tst-basic2.c (do_test): Likewise.
4601 * tst-barrier4.c (do_test): Likewise.
4603 2004-03-05 Ulrich Drepper <drepper@redhat.com>
4605 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4607 2004-03-01 Ulrich Drepper <drepper@redhat.com>
4609 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4610 (__pthread_cond_timedwait): Optimize wakeup test.
4611 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4612 (__pthread_cond_wait): Likewise.
4613 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4614 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4617 2004-02-29 Ulrich Drepper <drepper@redhat.com>
4619 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4620 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
4621 the atomic instruction needed.
4622 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4623 (__lll_mutex_lock_wait): Likewise.
4625 2004-02-28 Ulrich Drepper <drepper@redhat.com>
4627 * Makefile (tests): Add tst-cond14 and tst-cond15.
4628 * tst-cond14.c: New file.
4629 * tst-cond15.c: New file.
4631 2004-02-27 Ulrich Drepper <drepper@redhat.com>
4633 * sysdeps/pthread/createthread.c (create_thread): Remove use of
4634 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
4635 needs to be implemented differently to be useful.
4637 2004-02-26 Ulrich Drepper <drepper@redhat.com>
4639 * pthread_attr_setschedparam.c: Don't test priority against limits
4640 here. Set ATTR_FLAG_SCHED_SET flag.
4641 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4642 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4643 from parent thread to child. If attribute is used and scheduling
4644 parameters are not inherited, copy parameters from attribute or
4645 compute them. Check priority value.
4646 * pthread_getschedparam.c: If the parameters aren't known yet get
4647 them from the kernel.
4648 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4649 ATTR_FLAG_POLICY_SET flag for thread.
4650 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4651 and ATTR_FLAG_POLICY_SET.
4653 * sysdeps/pthread/createthread.c: Use tgkill if possible.
4655 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4656 fail if stack address hasn't been set. Just return 0.
4658 2004-02-25 Ulrich Drepper <drepper@redhat.com>
4660 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
4661 libpthread for the files in this list.
4662 (CFLAGS-tst-unload): Removed.
4663 * tst-unload.c (do_test): Don't use complete path for
4666 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4669 2004-02-22 Ulrich Drepper <drepper@redhat.com>
4671 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4672 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4673 operation per round is needed.
4674 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4675 (__lll_mutex_lock_wait): Likewise.
4677 2004-02-20 Ulrich Drepper <drepper@redhat.com>
4679 * tst-cancel9.c (cleanup): Don't print to stderr.
4681 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4683 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4685 2004-02-20 Jakub Jelinek <jakub@redhat.com>
4687 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4688 (__syscall_error_handler2): Call CDISABLE.
4689 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4690 (__syscall_error_handler2): Call CDISABLE.
4692 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4693 Release lock before the loop, don't reacquire it.
4695 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4697 2004-02-19 Andreas Schwab <schwab@suse.de>
4699 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4702 2004-02-18 Ulrich Drepper <drepper@redhat.com>
4704 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4705 (pthread_barrier_wait): After wakeup, release lock only when the
4706 last thread stopped using the barrier object.
4707 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4708 (pthread_barrier_wait): Likewise.
4709 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4711 * Makefile (tests): Add tst-barrier4.
4712 * tst-barrier4.c: New file.
4714 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4715 (__pthread_cond_timedwait): Perform timeout test while holding
4716 internal lock to prevent wakeup race.
4717 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4718 * sysdeps/pthread/pthread_cond_timedwait.c
4719 (__pthread_cond_timedwait): Likewise.
4720 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4721 (__pthread_cond_timedwait): Likewise.
4723 2004-02-18 Jakub Jelinek <jakub@redhat.com>
4725 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4726 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4727 * Makefile (tests): Add tst-rwlock13.
4728 * tst-rwlock13.c: New test.
4730 2004-02-16 Ulrich Drepper <drepper@redhat.com>
4732 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4733 (__condvar_tw_cleanup): Little optimization.
4734 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4736 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
4738 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4739 libpthread as "lib" parameter to SHLIB_COMPAT.
4740 (__novmx_siglongjmp): Fix typo in function name.
4741 (__novmx_longjmp): Fix typo in function name.
4743 2004-02-13 Ulrich Drepper <drepper@redhat.com>
4745 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4748 * sysdeps/generic/pt-longjmp.c: Moved to...
4749 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
4751 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
4753 * Makefile (libpthread-routines): Add pt-cleanup.
4754 * pt-longjmp.c: Removed.
4755 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4756 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4757 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4758 Version longjmp, siglongjmp for GLIBC_2.3.4.
4759 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4761 2004-02-13 Ulrich Drepper <drepper@redhat.com>
4763 * sysdeps/pthread/pthread_cond_timedwait.c
4764 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
4765 Reuse code. Add __builtin_expects.
4767 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4768 (__pthread_cond_timedwait): Get internal lock in case timeout has
4769 passed before the futex syscall.
4770 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4772 2004-01-20 Ulrich Drepper <drepper@redhat.com>
4774 * allocatestack.c: Pretty printing.
4776 * sysdeps/pthread/createthread.c (create_thread): Don't add
4777 CLONE_DETACHED bit if it is not necessary.
4779 2004-01-16 Ulrich Drepper <drepper@redhat.com>
4781 * pthread_getattr_np.c: Include ldsodefs.h.
4783 2004-01-16 Richard Henderson <rth@redhat.com>
4785 * allocatestack.c: Don't declare __libc_stack_end.
4786 * init.c (__pthread_initialize_minimal_internal): Likewise.
4787 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
4789 2004-01-15 Richard Henderson <rth@redhat.com>
4791 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4792 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
4793 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
4794 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
4795 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
4796 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
4797 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
4798 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
4800 2004-01-14 Ulrich Drepper <drepper@redhat.com>
4802 * init.c (pthread_functions): Make array const.
4804 2004-01-13 Ulrich Drepper <drepper@redhat.com>
4806 * allocatestack.c (__make_stacks_executable): Change interface.
4807 Check parameters. Pass parameter on to libc counterpart.
4808 * pthreadP.h: Change declaration.
4810 2004-01-13 Richard Henderson <rth@redhat.com>
4812 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
4814 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
4817 * sysdeps/alpha/Makefile: New file.
4818 * sysdeps/alpha/tcb-offsets.sym: New file.
4819 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4820 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
4822 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
4825 2004-01-08 Jakub Jelinek <jakub@redhat.com>
4827 * Makefile (tests): Add tst-backtrace1.
4828 * tst-backtrace1.c: New test.
4830 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
4832 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
4833 register as second parameter to the REGISTER macro.
4834 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
4835 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
4836 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
4837 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
4838 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
4839 of thread register as second parameter to REGISTER macro in 64 case.
4841 2004-01-03 Ulrich Drepper <drepper@redhat.com>
4843 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
4844 (CFLAGS-getpid.o): Defined.
4845 (CFLAGS-getpid.os): Defined.
4847 2003-12-31 Ulrich Drepper <drepper@redhat.com>
4849 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
4850 returned for main thread does not overlap with any other VMA.
4851 Patch by Jakub Jelinek.
4853 2003-12-29 Jakub Jelinek <jakub@redhat.com>
4855 * tst-raise1.c: Include stdio.h.
4857 2003-12-23 Jakub Jelinek <jakub@redhat.com>
4859 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
4860 setting with __ASSUME_TGKILL || defined __NR_tgkill.
4861 If pid is 0, set it to selftid.
4862 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
4863 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
4864 != 0, return self->tid without doing a syscall.
4865 * descr.h (struct pthread): Move pid field after tid.
4867 * Makefile (tests): Add tst-raise1.
4868 * tst-raise1.c: New file.
4870 2003-12-23 Roland McGrath <roland@redhat.com>
4872 * tst-oddstacklimit.c: New file.
4873 * Makefile (tests): Add it.
4874 (tst-oddstacklimit-ENV): New variable.
4876 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
4877 value up to page size for __default_stacksize.
4879 2003-12-21 Ulrich Drepper <drepper@redhat.com>
4881 * Makefile (tests): Add tst-eintr5.
4882 * tst-eintr5.c: New file.
4884 * eintr.c (eintr_source): Prevent sending signal to self.
4886 * tst-eintr2.c (tf1): Improve error message.
4888 2003-12-20 Ulrich Drepper <drepper@redhat.com>
4890 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
4891 * sysdeps/unix/sysv/linux/getpid.c: New file.
4892 * pthread_cancel.c: Add comment explaining use of PID field.
4893 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4894 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
4895 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
4896 temporarily to signal the field must not be relied on and updated
4898 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
4899 temporarily negative.
4900 * sysdeps/unix/sysv/linux/raise.c: Likewise.
4902 2003-12-19 Ulrich Drepper <drepper@redhat.com>
4904 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
4905 (eintr_source): If ARG != NULL, use pthread_kill.
4906 * tst-eintr1.c: Adjust for this change.
4907 * tst-eintr2.c: Likewise.
4908 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
4909 * tst-eintr3.c: New file.
4910 * tst-eintr4.c: New file.
4912 2003-12-19 Jakub Jelinek <jakub@redhat.com>
4914 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
4915 if CANCELSTATE_BITMASK is set.
4916 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
4919 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
4920 (tests-reverse): Add tst-cancel23.
4921 * tst-cancel22.c: New test.
4922 * tst-cancel23.c: New test.
4924 2003-12-18 Ulrich Drepper <drepper@redhat.com>
4926 * tst-eintr1.c: Better error messages.
4928 * Makefile (tests): Add tst-eintr2.
4929 * tst-eintr2.c: New file.
4931 2003-12-18 Jakub Jelinek <jakub@redhat.com>
4933 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
4934 (CFLAGS-tst-cancelx21.c): Set.
4935 * tst-cancel21.c: New test.
4936 * tst-cancelx21.c: New test.
4938 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
4940 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
4941 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
4942 * pt-longjmp.c: Include jmpbuf-unwind.h.
4943 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
4944 _JMPBUF_UNWINDS. Adjust compared pointers.
4945 * init.c (__pthread_initialize_minimal_internal): Initialize
4946 pd->stackblock_size.
4947 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
4948 * sysdeps/alpha/jmpbuf-unwind.h: New file.
4949 * sysdeps/i386/jmpbuf-unwind.h: New file.
4950 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
4951 * sysdeps/s390/jmpbuf-unwind.h: New file.
4952 * sysdeps/sh/jmpbuf-unwind.h: New file.
4953 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
4954 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
4955 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
4956 (_JMPBUF_CFA_UNWINDS): Remove.
4957 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
4959 2003-12-12 Jakub Jelinek <jakub@redhat.com>
4961 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
4962 (CFLAGS-tst-cancelx20.c): Set.
4963 * tst-cancel20.c: New test.
4964 * tst-cancelx20.c: New test.
4966 2003-12-17 Ulrich Drepper <drepper@redhat.com>
4968 * init.c (__pthread_initialize_minimal_internal): Don't treat
4969 architectures with separate register stack special here when
4970 computing default stack size.
4972 2003-12-17 Roland McGrath <roland@redhat.com>
4974 * Makefile (tst-cancelx7-ARGS): New variable.
4975 Reportd by Greg Schafer <gschafer@zip.com.au>.
4977 2003-12-17 Jakub Jelinek <jakub@redhat.com>
4979 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
4980 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
4981 (tst-stack3-ENV): Set.
4982 ($(objpfx)tst-stack3-mem): New.
4983 * tst-stack3.c: New test.
4985 2003-12-10 David Mosberger <davidm@hpl.hp.com>
4987 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
4988 Add unwind directives. Drop unused .regstk directive.
4989 (_fini_EPILOG_BEGINS): Add unwind directives.
4991 2003-12-11 Ulrich Drepper <drepper@redhat.com>
4993 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4994 Assume parameter is a pointer.
4995 (lll_futex_wake): Likewise.
4996 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
4998 (lll_futex_wake): Likewise.
4999 Reported by Boris Hu.
5000 * sysdeps/unix/sysv/linux/unregister-atfork.c
5001 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5003 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5005 2003-12-10 Ulrich Drepper <drepper@redhat.com>
5007 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5008 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5009 __rtld_lock_initialize for ld.so lock.
5010 Patch in part by Adam Li <adam.li@intel.com>.
5012 2003-12-02 David Mosberger <davidm@hpl.hp.com>
5014 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5015 in $(gnulib). Also, remove stale comment.
5017 2003-11-12 David Mosberger <davidm@hpl.hp.com>
5019 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5020 advantage of new syscall stub and optimize accordingly.
5022 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5023 from SYS_futex, to match expectations of
5024 sysdep.h:DO_INLINE_SYSCALL.
5025 (lll_futex_clobbers): Remove.
5026 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5027 (lll_futex_wake): Likewise.
5028 (lll_futex_requeue): Likewise.
5029 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5030 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5032 (__lll_mutex_lock): Likewise.
5033 (__lll_mutex_cond_lock): Likewise.
5034 (__lll_mutex_timed_lock): Likewise.
5035 (__lll_mutex_unlock): Likewise.
5036 (__lll_mutex_unlock_force): Likewise.
5038 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5039 comes before the include of <sysdep.h>.
5040 (THREAD_SELF_SYSINFO): New macro.
5041 (THREAD_SYSINFO): Likewise.
5042 (INIT_SYSINFO): New macro.
5043 (TLS_INIT_TP): Call INIT_SYSINFO.
5045 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5047 * sysdeps/pthread/createthread.c (create_thread): Use
5048 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5049 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5050 THREAD_SELF_SYSINFO instead of open code.
5051 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5052 (THREAD_SYSINFO): Likewise.
5054 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5056 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5058 2003-12-06 Ulrich Drepper <drepper@redhat.com>
5060 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5061 instead of .init. Patch by David Mosberger.
5063 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
5065 * sysdeps/pthread/configure.in: Remove broken declaration in C
5066 cleanup handling check.
5068 2003-11-30 Andreas Jaeger <aj@suse.de>
5070 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5071 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5074 2003-11-27 Jakub Jelinek <jakub@redhat.com>
5076 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5077 * pthread_attr_destroy.c: Include shlib-compat.h.
5078 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5079 is set in iattr->flags.
5080 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5082 2003-11-21 Jakub Jelinek <jakub@redhat.com>
5084 * Makefile (distribute): Add tst-cleanup4aux.c.
5086 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
5089 2003-11-21 Ulrich Drepper <drepper@redhat.com>
5091 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5092 pthread_cond_signal.
5094 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5095 store mutex address if the current value is ~0l.
5096 * sysdeps/pthread/pthread_cond_timedwait.c
5097 (__pthread_cond_timedwait): Likewise.
5098 * sysdeps/pthread/pthread_cond_broadcast.c
5099 (__pthread_cond_broadcast): Don't use requeue for pshared
5102 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5103 (__pthread_cond_wait): Don't store mutex address if the current
5105 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5106 (__pthread_cond_timedwait): Likewise.
5107 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5108 (__pthread_cond_broadcast): Don't use requeue for pshared
5111 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5112 element with ~0l for pshared condvars, with NULL otherwise.
5114 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5115 (__pthread_cond_wait): Don't store mutex address if the current
5117 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5118 (__pthread_cond_timedwait): Likewise.
5119 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5120 (__pthread_cond_broadcast): Don't use requeue for pshared
5123 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5124 * tst-cond12.c: New file.
5125 * tst-cond13.c: New file.
5127 2003-11-17 Ulrich Drepper <drepper@redhat.com>
5129 * sysdeps/pthread/configure.in: Make missing forced unwind support
5132 2003-11-11 Ulrich Drepper <drepper@redhat.com>
5134 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5136 2003-11-06 Ulrich Drepper <drepper@redhat.com>
5138 * Makefile: Add magic to clean up correctly.
5140 2003-11-05 Jakub Jelinek <jakub@redhat.com>
5142 * unwind.c (FRAME_LEFT): Define.
5143 (unwind_stop): Handle old style cleanups here.
5144 (__pthread_unwind): Handle old style cleanups only if
5145 !HAVE_FORCED_UNWIND.
5146 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5147 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5148 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5149 ($(objpfx)tst-cleanupx4): Likewise.
5150 * tst-cleanup4.c: New test.
5151 * tst-cleanup4aux.c: New.
5152 * tst-cleanupx4.c: New test.
5154 2003-11-04 Ulrich Drepper <drepper@redhat.com>
5156 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5157 lll_mutex_*lock macros to skip atomic operations on some archs.
5159 2003-11-03 Ulrich Drepper <drepper@redhat.com>
5161 * sysdeps/pthread/tst-timer.c (main): Initialize
5162 sigev2.sigev_value as well.
5164 2003-10-15 Roland McGrath <roland@redhat.com>
5166 * sysdeps/pthread/configure.in: Barf if visibility attribute support
5168 * sysdeps/pthread/configure: Regenerated.
5170 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5172 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5173 locking macros. No distinction between normal and mutex locking
5175 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5176 Merge bits from lowlevelmutex.S we still need.
5177 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5178 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5179 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5180 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5181 new mutex implementation.
5182 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5183 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5184 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5185 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5186 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5187 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5188 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5189 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5190 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5191 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5192 symbol for entry point to avoid cancellation.
5194 2003-10-07 Jakub Jelinek <jakub@redhat.com>
5196 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5198 (SAVE_OLDTYPE_0): Fix a typo.
5200 2003-10-03 Ulrich Drepper <drepper@redhat.com>
5202 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5203 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
5205 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5207 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5210 2003-10-02 Jakub Jelinek <jakub@redhat.com>
5212 * Makefile (tests): Add tst-cancel19.
5213 * tst-cancel19.c: New test.
5215 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5217 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5218 restoring of the old cancellation type.
5220 2003-09-30 Jakub Jelinek <jakub@redhat.com>
5222 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5224 2003-09-27 Wolfram Gloger <wg@malloc.de>
5226 * sysdeps/pthread/malloc-machine.h: New file
5228 2003-09-24 Roland McGrath <roland@redhat.com>
5230 * allocatestack.c (__make_stacks_executable): Don't ignore return
5231 value from _dl_make_stack_executable.
5233 2003-09-24 Ulrich Drepper <drepper@redhat.com>
5235 * allocatestack.c (__make_stacks_executable): Also change
5236 permission of the currently unused stacks.
5238 * allocatestack.c (change_stack_perm): Split out from
5239 __make_stacks_executable.
5240 (allocate_stack): If the required permission changed between the time
5241 we started preparing the stack and queueing it, change the permission.
5242 (__make_stacks_executable): Call change_stack_perm.
5244 * Makefile: Build tst-execstack-mod locally.
5245 * tst-execstack-mod.c: New file.
5247 2003-09-23 Jakub Jelinek <jakub@redhat.com>
5249 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5251 2003-09-23 Roland McGrath <roland@redhat.com>
5253 * tst-execstack.c: New file.
5254 * Makefile (tests): Add it.
5255 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5256 (LDFLAGS-tst-execstack): New variable.
5258 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5259 whether to use PROT_EXEC for stack mmap.
5260 (__make_stacks_executable): New function.
5261 * pthreadP.h: Declare it.
5262 * init.c (__pthread_initialize_minimal_internal): Set
5263 GL(dl_make_stack_executable_hook) to that.
5265 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5267 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5268 recommendation from AMD re avoidance of lock prefix.
5270 2003-09-22 Jakub Jelinek <jakub@redhat.com>
5272 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5273 lll_futex_timed_wait instead of lll_futex_wait.
5274 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5275 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5276 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5277 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5278 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5279 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5280 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5281 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5282 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5283 Completely revamp the locking macros. No distinction between
5284 normal and mutex locking anymore.
5285 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5286 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5287 __lll_lock_timedwait): Fix prototypes.
5288 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5289 __lll_lock_timedwait): Likewise.
5290 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5291 macros, add __builtin_expect.
5292 (lll_mutex_timedlock): Likewise. Fix return value.
5293 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5294 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5295 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5296 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5297 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5298 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5299 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5300 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5302 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5304 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5305 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5306 operation if possible.
5308 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5309 like jumping over the lock prefix.
5311 2003-09-21 Ulrich Drepper <drepper@redhat.com>
5313 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5314 locking macros. No distinction between normal and mutex locking
5316 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5317 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5318 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5319 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5320 locking. Merge bits from lowlevelmutex.S we still need.
5321 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5322 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5323 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5324 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5325 * Makefile (routines): Remove libc-lowlevelmutex.
5326 (libpthread-rountines): Remove lowlevelmutex.
5327 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5328 for new mutex implementation.
5329 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5330 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5331 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5332 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5333 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5335 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5337 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5338 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5339 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5340 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5341 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5342 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5343 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5344 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5346 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5348 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5349 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5350 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5352 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5353 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5355 2003-09-20 Ulrich Drepper <drepper@redhat.com>
5357 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5358 in parameters of asm with output parameters.
5360 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5361 type of DECR parameter to int.
5362 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5364 2003-09-18 Jakub Jelinek <jakub@redhat.com>
5366 * tst-attr3.c (tf, do_test): Print stack start/end/size and
5367 guardsize for each thread.
5369 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5371 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5372 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5373 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5375 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5376 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5378 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5379 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5380 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5381 (pthread_getaffinity_np): Add hidden_def.
5383 * Makefile (tests): Add tst-attr3.
5384 * tst-attr3.c: New test.
5386 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5388 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5390 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5391 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5393 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5395 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5396 * tst-align.c: Include tst-stack-align.h.
5397 (tf, do_test): Use TEST_STACK_ALIGN macro.
5399 2003-09-17 Ulrich Drepper <drepper@redhat.com>
5401 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5404 2003-09-16 Ulrich Drepper <drepper@redhat.com>
5406 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5407 stack-related values for the initial thread.
5409 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5411 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5413 2003-09-11 Ulrich Drepper <drepper@redhat.com>
5415 * pthread_mutex_lock.c: Minor code rearrangements.
5417 2003-09-05 Roland McGrath <roland@redhat.com>
5419 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5420 Instead, include ../nptl_db/db_info.c to do its magic.
5421 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5422 (__pthread_pthread_key_2ndlevel_size): Likewise.
5423 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5424 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5425 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5426 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5427 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5428 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5429 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5430 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5431 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5432 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5433 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5434 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5435 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5436 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5437 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5438 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5439 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5441 2003-09-08 Ulrich Drepper <drepper@redhat.com>
5443 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5444 of pthread_t to be compatible with LT.
5445 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5446 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5447 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5448 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5449 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5450 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5451 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5453 2003-09-04 Ulrich Drepper <drepper@redhat.com>
5455 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5457 2003-09-04 Jakub Jelinek <jakub@redhat.com>
5459 * unwind-forcedunwind.c: Move to...
5460 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5461 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5462 * sysdeps/pthread/jmpbuf-unwind.h: New file.
5463 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5464 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5465 * unwind.c: Include jmpbuf-unwind.h.
5466 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5468 2003-09-02 Jakub Jelinek <jakub@redhat.com>
5470 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5471 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5472 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5473 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5474 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5475 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5476 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5477 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5478 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5479 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5480 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5482 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5483 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5484 * Makefile (tests): Add tst-stack2.
5485 * tst-stack2.c: New test.
5486 * tst-stack1.c: Include limits.h and sys/param.h.
5487 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5489 * pthread_condattr_setpshared.c: Include errno.h.
5490 (pthread_condattr_setpshared): Return EINVAL if pshared
5491 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5493 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5494 defined symbol for entry point to avoid cancellation.
5495 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5497 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5499 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5501 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5503 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5505 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5506 __close_nocancel, __read_nocancel, __write_nocancel,
5507 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
5508 libpthread.so or librt.so, define to corresponding function
5509 without _nocancel suffix.
5510 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5511 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5512 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5514 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5516 2003-09-02 Ulrich Drepper <drepper@redhat.com>
5518 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5519 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5521 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5522 in subsections has a symbol associated with it.
5524 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5525 defined symbol for entry point to avoid cancellation.
5526 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5528 2003-09-01 Jakub Jelinek <jakub@redhat.com>
5530 * Makefile (tests): Add tst-tls5.
5531 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5532 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5533 ($(objpfx)tst-tls5): New.
5534 ($(objpfx)tst-tls6.out): Likewise.
5535 (tests): Depend on $(objpfx)tst-tls6.out.
5536 * tst-tls3.c: Include stdint.h and pthreaddef.h.
5537 (do_test): Check pthread_self () return value alignment.
5538 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5539 (tf): Check pthread_self () return value alignment.
5540 * tst-tls5.c: New test.
5542 * tst-tls5mod.c: New.
5543 * tst-tls5moda.c: New.
5544 * tst-tls5modb.c: New.
5545 * tst-tls5modc.c: New.
5546 * tst-tls5modd.c: New.
5547 * tst-tls5mode.c: New.
5548 * tst-tls5modf.c: New.
5549 * tst-tls6.sh: New test.
5551 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5552 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5553 * init.c (pthread_functions): Initialize them.
5554 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5555 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5556 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5557 pthread_cond_timedwait@@GLIBC_2.3.2.
5559 2003-09-01 Jakub Jelinek <jakub@redhat.com>
5561 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5562 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5563 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5564 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5565 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5566 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5568 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5570 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5571 _POSIX_THREAD_PRIORITY_SCHEDULING.
5572 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5574 2003-08-31 Ulrich Drepper <drepper@redhat.com>
5576 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5577 nested function, use static inline function from libio.h.
5578 Code by Richard Henderson.
5580 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5583 2003-08-30 Jakub Jelinek <jakub@redhat.com>
5585 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5586 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5587 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5588 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5589 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5590 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5591 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5592 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5593 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5594 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5595 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5596 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5597 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5598 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5599 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5600 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5601 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5602 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5603 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5604 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5605 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5606 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5607 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5608 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5609 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5610 * sysdeps/sparc/tls.h: New file.
5611 * sysdeps/sparc/tcb-offsets.sym: New file.
5612 * sysdeps/sparc/Makefile: New file.
5613 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5614 * init.c [__sparc__] (__NR_set_tid_address): Define.
5616 2003-08-29 Jakub Jelinek <jakub@redhat.com>
5618 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5619 _IO_release_lock): Define.
5621 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
5623 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5624 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
5626 2003-08-27 Ulrich Drepper <drepper@redhat.com>
5628 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5629 (__pthread_cleanup_class): Add missing return types of member
5632 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
5634 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5635 (lll_mutex_unlock_force): Add memory barrier between store and futex
5638 2003-08-25 Ulrich Drepper <drepper@redhat.com>
5640 * tst-cancel4.c (do_test): Also unlink tempfname and remove
5641 tempmsg in first loop.
5643 2003-08-18 Ulrich Drepper <drepper@redhat.com>
5645 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5646 _POSIX_THREAD_PRIORITY_SCHEDULING.
5647 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5649 2003-08-07 Jakub Jelinek <jakub@redhat.com>
5651 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5652 (__rtld_lock_default_lock_recursive,
5653 __rtld_lock_default_unlock_recursive): Define.
5654 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5655 __rtld_lock_unlock_recursive): Define using
5656 GL(_dl_rtld_*lock_recursive).
5657 * init.c (__pthread_initialize_minimal_internal): Initialize
5658 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5659 Lock GL(_dl_load_lock) the same number of times as
5660 GL(_dl_load_lock) using non-mt implementation was nested.
5662 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5663 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5665 2003-08-06 Jakub Jelinek <jakub@redhat.com>
5667 * tst-cancel17.c (do_test): Make len2 maximum of page size and
5670 2003-08-07 Jakub Jelinek <jakub@redhat.com>
5672 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5674 2003-08-03 Jakub Jelinek <jakub@redhat.com>
5676 * sysdeps/pthread/createthread.c (do_clone): Move error handling
5677 to first syscall error check. Move syscall error check for tkill
5678 into __ASSUME_CLONE_STOPPED #ifdef.
5680 2003-08-02 Ulrich Drepper <drepper@redhat.com>
5682 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5683 is not defined, do explicit synchronization.
5684 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
5685 is not defined also unlock pd->lock for non-debugging case in case
5687 * pthread_create.c (start_thread): Always get and release pd->lock
5688 if __ASSUME_CLONE_STOPPED is not defined.
5689 (start_thread_debug): Removed. Adjust users.
5690 * allocatestack.c (allocate_stack): Always initialize lock if
5691 __ASSUME_CLONE_STOPPED is not defined.
5692 * Makefile (tests): Add tst-sched1.
5693 * tst-sched1.c: New file.
5695 * sysdeps/pthread/createthread.c (do_clone): Only use
5696 sched_setschduler and pass correct parameters.
5698 2003-07-31 Jakub Jelinek <jakub@redhat.com>
5700 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5701 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5702 PTHREAD_STACK_MIN in comments.
5704 2003-07-31 Jakub Jelinek <jakub@redhat.com>
5706 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5707 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5709 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5710 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5711 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5712 (__pthread_cleanup_upto): Fix prototype.
5713 (_longjmp_unwind): Adjust caller.
5714 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5715 Change second argument to const struct pointer.
5716 * tst-sem8.c (main): Remove unused s2 and s3 variables.
5717 * tst-sem9.c (main): Likewise.
5718 * unwind.c: Include string.h for strlen prototype.
5720 2003-07-31 Ulrich Drepper <drepper@redhat.com>
5722 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5723 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5724 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5726 Patch by Nicholas Miell <nmiell@attbi.com>.
5728 2003-07-30 Jakub Jelinek <jakub@redhat.com>
5730 * init.c (__pthread_initialize_minimal_internal): Initialize
5731 GL(dl_init_static_tls).
5732 * pthreadP.h (__pthread_init_static_tls): New prototype.
5733 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5735 * Makefile (tests): Add tst-tls4.
5736 (modules-names): Add tst-tls4moda and tst-tls4modb.
5737 ($(objpfx)tst-tls4): Link against libdl and libpthread.
5738 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5740 * tst-tls4.c: New file.
5741 * tst-tls4moda.c: New file.
5742 * tst-tls4modb.c: New file.
5744 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
5746 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5747 before __timer_dealloc.
5748 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5749 Don't call list_unlink.
5751 2003-07-29 Roland McGrath <roland@redhat.com>
5753 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5755 2003-07-25 Jakub Jelinek <jakub@redhat.com>
5757 * tst-cancel17.c (do_test): Check if aio_cancel failed.
5758 Don't reuse struct aiocb A if it failed.
5759 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5760 not just one byte, as that does not block.
5762 2003-07-22 Jakub Jelinek <jakub@redhat.com>
5764 * sysdeps/pthread/unwind-resume.c: New file.
5765 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5766 unwind-resume in csu subdir.
5767 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5769 (librt-sysdep_routines, librt-shared-only-routines): Add
5771 * sysdeps/pthread/rt-unwind-resume.c: New file.
5772 * unwind-forcedunwind.c: New file.
5773 * Makefile (libpthread-routines): Add unwind-forcedunwind.
5774 (libpthread-shared-only-routines): Likewise.
5775 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5776 * pthreadP.h (pthread_cancel_init): New prototype.
5777 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5779 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5780 attr argument const struct pthread_attr *.
5782 * res.c (__res_state): Return __resp.
5783 * descr.h: Include resolv.h.
5784 (struct pthread): Add res field.
5785 * pthread_create.c: Include resolv.h.
5786 (start_thread): Initialize __resp.
5787 * Makefile (tests): Add tst-_res1.
5788 (module-names): Add tst-_res1mod1, tst-_res1mod2.
5789 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
5790 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
5792 * tst-_res1.c: New file.
5793 * tst-_res1mod1.c: New file.
5794 * tst-_res1mod2.c: New file.
5796 2003-07-21 Ulrich Drepper <drepper@redhat.com>
5798 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
5800 * Makefile: Define various *-no-z-defs variables for test DSOs
5801 which has undefined symbols.
5803 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
5805 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5806 Retry if the stwcx fails to store once_control.
5808 2003-07-20 Ulrich Drepper <drepper@redhat.com>
5810 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
5811 pthread_attr_setaffinity.
5812 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
5813 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
5814 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
5815 * pthread_attr_destroy.c: Free cpuset element if allocated.
5816 * pthread_create.c: Pass iattr as additional parameter to
5818 * sysdeps/pthread/createthread.c: If attribute is provided and
5819 a new thread is created with affinity set or scheduling parameters,
5820 start thread with CLONE_STOPPED.
5821 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
5822 pthread_attr_setaffinity.
5823 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5826 2003-07-15 Ulrich Drepper <drepper@redhat.com>
5828 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
5830 2003-07-14 Ulrich Drepper <drepper@redhat.com>
5832 * sysdeps/pthread/configure.in: Require CFI directives also for
5835 2003-07-15 Jakub Jelinek <jakub@redhat.com>
5837 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5840 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5842 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
5844 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
5845 registers as variables. Call __pthread_mutex_unlock_usercnt.
5846 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5847 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
5848 not self pointer in __writer. Compare with TID to determine
5850 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5851 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
5853 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
5855 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
5856 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5857 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
5858 macros also when compiling librt.
5860 2003-07-11 Jakub Jelinek <jakub@redhat.com>
5862 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
5863 -fasynchronous-unwind-tables.
5864 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5865 (PSEUDO): Add cfi directives.
5866 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
5868 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5871 2003-07-08 Jakub Jelinek <jakub@redhat.com>
5873 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
5874 __pthread_unregister_cancel): Add prototypes and hidden_proto.
5875 * unwind.c (__pthread_unwind_next): Add hidden_def.
5876 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
5878 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5879 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5880 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5882 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
5883 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
5885 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
5886 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
5887 __pthread_unregister_cancel and __pthread_unwind_next.
5889 2003-07-04 Jakub Jelinek <jakub@redhat.com>
5891 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
5892 different symbol for the cancellation syscall wrapper and
5893 non-cancellation syscall wrapper.
5894 (PSEUDO_END): Define.
5896 2003-07-05 Richard Henderson <rth@redhat.com>
5898 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
5899 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
5900 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
5901 return actual return value from the syscall, not 0.
5903 2003-07-07 Ulrich Drepper <drepper@redhat.com>
5905 * descr.h (struct pthread): Add pid field.
5906 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
5907 (__reclaim_stacks): Likewise.
5908 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
5909 also check for PID of the signal source.
5910 (__pthread_initialize_minimal_internal): Also initialize pid field
5911 of initial thread's descriptor.
5912 * pthread_cancel.c: Use tgkill instead of tkill if possible.
5913 * sysdeps/unix/sysv/linux/fork.c: Likewise.
5914 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
5915 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5916 * sysdeps/unix/sysv/linux/raise.c: Likewise.
5918 2003-07-05 Ulrich Drepper <drepper@redhat.com>
5920 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
5921 Fix use of parameter.
5922 (__libc_cleanup_pop): Likewise.
5924 2003-07-04 Ulrich Drepper <drepper@redhat.com>
5926 * init.c (sigcancel_handler): Change parameters to match handler
5927 for SA_SIGACTION. Check signal number and code to recognize
5928 invalid invocations.
5930 2003-07-03 Roland McGrath <roland@redhat.com>
5932 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
5933 Apply sizeof (struct pthread) bias to r13 value.
5935 2003-07-03 Ulrich Drepper <drepper@redhat.com>
5937 * sysdeps/pthread/configure.in: Require CFI directives.
5939 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
5941 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
5942 libpthread compilation.
5943 * unwind.c (__pthread_unwind): Add hidden_def.
5944 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
5946 2003-07-01 Ulrich Drepper <drepper@redhat.com>
5948 * libc-cancellation.c (__libc_cleanup_routine): Define.
5949 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
5950 (__pthread_cleanup_pop): Define.
5952 2003-07-01 Richard Henderson <rth@redhat.com>
5954 * sysdeps/alpha/elf/pt-initfini.c: New file.
5955 * sysdeps/alpha/pthread_spin_lock.S: New file.
5956 * sysdeps/alpha/pthread_spin_trylock.S: New file.
5957 * sysdeps/alpha/pthreaddef.h: New file.
5958 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
5959 * sysdeps/alpha/tls.h: New file.
5960 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
5961 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
5962 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
5963 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
5964 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
5965 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
5966 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
5967 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
5968 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
5969 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
5971 2003-07-01 Ulrich Drepper <drepper@redhat.com>
5973 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
5974 cleanup support and unwind info.
5976 2003-06-30 Ulrich Drepper <drepper@redhat.com>
5978 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5979 Use correct cleanup handler registration. Add unwind info.
5980 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
5981 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
5982 * tst-once3.c: Add cleanup handler and check it is called.
5983 * tst-once4.c: Likewise.
5984 * tst-oncex3.c: New file.
5985 * tst-oncex4.c: New file.
5986 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
5988 2003-06-29 Ulrich Drepper <drepper@redhat.com>
5990 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
5992 2003-06-27 Ulrich Drepper <drepper@redhat.com>
5994 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
5995 (tf_msgsnd): Likewise.
5997 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
5998 premature returns a bit more.
6000 2003-06-26 Ulrich Drepper <drepper@redhat.com>
6002 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6003 definition to the front.
6005 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6006 the cleanup functions to make the names unique. Fix dwarf opcode
6008 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6009 functions to make the names unique. Fix CFA offset for two blocks.
6011 2003-06-25 Ulrich Drepper <drepper@redhat.com>
6013 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6014 missing closing braces.
6015 Patch by Christophe Saout <christophe@saout.de>.
6017 2003-06-24 Roland McGrath <roland@redhat.com>
6019 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6021 2003-06-24 Ulrich Drepper <drepper@redhat.com>
6023 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6024 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6026 * pthreadP.h: Declare __find_thread_by_id.
6027 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6028 * pthread_clock_gettime.c: Allow using other thread's clock.
6029 * pthread_clock_settime.c: Likewise.
6030 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6031 * Makefile: Add rules to build and run tst-clock2.
6032 * tst-clock2.c: New file.
6034 2003-06-23 Ulrich Drepper <drepper@redhat.com>
6036 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6037 to use exception-based cleanup handler.
6038 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6040 * tst-cond8.c (ch): Announce that we are done.
6042 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6044 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6045 Also test aio_suspend with timeout value.
6047 2003-06-22 Ulrich Drepper <drepper@redhat.com>
6049 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6050 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6053 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6054 (__pthread_mutex_lock_internal): Likewise.
6055 (__pthread_mutex_unlock_internal): Likewise.
6056 (__pthread_mutex_unlock_usercnt): Declare.
6057 * pthread_mutex_destroy.c: Always fail if used in any way.
6058 * pthread_mutex_init.c: Update comment.
6059 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6060 * pthread_mutex_timedlock.c: Adjust __nusers.
6061 * pthread_mutex_trylock.c: Adjust __nusers.
6062 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6063 and public interfaces are wrapper with pass additional parameter.
6064 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6066 * tst-mutex8.c: New file.
6067 * Makefile (tests): Add tst-mutex8.
6068 * sysdeps/pthread/pthread_cond_timedwait.c: Call
6069 __pthread_mutex_unlock_usercnt.
6070 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6071 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6072 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6073 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6074 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6075 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6076 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6078 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6079 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6080 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6081 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6082 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6084 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6085 * pthread_mutex_timedlock.c: Likewise.
6086 * pthread_mutex_trylock.c: Adjust __nusers.
6087 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6088 * tst-mutex9.c: New file.
6089 * Makefile (tests): Add tst-mutex9.
6090 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6091 * sysdeps/ia64/tls.h: Likewise.
6092 * sysdeps/powerpc/tls.h: Likewise.
6093 * sysdeps/s390/tls.h: Likewise.
6094 * sysdeps/sh/tls.h: Likewise.
6095 * sysdeps/x86_64/tls.h: Likewise.
6096 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6097 Change type of __owner.
6098 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6099 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6100 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6101 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6102 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6104 2003-06-19 Jakub Jelinek <jakub@redhat.com>
6106 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6107 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6109 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6110 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
6111 instead of nr to lll_futex_wake. Only set errno and return -1
6114 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6115 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6116 return actual return value from the syscall, not 0.
6118 2003-06-18 Ulrich Drepper <drepper@redhat.com>
6120 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6121 find a random value.
6122 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
6125 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6126 compat_timer_settime.
6127 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6128 compat_timer_gettime.
6129 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6130 compat_timer_getoverrun.
6131 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6132 compat_timer_delete.
6134 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6135 error-checking mutex detect busy mutexes.
6137 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6139 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6140 Add ax to clobber list.
6141 (lll_mutex_cond_lock): Likewise.
6142 (lll_mutex_unlock): Likewise.
6143 (lll_lock): Likewise.
6144 (lll_unlock): Likewise.
6146 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6147 * tst-cancel18.c: New file.
6148 * tst-cancelx18.c: New file.
6150 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6153 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6154 * tst-cancel17.c: New file.
6155 * tst-cancelx17.c: New file.
6157 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6158 * sysdeps/unix/sysv/linux/sigwait.c: New file.
6159 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6161 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6163 2003-06-16 Jakub Jelinek <jakub@redhat.com>
6165 * sysdeps/pthread/createthread.c (create_thread): Set
6166 header.multiple_threads unconditionally.
6167 * allocatestack.c (allocate_stack): Likewise.
6168 * descr.h (struct pthread): Add header.multiple_threads
6170 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6171 Define for librt. #error if neither libpthread, libc nor librt.
6172 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6174 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6175 CDISABLE): Likewise.
6176 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6177 CDISABLE): Likewise.
6178 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6179 CDISABLE): Likewise.
6180 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6181 CDISABLE): Likewise. Access header.multiple_threads outside of
6182 libc and libpthread.
6183 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6185 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6186 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6188 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6190 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6191 Also test early cancellation before the thread reaches the cancellation
6194 * Makefile: Compile forward.c with exceptions.
6196 * sysdeps/unix/sysv/linux/sleep.c: New file.
6198 2003-06-16 Ulrich Drepper <drepper@redhat.com>
6200 * Makefile: Add CFLAGS definition to compile function wrappers
6201 duplicated from libc with exceptions.
6202 * tst-cancel4.c: Also check cancellation handlers.
6204 * Makefile: Add rules to build and run tst-cancel16 and
6205 tst-cancelx16. Add missing CFLAGS definitions.
6206 * tst-cancel16.c: New file.
6207 * tst-cancelx16.c: New file.
6209 2003-06-15 Ulrich Drepper <drepper@redhat.com>
6211 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6212 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6213 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6214 (DL_SYSINFO_IMPLEMENTATION): Likewise.
6216 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6217 (LIBC_CANCEL_RESET): Likewise.
6218 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6219 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6221 (CFLAGS-libcrt-cancellation.c): Define.
6222 * sysdeps/pthread/librt-cancellation.c: New file.
6223 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6224 macros also when compiling librt.
6225 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6226 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6227 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6228 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6229 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6230 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6231 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6233 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6234 compat_timer_create.
6236 2003-06-14 Ulrich Drepper <drepper@redhat.com>
6238 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6240 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6242 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6243 Add libc_hidden_def.
6245 2003-06-13 Roland McGrath <roland@redhat.com>
6247 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6248 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6250 2003-06-11 Ulrich Drepper <drepper@redhat.com>
6252 * allocatestack.c (queue_stack): Always inline.
6253 * ptreadhP.h (__do_cancel): Likewise.
6255 2003-06-10 Jakub Jelinek <jakub@redhat.com>
6257 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6260 2003-06-10 Ulrich Drepper <drepper@redhat.com>
6262 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6263 (__pthread_cond_signal): Remove incorrect second addition for
6266 2003-06-09 Ulrich Drepper <drepper@redhat.com>
6268 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6269 (__pthread_cond_signal): Use correct futex pointer in
6270 __lll_mutex_lock_wait call.
6272 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6273 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6275 2003-06-08 Ulrich Drepper <drepper@redhat.com>
6277 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6279 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6282 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6283 hand-written CFI generation code. Since ENTRY/END also initiated
6284 CFI frames this caused two CFI sets to be generated.
6286 2003-06-07 Ulrich Drepper <drepper@redhat.com>
6288 * cleanup_routine.c: New file.
6289 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6290 * sysdeps/pthread/pthread.h: Add support for fully exception-based
6292 * Makefile (libpthread-routines): Add cleanup_routine.
6293 Add more CFLAGS variables to compile with exceptions. Add comments
6294 why which file needs unwind tables.
6295 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6297 * tst-cancelx1.c: New file.
6298 * tst-cancelx2.c: New file.
6299 * tst-cancelx3.c: New file.
6300 * tst-cancelx4.c: New file.
6301 * tst-cancelx5.c: New file.
6302 * tst-cancelx6.c: New file.
6303 * tst-cancelx7.c: New file.
6304 * tst-cancelx8.c: New file.
6305 * tst-cancelx9.c: New file.
6306 * tst-cancelx10.c: New file.
6307 * tst-cancelx11.c: New file.
6308 * tst-cancelx12.c: New file.
6309 * tst-cancelx13.c: New file.
6310 * tst-cancelx14.c: New file.
6311 * tst-cancelx15.c: New file.
6312 * tst-cleanupx0.c: New file.
6313 * tst-cleanupx0.expect: New file.
6314 * tst-cleanupx1.c: New file.
6315 * tst-cleanupx2.c: New file.
6316 * tst-cleanupx3.c: New file.
6318 * tst-cleanup0.c: Make standard compliant.
6319 * tst-cleanup1.c: Likewise.
6321 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6322 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6323 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6324 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6325 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6326 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6327 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6329 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6330 * tst-cancel12.c: New file.
6331 * tst-cancel13.c: New file.
6332 * tst-cancel14.c: New file.
6333 * tst-cancel15.c: New file.
6334 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6337 * tst-cancel1.c: Add some comments.
6339 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6342 2003-06-06 Ulrich Drepper <drepper@redhat.com>
6344 * Makefile (CFLAGS-pthread_cancel.c): Define.
6346 2003-06-05 Ulrich Drepper <drepper@redhat.com>
6348 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6349 Change type of __writer element to int.
6350 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6351 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6352 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6353 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6354 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6355 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6356 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6357 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6358 Compare with TID to determine deadlocks.
6359 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6360 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6361 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6362 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6363 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6364 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6366 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6368 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6369 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6370 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6372 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6374 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6375 * Makefile (tests): Add tst-rwlock12.
6376 * tst-rwlock12.c: New file.
6378 2003-06-05 Jakub Jelinek <jakub@redhat.com>
6380 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6381 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6382 Remove bogus hidden_proto.
6383 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6385 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6386 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6387 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6388 ___lll_mutex_timedlock): Likewise.
6390 2003-06-04 Ulrich Drepper <drepper@redhat.com>
6392 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6393 (__pthread_cond_signal): Add some code to eventually handle
6396 2003-06-01 Ulrich Drepper <drepper@redhat.com>
6398 * Makefile (tests): Add tst-exec4.
6399 (tst-exec4-ARGS): Define.
6400 * tst-exec4.c: New file.
6402 2003-05-31 Ulrich Drepper <drepper@redhat.com>
6404 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6405 Also fail if tv_nsec < 0.
6406 (__lll_timedwait_tid): Likewise.
6407 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6408 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6410 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6412 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6414 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6416 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6418 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6421 * Makefile (tests): Add tst-sem8 and tst-sem9.
6422 * tst-sem8.c: New file.
6423 * tst-sem9.c: New file.
6424 * sem_open.c: Fix creation of in_use record if the file exists but
6427 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6430 * sysdeps/pthread/timer_create.c (timer_create): In case
6431 evp==NULL, assign timer ID to sival_ptr.
6433 * descr.h (struct pthread_unwind_buf): Change type of prev element to
6434 struct pthread_unwind_buf *.
6435 (struct pthread): Likewise for cleanup_jmp_buf element.
6437 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6438 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6439 * unwind.c (__pthread_unwind_next): Likewise.
6441 2003-05-30 Ulrich Drepper <drepper@redhat.com>
6443 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6444 (lll_futex_timed_wait): Use int for futex value parameter.
6445 (lll_futex_wake): Likewise.
6446 (lll_futex_requeue): Likewise.
6448 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6449 Replace one memory operation with one register operation.
6451 * tst-join4.c (do_test): Fix error message.
6453 * tst-rwlock6.c (do_test): Use correct format specifier.
6455 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6456 (__lll_mutex_lock_wait): Replace one memory operation with one
6458 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6459 (__lll_mutex_lock_wait): Likewise.
6461 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6462 (__lll_mutex_cond_lock): Add one to value parameter of
6463 __lll_lock_wait to reflect reality in the futex syscall.
6464 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6465 (lll_mutex_cond_lock): Likewise.
6467 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6469 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6471 (lll_mutex_cond_lock): Define.
6473 2003-05-29 Ulrich Drepper <drepper@redhat.com>
6475 * Makefile (tests): Add tst-signal6.
6476 * tst-signal6.c: New file.
6478 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6479 (__lll_mutex_unlock_force): New function
6480 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6482 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6483 (__lll_mutex_unlock_force): New function.
6484 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6486 * tst-rwlock7.c (do_test): Use correct format specifier.
6488 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6489 Find break parameter in correct asm argument.
6491 2003-05-27 Jakub Jelinek <jakub@redhat.com>
6493 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6495 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6497 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6499 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6500 lll_futex_requeue, lll_mutex_unlock_force): Define.
6502 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6504 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6505 (pthread_cond_t): Add __mutex.
6506 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6507 lll_futex_requeue, lll_mutex_unlock_force): Define.
6509 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6511 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6512 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6514 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6516 (lll_futex_wait, lll_futex_wake): Define.
6517 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6518 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6519 FUTEX_REQUEUE instead of FUTEX_WAIT.
6520 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6521 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6522 mutex which was used in condvar structure. Call
6523 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6524 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6526 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6527 include tcb-offsets.h. Read wakeup value in locked region.
6528 Use the value of gbr register as THREAD_ID.
6529 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6530 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6531 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6533 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6536 2003-05-28 Ulrich Drepper <drepper@redhat.com>
6538 * sysdeps/pthread/pthread_cond_broadcast.c
6539 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6541 2003-05-26 Ulrich Drepper <drepper@redhat.com>
6543 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6544 typo in register name.
6545 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6546 correctly. Actually use requeue. Little optimization.
6547 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6548 mutex address early. Handle cancellation state as 32-bit value.
6549 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6550 Remove unnecessary label.
6552 2003-05-25 Ulrich Drepper <drepper@redhat.com>
6554 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6555 instead of FUTEX_WAIT.
6556 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6557 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6558 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6559 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6560 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6561 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6562 used in condvar structure. Call __pthread_mutex_cond_lock instead
6563 of __pthread_mutex_lock_internal.
6564 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6565 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6566 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6567 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6568 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6569 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6570 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6571 Add pthread_mutex_cond_lock.
6572 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6573 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6574 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6575 lll_mutex_cond_lock.
6576 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6577 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6578 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6580 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6581 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6583 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6584 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6586 * pthreadP.h: Declare __pthread_mutex_cond_lock.
6587 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6588 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
6589 macro don't define aliases.
6591 * cancellation.c: Remove __pthread_enable_asynccancel_2.
6592 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6593 * sysdeps/pthread/pthread_cond_timedwait.c: Use
6594 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6595 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6596 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6597 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6598 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6599 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6601 2003-05-17 Ulrich Drepper <drepper@redhat.com>
6603 * sem_open.c: Fix one endless loop. Implement correct semantics
6604 wrt opening the same semaphore more then once.
6605 * sem_close.c: Adjust for sem_open change.
6606 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
6607 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6608 * Makefile (tests): Add tst-sem7.
6609 * tst-sem7.c: New file.
6611 2003-05-16 Roland McGrath <roland@redhat.com>
6613 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6614 uninitialized variable braino.
6616 2003-05-16 Ulrich Drepper <drepper@redhat.com>
6618 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6619 test for syscall availability.
6621 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6622 __no_posix_timers to -1 if the syscalls don't exist.
6624 * pthread_join.c (pthread_join): Set tid field of the joined
6625 thread to -1. This isn't necessary but helps to recognize some
6626 error conditions with almost no cost.
6628 * allocatestack.c (FREE_P): Also negative values indicate an
6631 * unwind.c: Include <unistd.h>.
6633 2003-05-14 Ulrich Drepper <drepper@redhat.com>
6635 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6637 2003-05-14 Jakub Jelinek <jakub@redhat.com>
6639 * Makefile (crti-objs, crtn-objs): New variables.
6640 (omit-deps, extra-objs): Add crtn.
6641 ($(objpfx)libpthread.so): Depend on both crti and crtn
6642 and links to them in multidir.
6643 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6645 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
6647 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6648 (lll_mutex_unlock): Use atomic_exchange_rel.
6650 2003-05-11 Ulrich Drepper <drepper@redhat.com>
6652 * cond-perf.c (cons): Add missing locking around setting of alldone.
6654 2003-05-10 Ulrich Drepper <drepper@redhat.com>
6656 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6658 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6660 2003-05-09 Ulrich Drepper <drepper@redhat.com>
6662 * tst-sem6.c: New file.
6663 * Makefile (tests): Add tst-sem6.
6665 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6666 Use atomic_exchange_rel instead of atomic_exchange.
6667 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6670 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6671 code for lll_futex_wait and lll_futex_wake in static apps. Use
6672 vsyscall is possible.
6674 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6675 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6676 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6677 pthread_setaffinity_np.
6678 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6679 and pthread_setaffinity_np.
6680 * Makefile (libpthread-routines): Add pthread_getaffinity and
6681 pthread_setaffinity.
6683 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6684 use it in case mmap to allocate the stack fails.
6685 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6686 ARCH_MAP_FLAGS here.
6687 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6690 2003-05-08 Ulrich Drepper <drepper@redhat.com>
6692 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6693 handler implementation. It is now lockless in fork().
6694 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6695 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6696 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
6697 declare the __fork_*_lists.
6698 (struct fork_handler): Include pointers to all three functions.
6699 Add next, refcntr and need_signal elements.
6700 (__fork_handlers): New declaration.
6701 (__register_atfork_malloc): Remove declaration.
6702 (HAVE_register_atfork_malloc): Remove definition.
6703 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6704 __pthread_child_handler variable.
6705 (__libc_pthread_init): Use __register_atfork instead of explicitly
6707 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6709 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6711 * unwind.c (unwind_cleanup): Print error message and then abort. This
6712 function must never be reached.
6714 * cond-perf.c: New file.
6716 2003-05-05 Ulrich Drepper <drepper@redhat.com>
6718 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6720 2003-05-04 Roland McGrath <roland@redhat.com>
6722 * Makefile ($(objpfx)../libc.so): New target.
6724 2003-05-02 Ulrich Drepper <drepper@redhat.com>
6726 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6727 (pthread_condattr_t): Size is only an int, don't use long for
6729 (pthread_mutexattr_t): Likewise.
6730 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6731 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6732 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6734 2003-05-01 Ulrich Drepper <drepper@redhat.com>
6736 * sysdeps/i386/tls.h: Define THREAD_ID.
6737 * sysdeps/ia64/tls.h: Likewise.
6738 * sysdeps/powerpc/tls.h: Likewise.
6739 * sysdeps/s390/tls.h: Likewise.
6740 * sysdeps/sh/tls.h: Likewise.
6741 * sysdeps/x86_64/tls.h: Likewise.
6742 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6744 * pthread_mutex_timedlock.c: Likewise.
6745 * pthread_mutex_trylock.c: Likewise.
6746 * pthread_mutex_unlock.c: Likewise.
6747 * pthread_rwlock_trywrlock.c: Likewise.
6748 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6749 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6750 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6751 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6753 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6756 2003-04-29 Jakub Jelinek <jakub@redhat.com>
6758 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6759 (__SIZEOF_PTHREAD_COND_T): Define to 48.
6760 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6761 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6762 Make __align long long instead of long.
6763 (pthread_rwlock_t): Formatting.
6764 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6765 (pthread_rwlock_t): Formatting.
6766 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6767 (pthread_cond_t): Make __align long long instead of long.
6768 (pthread_rwlock_t): Move __flags field to the same position as in
6771 2003-04-30 Ulrich Drepper <drepper@redhat.com>
6773 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6774 * tst-rwlock7.c (do_test): Likewise.
6776 2003-04-26 Roland McGrath <roland@redhat.com>
6778 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6780 2003-04-22 Jakub Jelinek <jakub@redhat.com>
6782 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6783 sizeof (struct pthread).
6784 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
6786 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6788 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
6790 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
6792 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
6794 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
6796 (NO_TLS_OFFSET): Define.
6797 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
6798 add TLS_TCB_SIZE unnecessarily.
6800 2003-04-22 Roland McGrath <roland@redhat.com>
6802 * Makeconfig (shared-thread-library): Reverse link order to work
6805 2003-04-22 Ulrich Drepper <drepper@redhat.com>
6807 * semaphore.h: Fix typo in comment.
6809 2003-04-21 Ulrich Drepper <drepper@redhat.com>
6811 * sysdeps/pthread/sigfillset.c: New file.
6813 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
6814 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
6815 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
6816 * sysdeps/pthread/sigaction.c: Likewise.
6817 * sysdeps/pthread/sigprocmask.c: New file.
6818 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
6820 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6821 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
6824 2003-04-19 Ulrich Drepper <drepper@redhat.com>
6826 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6827 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
6829 * sysdeps/unix/sysv/linux/unregister-atfork.c
6830 (__unregister_atfork): Don't free memory not allocated dynamically.
6832 * semaphore.h: Remove __THROW marker from cancellation points.
6833 * nptl/sysdeps/pthread/pthread.h: Likewise.
6835 2003-04-18 Ulrich Drepper <drepper@redhat.com>
6837 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
6838 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
6841 2003-04-16 Jakub Jelinek <jakub@redhat.com>
6843 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
6845 2003-04-15 Roland McGrath <roland@redhat.com>
6847 * forward.c (__pthread_unwind): Tweak to avoid warning.
6849 2003-04-15 Ulrich Drepper <drepper@redhat.com>
6851 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
6853 2003-04-14 Ulrich Drepper <drepper@redhat.com>
6855 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
6856 overflow CFA advance instructions.
6857 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6859 2003-04-14 Jakub Jelinek <jakub@redhat.com>
6861 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
6862 * sysdeps/i386/pthread_spin_lock.c: Likewise.
6863 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
6866 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
6867 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
6868 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
6869 DW_CFA_advance_loc for .Laddl-.Lsubl.
6871 2003-04-13 Ulrich Drepper <drepper@redhat.com>
6873 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
6874 position-independent unwind data for static libraries.
6875 Add missing unwind info. Add comments.
6877 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
6878 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6879 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6880 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6882 2003-04-12 Ulrich Drepper <drepper@redhat.com>
6884 * Makefile: Make sure all cancellation points are compiled with
6885 exception and asynchronous unwind tables.
6887 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
6888 which mishandles loading of global object addresses in PIC.
6889 (THREAD_SETMEM_NC): Likewise.
6891 2003-04-11 Ulrich Drepper <drepper@redhat.com>
6893 * pthread.h: Define new data structure for cleanup buffer. Declare
6894 new cleanup handler interfaces.
6895 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
6896 (struct pthread): Add cleanup_jmp_buf pointer. Define
6897 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
6898 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
6899 it. Declare old cleanup handler installation functions.
6900 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
6902 * cleanup_defer.c: Likewise.
6903 * cleanup_compat.c: New file. Old cleanup code.
6904 * cleanup_def_compat.c: New file. Old cleanup code.
6905 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
6906 if own thread descriptor.
6907 * unwind.c: New file.
6908 * forward.c: Add __pthread_unwind.
6909 * init.c (pthread_functions): Add __pthread_unwind.
6910 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
6911 Add ptr___pthread_unwind.
6912 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
6913 and unwind function.
6914 * Makefile (libpthread-routines): Add cleanup_compat,
6915 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
6916 table generation if necessary.
6917 * version.c: Record whether unwind support is compiled in.
6918 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
6919 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
6921 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
6922 complication to generate unwind information for syscall wrappers.
6923 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6924 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
6925 __cleanup_fct_attribute.
6927 * Makefile: Add rules to build and run tst-cleanup0.
6928 * tst-cleanup0.c: New file.
6929 * tst-cleanup0.expect: New file.
6931 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
6932 caller. Optimize to avoid often unecessary local variable.
6934 2003-04-11 Roland McGrath <roland@redhat.com>
6936 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
6937 sets variable `multidir'; include that.
6938 (generated): Add it.
6939 ($(objpfx)$(multidir)/crti.o): New target.
6940 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
6942 2003-04-11 Ulrich Drepper <drepper@redhat.com>
6944 * tst-attr2.c (do_test): Add cast to avoid warning.
6945 * tst-mutex4.c (do_test): Likewise.
6947 2003-04-10 Ulrich Drepper <drepper@redhat.com>
6949 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
6952 2003-04-09 Ulrich Drepper <drepper@redhat.com>
6954 * Makefile (tests): Add tst-detach1.
6955 * tst-detach1.c: New file.
6957 2003-04-08 Ulrich Drepper <drepper@redhat.com>
6959 * sysdeps/pthread/pthread.h: Remove duplicate
6960 pthread_cleanup_{push,pop} definitions.
6962 * tst-barrier2.c: Eliminate warnings.
6963 * tst-cancel4.c: Likewise.
6964 * tst-cond4.c: Likewise.
6965 * tst-cond6.c: Likewise.
6966 * tst-detach1.c: Likewise.
6967 * tst-rwlock4.c: Likewise.
6968 * tst-rwlock6.c: Likewise.
6969 * tst-rwlock7.c: Likewise.
6970 * tst-sem3.c: Likewise.
6971 * tst-spin2.c: Likewise.
6972 * tst-umask1.c: Likewise.
6974 2003-04-07 Ulrich Drepper <drepper@redhat.com>
6976 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
6978 2003-04-06 Ulrich Drepper <drepper@redhat.com>
6980 * descr.h (struct pthread): Move cancelhandling member to the front.
6982 2003-04-05 Ulrich Drepper <drepper@redhat.com>
6984 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
6985 malloc_parent, and malloc_child statically.
6986 (__register_atfork_malloc): New function.
6987 (free_mem): Don't free any of the malloc_* variables on the list.
6988 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
6989 Define HAVE_register_atfork_malloc.
6991 2003-04-04 Ulrich Drepper <drepper@redhat.com>
6993 * sysdeps/pthread/createthread.c (create_thread): Add some more
6994 comments explaining when to set multiple_threads and when not.
6996 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
6997 THREAD_ATOMIC_BIT_SET if not already defined.
6998 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
6999 THREAD_ATOMIC_BIT_SET:
7000 * sysdeps/x86_64/tls.h: Likewise.
7001 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7002 THREAD_ATOMIC_CMPXCHG_VAL.
7003 (_pthread_cleanup_pop_restore): Likewise.
7004 * cancellation.c (__pthread_enable_asynccancel): Likewise.
7005 (__pthread_enable_asynccancel_2): Likewise.
7006 (__pthread_disable_asynccancel): Likewise.
7007 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7008 (__libc_disable_asynccancel): Likewise.
7009 * init.c (sigcancel_handler): Likewise.
7010 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7011 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7013 2003-04-03 Ulrich Drepper <drepper@redhat.com>
7015 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7016 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7017 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7018 * Makefile (tests): Add tst-cancel11.
7019 * tst-cancel11.c: New file.
7021 2003-04-01 Ulrich Drepper <drepper@redhat.com>
7023 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7024 round, not the first. Use specific_used flag instead of local
7025 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
7026 (__free_tcb): Don't call deallocate_tsd here.
7027 (start_thread): Call deallocate_tsd here.
7028 * pthread_setspecific.c: Set specific_used flag really only when
7030 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7031 * tst-tsd3.c: New file.
7032 * tst-tsd4.c: New file.
7034 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7036 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7037 Use atomic_exchange_and_add instead of __lll_add.
7038 (__lll_mutex_timedlock): Likewise.
7039 Patch by Ian Wienand.
7041 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
7043 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7044 (SINGLE_THREAD_P): Fix typo.
7045 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7047 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7049 * Makefile (tests): Add tst-align.
7050 * tst-align.c: New file.
7051 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7053 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7056 * tst-tsd2.c: Add casts to avoid warnings.
7058 2003-03-30 Ulrich Drepper <drepper@redhat.com>
7060 * descr.h (struct pthread): Move most often used elements to the front.
7062 2003-03-29 Ulrich Drepper <drepper@redhat.com>
7064 * Makefile (libpthread-routines): Add pthread_atfork.
7065 (libpthread-static-only-routines): Add pthread_atfork.
7067 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7069 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7071 (INSTALL_DTV): Add parens.
7072 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7073 Use passed descr instead of THREAD_SELF.
7074 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7075 (__lll_mutex_timedlock_wait): Correct expected value after
7077 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7078 Release lock before waking up the waiters.
7079 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7080 criteria. Reorderstruct passed to cleanup handler. Fix
7081 handling of cancellation and failung pthread_mutex_unlock call.
7082 Use __pthread_enable_asynccancel_2 instead of
7083 __pthread_enable_asynccancel.
7084 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7085 Return result of lock re-get if it fails.
7086 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7087 for __pthread_cleanup_push.
7088 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7089 completely broken rwlock implementation.
7090 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7091 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7092 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7093 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7094 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7095 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
7096 versioned_symbol macro.
7097 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7098 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7100 2003-03-27 Ulrich Drepper <drepper@redhat.com>
7102 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7103 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
7105 (struct timer): Remove th and bar field.
7106 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7107 debugging code. Create only one helper thread.
7108 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7110 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7111 Renamed. Define statically. Use thread info from siginfo.
7112 (__helper_once): New variable.
7113 (__helper_tid): New variable.
7114 (__reset_helper_control): New function.
7115 (__start_helper_thread): New function.
7117 * pthread_create.c (start_thread): Don't use setjmp inside
7118 __builtin_expect to work around gcc bug.
7120 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7121 timer_delete syscall fails, but not with ENOSYS, set
7124 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7125 (timer_settime): Fix typo.
7126 * sysdeps/unix/sysv/linux/timer_getoverr.c
7127 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7129 2003-03-27 Jakub Jelinek <jakub@redhat.com>
7131 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7132 offset of cleanupbuf.__prev.
7134 2003-03-26 Jakub Jelinek <jakub@redhat.com>
7136 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7139 2003-03-26 Ulrich Drepper <drepper@redhat.com>
7141 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7142 NULL provide default definition to syscall.
7144 2003-03-25 Roland McGrath <roland@redhat.com>
7146 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7147 (timer_id2ptr): Fix typo.
7149 2003-03-25 Ulrich Drepper <drepper@redhat.com>
7151 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7152 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7153 * sysdeps/ia64/pthreaddef.h: Likewise.
7154 * sysdeps/powerpc/pthreaddef.h: Likewise.
7155 * sysdeps/s390/pthreaddef.h: Likewise.
7156 * sysdeps/sh/pthreaddef.h: Likewise.
7157 * sysdeps/x86_64/pthreaddef.h: Likewise.
7158 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7159 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7161 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7162 SIGTIMER is not unblocked.
7163 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7165 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7167 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7168 pass pointer through as ID.
7169 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7170 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7171 * sysdeps/unix/sysv/linux/timer_create.c: New file.
7172 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7173 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7174 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7175 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7176 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7177 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7178 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7179 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7180 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7181 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7182 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7183 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7184 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7185 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7186 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7187 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7188 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7189 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7190 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7191 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7192 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7193 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7194 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7195 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7196 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7197 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7198 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7199 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7200 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7201 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7203 * pthreadP.h: Remove FRAME_LEFT definition.
7204 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7205 already left frame. Programs which have this problem are not POSIX
7207 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7209 2003-03-24 Ulrich Drepper <drepper@redhat.com>
7211 * sysdeps/pthread/tst-timer.c: Check return values of the
7214 2003-03-23 Roland McGrath <roland@redhat.com>
7216 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7217 * tst-tls3mod.c: Likewise.
7218 * tst-tls1.c: Likewise.
7219 * tst-tls2.c: Likewise.
7221 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7224 * tst-join5.c (tf1, tf2): Add a cast.
7226 * Makeconfig (includes): Append -I$(..)nptl to this variable.
7228 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7229 Don't test anything.
7230 * tst-cond4.c: Likewise.
7231 * tst-cond6.c: Likewise.
7232 * tst-flock2.c: Likewise.
7233 * tst-mutex4.c: Likewise.
7234 * tst-rwlock4.c: Likewise.
7235 * tst-signal1.c: Likewise.
7236 * tst-spin2.c: Likewise.
7237 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7239 * tst-mutex4.c: Use test-skeleton.c.
7240 * tst-spin2.c: Likewise.
7241 * tst-sysconf.c: Likewise.
7242 * tst-barrier2.c: Likewise.
7243 * tst-cond4.c: Likewise.
7244 * tst-cond6.c: Likewise.
7245 * tst-rwlock4.c: Likewise.
7246 * tst-unload.c: Likewise.
7247 * tst-flock2.c (do_test): Use return instead of exit.
7249 2003-03-22 Jakub Jelinek <jakub@redhat.com>
7251 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7253 2003-03-21 Ulrich Drepper <drepper@redhat.com>
7255 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7256 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7257 instead of __lll_compare_and_swap.
7258 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7260 Removed definition if __lll_compare_and_swap.
7262 * cancellation.c: Adjust for new form of compare&exchange macros.
7263 * cleanup_defer.c: Likewise.
7265 * libc-cancellation.c: Likewise.
7266 * old_pthread_cond_broadcast.c: Likewise.
7267 * old_pthread_cond_signal.c: Likewise.
7268 * old_pthread_cond_timedwait.c: Likewise.
7269 * old_pthread_cond_wait.c: Likewise.
7270 * pthread_cancel.c: Likewise.
7271 * pthread_create.c: Likewise.
7272 * pthread_detach.c: Likewise.
7273 * pthread_join.c: Likewise.
7274 * pthread_key_delete.c: Likewise.
7275 * pthread_setcancelstate.c: Likewise.
7276 * pthread_setcanceltype.c: Likewise.
7277 * pthread_timedjoin.c: Likewise.
7278 * pthread_tryjoin.c: Likewise.
7279 * sysdeps/pthread/createthread.c: Likewise.
7281 2003-03-20 Ulrich Drepper <drepper@redhat.com>
7283 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7284 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7285 definitions. Replace uses with calls to atomic_* functions.
7286 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7287 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7288 __lll_test_and_set calls with atomic_exchange_and_add and
7289 atomic_exchange calls respectively.
7290 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7291 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7292 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7293 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7294 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7295 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7296 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7298 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7299 returns the old value.
7301 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
7303 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7304 int for variable OLDVAL and correct inline assembler contraint.
7305 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7306 type int for variable OLD.
7308 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7310 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7311 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7312 instead of multiple_threads field in the TCB.
7314 2003-03-19 Ulrich Drepper <drepper@redhat.com>
7316 * sysdeps/i386/i686/bits/atomic.h: Removed.
7317 * sysdeps/i386/i586/bits/atomic.h: Removed.
7318 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
7319 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
7320 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
7321 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
7322 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
7323 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
7324 * atomic.h: Removed. Moved to glibc.
7326 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7327 support for clock selection.
7329 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7332 2003-03-18 Roland McGrath <roland@redhat.com>
7334 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7335 Add __lll_rel_instr first. Add memory clobber.
7336 (lll_mutex_unlock): Use __lll_test_and_set.
7337 From Paul Mackerras <paulus@samba.org>.
7339 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7341 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7342 (SINGLE_THREAD_P): Add `header.' prefix.
7343 From Paul Mackerras <paulus@samba.org>.
7345 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7346 pthread_timedjoin_np to ...
7347 (libpthread: GLIBC_2.3.3): ... here.
7348 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7350 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7351 Avoid shadowing VAL variable.
7353 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7356 2003-03-18 Ulrich Drepper <drepper@redhat.com>
7358 * Makefile (tests): Add tst-cond11.
7359 * tst-cond11.c: New file.
7361 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7362 struct passed to cleanup handler to eliminate one more
7364 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7366 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7367 (pthrad_cond_t): Replace __unused field with __clock.
7369 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7370 waken all waiters in cleanup handler.
7371 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7372 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7374 * pthread_condattr_getclock.c: New file.
7375 * pthread_condattr_setclock.c: New file.
7376 * sysdeps/pthread/pthread.h: Declare these new functions.
7377 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7378 * Makefile (libpthread-routines): Add the new functions.
7379 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7380 Renamed field to value. Document use of the bits.
7381 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7383 * pthread_condattr_setpshared.c: Likewise.
7384 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7385 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7386 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7388 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7389 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7390 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7391 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7392 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7393 Implement clock selection.
7394 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7395 * pthread-errnos.sym: Add ENOSYS.
7396 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7397 _POSIX_CLOCK_SELECTION.
7398 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7400 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7401 invalid .size directive.
7403 2003-03-17 Roland McGrath <roland@redhat.com>
7405 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7408 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7410 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7411 Use __lll_add instead of spelling it out. Use protected symbol names.
7412 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7414 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7415 Renamed from lll_compare_and_swap. Use new name where necessary.
7416 (__lll_add): Defined.
7417 (__lll_dec_if_positive): Defined.
7418 (__lll_test_and_set): Defined.
7419 * sysdeps/ia64/pthread_spin_init.c: Removed.
7420 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7421 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7422 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7423 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7424 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7425 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7426 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7427 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7428 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7429 __sync_lock_release_si.
7430 Patch by Jakub Jelinek.
7432 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7433 Fix timeout handling.
7434 (__lll_timedwait_tid): Likewise.
7435 (lll_unlock_wake_cb): Wake up other waiters if necessary.
7436 Patch by Jakub Jelinek.
7438 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7440 2003-03-17 Roland McGrath <roland@redhat.com>
7442 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7443 * sysdeps/pthread/pthread_spin_init.c: New file.
7444 * sysdeps/pthread/pthread_spin_unlock.c: New file.
7445 * sysdeps/powerpc/Makefile: New file.
7446 * sysdeps/powerpc/pthread_spin_lock.c: New file.
7447 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7448 * sysdeps/powerpc/pthreaddef.h: New file.
7449 * sysdeps/powerpc/tcb-offsets.sym: New file.
7450 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7451 * sysdeps/powerpc/tls.h: New file.
7452 * sysdeps/powerpc/bits/atomic.h: New file.
7453 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7454 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7455 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7457 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7458 * sysdeps/unix/sysv/linux/sem_post.c: New file.
7459 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7460 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7461 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7462 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7463 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7464 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7465 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7466 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7467 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7468 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7469 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7470 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7471 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7473 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7475 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7476 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7477 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7478 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7479 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7481 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7483 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7484 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7485 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7486 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7487 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7489 2003-03-16 Roland McGrath <roland@redhat.com>
7491 * tst-fork4.c: Include <string.h>.
7492 * tst-signal2.c: Likewise.
7493 * tst-mutex5.c (do_test): exit -> return.
7494 * tst-mutex2.c: Include <stdlib.h>.
7496 2003-03-16 Ulrich Drepper <drepper@redhat.com>
7498 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7499 (__lll_mutex_timedlock_wait): Correct expected value after
7500 spurious wakeup. Otherwise we would never wait again.
7502 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7503 zone versus inline asm stupidity. Use correct instructions.
7505 * tst-rwlock6.c: Add some more status output.
7507 2003-03-15 Roland McGrath <roland@redhat.com>
7509 * sysdeps/pthread/configure.in: New file.
7510 * sysdeps/pthread/configure: New file (generated).
7512 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7514 * allocatestack.c (allocate_stack): Store the exact stack size of
7515 user allocated stacks.
7517 2003-03-15 Jakub Jelinek <jakub@redhat.com>
7519 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7520 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7521 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7522 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7523 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7524 Use `header.' prefix.
7525 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7527 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7529 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7530 __builtin_frame_address, use stack pointer.
7532 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7533 instead of __builtin_frame_pointer.
7535 2003-03-14 Ulrich Drepper <drepper@redhat.com>
7537 * tst-basic1.c (do_test): Add cast to avoid warning.
7538 * tst-basic2.c (do_test): Likewise.
7540 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7541 amount of stack correction.
7543 * tst-fork4.c: Use test-skeleton.c.
7545 2003-03-14 Roland McGrath <roland@redhat.com>
7547 * init.c: Fix typo "#eli" for "#else".
7549 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
7551 * allocatestack.c (__stack_user): Use hidden_data_def.
7552 * pthread_create.c (__pthread_keys): Likewise.
7554 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7556 2003-03-14 Roland McGrath <roland@redhat.com>
7558 * tst-fork4.c: New file.
7559 * Makefile (tests): Add it.
7561 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7562 we always define the padding space.
7563 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7564 stopped supporting its own extensions fully.
7565 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7566 struct also called `header', so `header.multiple_threads' is the field
7567 name to use on all machines.
7568 * allocatestack.c (allocate_stack): Use `header.' prefix.
7569 * sysdeps/pthread/createthread.c (create_thread): Likewise.
7570 * pthread_create.c (__pthread_create_2_1): Likewise.
7571 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7572 (THREAD_SELF): Likewise.
7573 * sysdeps/x86_64/tls.h: Likewise.
7574 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7575 (SINGLE_THREAD_P): Likewise.
7576 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7577 (SINGLE_THREAD_P): Likewise.
7578 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7579 (SINGLE_THREAD_P): Likewise.
7581 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7584 2003-03-14 Ulrich Drepper <drepper@redhat.com>
7586 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7587 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7589 * pthread_create.c (start_thread): setjmp is expected to return 0.
7591 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7592 (THREAD_GETMEM_NC): Likewise.
7594 2003-03-13 Ulrich Drepper <drepper@redhat.com>
7596 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7597 and the size of the stack which must be allocated is a multiple,
7598 allocate one more page.
7599 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7600 MULTI_PAGE_ALIASING.
7602 2003-03-13 Roland McGrath <roland@redhat.com>
7604 * pthread_create.c (start_thread): Set EXITING_BIT after the
7605 event-reporting (and destructors), not before.
7607 2003-03-13 Jakub Jelinek <jakub@redhat.com>
7609 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7610 lll_futex_wake): Declare register variables as long int instead of
7611 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7612 Make syscall arguments clobbered by the syscall.
7613 (lll_futex_wait): Define using lll_futex_timed_wait.
7615 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7618 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7621 * allocatestack.c (nptl_ncreated): Only declare if
7622 COLORING_INCREMENT != 0.
7624 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7625 (__libc_enable_asynccancel_2): Remove prototype.
7627 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7628 ctid to match kernel.
7630 2003-03-12 Ulrich Drepper <drepper@redhat.com>
7632 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7633 libc_multiple_threads.
7634 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7635 __libc_multiple_threads to...
7636 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
7638 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7640 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7641 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7643 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7644 (__pthread_once_internal): Define.
7646 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7647 macros instead of .symver directly.
7648 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7649 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7651 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7652 * sysdeps/x86_64/tcb-offsets.sym: New file.
7653 * sysdeps/x86_64/Makefile: New file.
7655 * sysdeps/i386/tcb-offsets.sym: Add SELF.
7656 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7657 to access own pthread_t in TCB.
7658 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7660 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7662 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7664 2003-03-12 Roland McGrath <roland@redhat.com>
7666 * pthread-errnos.sym: New file.
7667 * Makefile (gen-as-const-headers): New variable, list that file.
7668 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7669 header <pthread-errnos.h> instead of defining errno values here.
7670 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7671 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7672 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7673 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7674 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7676 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7678 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7679 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7680 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7681 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7682 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7683 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7684 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7685 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7686 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7687 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7688 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7689 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7690 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7691 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7692 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7693 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7694 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7695 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7696 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7697 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7698 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7699 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7700 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7701 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7702 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7703 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7704 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7706 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7707 CLONE_CHILD_SETTID worked.
7709 2003-03-12 Ulrich Drepper <drepper@redhat.com>
7711 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7713 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7716 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7717 (pthread_cond_t): Add padding.
7719 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7720 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7721 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7723 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7724 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7725 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7726 (__pthread_rwlock_timedrdlock): Likewise.
7727 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7728 (__pthread_rwlock_wrlock): Likewise.
7729 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7730 (__pthread_rwlock_rdlock): Likewise.
7732 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7734 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7735 result of lock re-get if it fails.
7737 2003-03-11 Ulrich Drepper <drepper@redhat.com>
7739 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7740 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7741 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7742 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7743 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7744 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7745 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7746 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7747 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7748 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7750 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7751 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7753 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7754 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7755 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7756 (create_thread): Likewise.
7757 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7758 * init.c (__pthread_initialize_minimal_internal): Initialize
7759 __libc_multiple_threads_ptr if necessary.
7760 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
7761 __pthread_multiple_threads and __libc_multiple_threads_ptr.
7762 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7763 __libc_multiple_threads.
7764 (__libc_pthread_init): Return pointer to __libc_pthread_init if
7767 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7768 (THREAD_SETMEM_NC): Likewise.
7770 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7771 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7772 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7773 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7775 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7776 Eliminate one entire instruction.
7778 * cancellation.c (__pthread_enable_asynccancel_2): New function.
7779 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7780 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7781 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7782 instead of __pthread_enable_asynccancel.
7783 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7784 (__pthread_cond_wait): Likewise.
7785 * sysdeps/pthread/pthread_cond_timedwait.c
7786 (__pthread_cond_timedwait): Likewise.
7787 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7789 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7790 (__condvar_cleanup): Wake up all waiters in case we got signaled
7791 after being woken up but before disabling asynchronous
7793 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7794 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7795 (__condvar_cleanup): Likewise.
7797 * init.c (__NR_set_tid_address): If already defined, don't redefine.
7798 Make it an error if architecture has no #if case. Add x86-64.
7800 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
7801 pt-initfini.s generation.
7803 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
7804 (TLS_INIT_TP): Fix typo.
7806 2003-03-11 Jakub Jelinek <jakub@redhat.com>
7808 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
7809 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
7811 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
7812 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7813 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
7814 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
7815 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
7816 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7817 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7818 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7820 2003-03-11 Ulrich Drepper <drepper@redhat.com>
7822 * sysdeps/pthread/pthread_cond_timedwait.c
7823 (__pthread_cond_timedwait): Return the result of the final
7824 locking. If it succeeds, the regular function return value.
7826 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
7827 Return result of the final locking.
7828 * version.c (__nptl_main): Work around problems with the strange
7829 INTERNAL_SYSCALL macro on ppc32.
7830 * init.c (__pthread_initialize_minimal_internal): Unblock
7831 SIGCANCEL in case the parent blocked it.
7832 Reported by Paul Mackerras <paulus@samba.org>.
7834 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
7835 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
7836 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
7838 2003-03-11 Jakub Jelinek <jakub@redhat.com>
7840 * sysdeps/pthread/pthread_cond_timedwait.c
7841 (__pthread_cond_timedwait): Unlock and fail if
7842 __pthread_mutex_unlock_internal failed.
7844 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
7845 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
7847 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
7848 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
7849 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
7850 ALLOCATE_STACK): New macros.
7851 (TLS_TPADJ): New macro.
7852 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
7853 (allocate_stack): Handle TLS_DTV_AT_TP and
7854 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
7855 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
7857 * init.c [__ia64__] (__NR_set_tid_address): Define.
7859 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
7860 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
7861 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
7862 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
7863 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
7864 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
7865 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
7866 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
7867 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
7868 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
7869 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
7870 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
7871 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
7872 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
7873 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
7874 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
7875 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
7876 * sysdeps/ia64/bits/atomic.h: New file.
7877 * sysdeps/ia64/Makefile: New file.
7878 * sysdeps/ia64/pthread_spin_init.c: New file.
7879 * sysdeps/ia64/pthread_spin_lock.c: New file.
7880 * sysdeps/ia64/pthread_spin_trylock.c: New file.
7881 * sysdeps/ia64/pthread_spin_unlock.c: New file.
7882 * sysdeps/ia64/pthreaddef.h: New file.
7883 * sysdeps/ia64/tcb-offsets.sym: New file.
7884 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
7885 * sysdeps/ia64/tls.h: New file.
7887 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
7888 to syscall instead of no arguments.
7890 2003-03-10 Ulrich Drepper <drepper@redhat.com>
7892 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
7893 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
7894 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
7895 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
7897 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
7900 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
7902 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
7903 lowlevelbarrier.sym.
7904 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
7905 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
7906 Include lowlevelbarrier.h and don't define offsets locally.
7907 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
7909 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
7910 (__lll_mutex_lock_wait): Reverse order of first two parameters.
7911 (__lll_mutex_timedlock_wait): Likewise.
7912 (lll_mutex_lock): Adjust asm for that.
7913 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
7914 (lll_lock): Adjust asm for operand order change.
7915 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
7916 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
7918 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
7919 Reverse order of parameters.
7920 (__lll_timedwait_tid): Remove regparms attribute.
7921 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
7922 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
7924 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7925 (__lll_timedwait_tid): Remove one unnecessary instruction.
7927 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
7928 __lll_mutex_timedlock_wait only for NOT_IN_libc.
7929 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
7932 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
7933 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
7935 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
7938 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
7939 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
7941 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
7942 define LOCK here (if UP is not defined). The actual code is in
7945 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
7946 LOCK is already defined. Don't define lll_unlock_wake_cb and
7947 __lll_timedwait_tid for libc.so.
7948 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
7949 define LOCK here (if UP is not defined). The actual code is in
7952 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
7953 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
7954 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
7955 instead of lowlevelsem.h.
7956 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7957 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7958 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7960 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
7962 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
7963 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
7964 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
7966 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
7968 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
7971 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
7973 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
7974 of __libc_locking_needed.
7975 (lll_trylock): Initialize %eax to zero.
7977 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
7978 pthread_cond_t definition.
7980 2003-03-10 Roland McGrath <roland@redhat.com>
7982 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
7983 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
7984 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
7985 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
7986 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
7988 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
7989 Instead of setting PD->multiple_threads, set globals
7990 __pthread_multiple_threads and __libc_multiple_threads.
7991 * sysdeps/pthread/createthread.c (create_thread): Likewise.
7992 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
7993 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
7995 * descr.h (struct pthread): Conditionalize first member on
7996 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
7997 containing an anonymous tcbhead_t. Move `list' member out.
7998 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
7999 * allocatestack.c: Remove use of `header.data.' prefix.
8000 * pthread_create.c: Likewise.
8001 * init.c (__pthread_initialize_minimal_internal): Likewise.
8002 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8003 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8004 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8005 * sysdeps/x86_64/tls.h: Likewise.
8006 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8007 (SINGLE_THREAD_P): Likewise.
8008 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8009 (SINGLE_THREAD_P): Likewise.
8010 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8011 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8013 2003-03-09 Ulrich Drepper <drepper@redhat.com>
8015 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8017 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8018 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8020 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8021 leftovers from the ia32 code.
8023 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8025 (clear_once_control): Don't load %esi.
8027 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8030 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8032 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8033 * sysdeps/unix/sysv/linux/createthread.c: ...here.
8035 * Makefile (tests): Add tst-cond10.
8036 * tst-cond10.c: New file.
8038 2003-03-08 Ulrich Drepper <drepper@redhat.com>
8040 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8041 * tst-signal3.c (do_test): Likewise.
8042 * tst-sem5.c (do_test): Likewise.
8043 * tst-kill6.c (do_test): Likewise.
8044 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
8046 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8048 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8049 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8050 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8051 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8052 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8053 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8054 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8056 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8058 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8059 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8060 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8061 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8062 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8063 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8064 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8065 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8067 * allocatestack.c (allocate_stack): If mprotect() fails free the
8070 2003-03-07 Ulrich Drepper <drepper@redhat.com>
8072 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8074 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8075 lll_wake_tid. This was used only to work around kernel limits in
8077 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8078 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8079 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8080 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8082 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8083 (__pthread_initialize_minimal_internal): Change initialization of
8084 __static_tls_align_m1 appropriately.
8085 * pthreadP.h (__static_tls_align_m1): Renamed from
8087 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8088 instead of __static_tls_align-1.
8090 2003-03-04 Ulrich Drepper <drepper@redhat.com>
8092 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8094 * pthread_create.c: Define __pthread_keys using nocommon
8095 attribute, not by placing it explicitly in bss.
8096 Remove DEFINE_DEALLOC definition. Not needed anymore.
8098 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8099 Use it in mmap call to allocate stacks.
8101 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8103 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8104 result of the thread function.
8106 2003-03-03 Ulrich Drepper <drepper@redhat.com>
8108 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
8109 version is just fine.
8111 * sysdeps/unix/sysv/linux/libc_pthread_init.c
8112 (__pthread_child_handler): Renamed from pthread_child_handler,
8113 exported, and marked hidden. Change all users.
8114 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8115 free __pthread_child_handler from child list.
8117 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
8119 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8121 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8122 Fix handling of cancellation and failing pthread_mutex_unlock call.
8123 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8124 (__pthread_cond_wait): Likewise.
8126 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8127 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8128 lll_futex_timed_wait call.
8129 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8130 (pthread_rwlock_timedwrlock): Likewise.
8132 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8133 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8134 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8136 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8137 check of lll_futex_wake return value.
8139 2003-03-03 Roland McGrath <roland@redhat.com>
8141 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8143 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8144 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8145 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8147 2003-03-02 Ulrich Drepper <drepper@redhat.com>
8149 * sysdeps/pthread/timer_create.c (timer_create): Return correct
8150 error for CPU clocks.
8152 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8153 _POSIX_MONOTONIC_CLOCK.
8154 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8156 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8159 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8161 * descr.h (struct pthread): Move cleanup field to the front.
8163 2003-03-01 Roland McGrath <roland@redhat.com>
8165 * sem_open.c (sem_open): Braino fix.
8167 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8169 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8170 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8171 __pthread_cleanup_pop functionality.
8172 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8174 * descr.h (struct pthread): Move tid field to the front now that
8177 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8178 (__lll_mutex_timedlock_wait): Remove.
8179 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8180 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8181 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8182 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8183 (lll_unlock_wake_cb): Don't save and restore %esi.
8184 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8186 (__lll_timedwait_tid): Add alignment.
8187 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8188 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8190 (__lll_timedwait_tid): Removed.
8191 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8192 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8193 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8194 (pthread_barrier_wait): Don't save, load, and restore %esi for
8196 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8197 (__pthread_cond_signal): Don't save, load, and restore %esi.
8198 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8199 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8200 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8201 Don't save, load, and restore %esi.
8203 2003-02-27 Ulrich Drepper <drepper@redhat.com>
8205 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8206 Release lock before waking up the waiters.
8208 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8210 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8211 (reader_thread): Likewise.
8213 * sysdeps/pthread/pthread_rwlock_unlock.c
8214 (__pthread_rwlock_unlock): Release internal lock early. Don't try
8215 to wake up readers if there are none.
8217 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8218 Release internal lock before wake threads.
8220 2003-02-26 Ulrich Drepper <drepper@redhat.com>
8222 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8223 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
8225 * tst-rwlock9.c: Likewise.
8226 * tst-rwlock10.c: New file.
8227 * tst-rwlock11.c: New file.
8229 * Makefile (tests): Add tst-dlsym1.
8230 * tst-dlsym1.c: New file.
8232 * init.c (__pthread_initialize_minimal_internal): Set
8233 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8234 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8236 2003-02-24 Ulrich Drepper <drepper@redhat.com>
8238 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8240 * tst-cond2.c: Fix sychronization with child.
8242 * tst-rwlock8.c (reader_thread): Remove unused variable.
8244 * Makefile: Add rules to build and run tst-tls3.
8245 * tst-tls3.c: New file.
8246 * tst-tls3mod.c: New file.
8248 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8249 * tst-rwlock8.c: New file.
8250 * tst-rwlock9.c: New file.
8251 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8252 complete broken rwlock implementation.
8253 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8255 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8257 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8258 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8259 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8260 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8261 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8262 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8263 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8265 2003-02-23 Roland McGrath <roland@redhat.com>
8267 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8269 2003-02-23 Ulrich Drepper <drepper@redhat.com>
8271 * Makefile (tests): Add tst-context1.
8272 * tst-context1.c: New file.
8274 * Makefile (tests): Add tst-tls1 and tst-tls2.
8275 * tst-tls1.c: New file.
8276 * tst-tls2.c: New file.
8278 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8281 * pthread_create.c (start_thread): Set EXITING_BIT early.
8283 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8284 (THREAD_GETMEM_NC): Likewise.
8286 2003-02-22 Ulrich Drepper <drepper@redhat.com>
8288 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8289 off 3 more bytes by using offset-less instructions when possible.
8291 * Makefile: Add dependency for $(objpfx)version.d.
8293 * eintr.c (eintr_source): Add unnecessary return but the compiler
8296 * tst-kill3.c: Include <unistd.h>.
8298 2003-02-21 Roland McGrath <roland@redhat.com>
8300 * pthread_create.c (start_thread): Call __libc_thread_freeres.
8302 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8304 * Makefile (tests): Add tst-eintr1.
8305 (distribute): Add eintr.c.
8306 * tst-eintr1.c: New file.
8307 * eintr.c: New file.
8309 * pthread_cancel.c (pthread_cancel): Use tkill directly.
8311 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8312 Disallow sending SIGCANCEL.
8314 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
8315 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8316 * tst-kill1.c: New file.
8317 * tst-kill2.c: New file.
8318 * tst-kill3.c: New file.
8319 * tst-kill5.c: New file.
8320 * tst-kill6.c: New file.
8321 * tst-basic7.c: Renamed to...
8322 * tst-kill4.c: ...this.
8324 2003-02-21 Roland McGrath <roland@redhat.com>
8326 * Makefile (install-lib-ldscripts): New variable.
8328 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8330 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8331 * pthread_cancel.c: Use INVALID_TD_P.
8332 * pthread_detach.c: Likewise.
8333 * pthread_getschedparam.c: Likewise.
8334 * pthread_setschedparam.c: Likewise.
8335 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8336 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8337 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8338 * pthread_timedjoin.c: Likewise.
8340 * tst-basic7.c: Include <signal.h>.
8342 * pthread_join.c (pthread_join): Limited checking for invalid
8344 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8346 2003-02-20 Ulrich Drepper <drepper@redhat.com>
8348 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8349 beginning of the loop. Clear the entire first block of TSD.
8350 * Makefile (tests): Add tst-key4.
8351 * tst-key4.c: New file.
8353 2003-02-18 Ulrich Drepper <drepper@redhat.com>
8355 * Makefile (tests): Add tst-basic7.
8356 * tst-basic7.c: New file.
8358 * pthread_create.c (deallocate_tsd): Mark as internal_function.
8359 Add some more __builtin_expect.
8361 * pthreadP.h: Define dummy version of DEBUGGING_P.
8363 2003-02-17 Ulrich Drepper <drepper@redhat.com>
8365 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8366 _POSIX_THREAD_PRIORITY_SCHEDULING.
8367 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8368 _XOPEN_REALTIME_THREADS.
8369 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8371 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8372 kernel returns EINVAL for PID <= 0, work around it.
8374 * Makefile (tests): Add tst-signal5.
8375 * tst-signal5.c: New file.
8377 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8380 * tst-cancel1.c (tf): Block all signals.
8382 * Makefile (tests): Add tst-basic6.
8383 * tst-basic6.c: New file.
8385 * tst-basic1.c: Add test for process ID.
8387 * Makefile (tests): Add tst-cancel10.
8388 * tst-cancel10.c: New file.
8390 * Makefile (tests): Add tst-signal4.
8391 * tst-signal4.c: New file.
8393 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8394 __sigismember instead of sigismember. Add __builtin_expect.
8396 2003-02-16 Ulrich Drepper <drepper@redhat.com>
8398 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8399 pthread_setcancelstate, and pthread_rwlock_setpshared.
8401 * tst-cancel7.c (do_test): Make sure the pid file exists before
8402 canceling the thread.
8404 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8405 pthread_rwlock_timedrdlock tests.
8406 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8407 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8408 Check for invalid tv_nsec field.
8409 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8412 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8413 recursive mutex of overflow.
8415 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8417 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8418 going into an endless loop.
8419 * Makefile (tests): Add tst-cancel9.
8420 * tst-cancel9.c: New file.
8422 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8424 2003-02-15 Ulrich Drepper <drepper@redhat.com>
8426 * tst-mutex5.c (do_test): Add more timedlock tests.
8428 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8429 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8431 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8432 use INLINE_SYSCALL. Error number is returned, not -1.
8434 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8435 and __deallocate_stack with internal_function.
8436 * pthread_create.c: Adjust definitions appropriately.
8437 * allocatestack.c: Likewise.
8439 * pthread_join.c: Add one more __builtin_expect.
8440 * pthread_timedjoin.c: Likewise.
8442 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8443 not data of sequence number does not match.
8444 Add one __builtin_expect.
8446 * Makefile (tests): Add tst-clock1.
8447 * tst-clock1.c: New file.
8449 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8451 * Makefile (tests): Add tst-basic5.
8452 * tst-basic5.c: New file.
8454 2003-02-14 Ulrich Drepper <drepper@redhat.com>
8456 * Makefile (tests): Add tst-basic4.
8457 * tst-basic4.c: New file.
8459 * pthreadP.h: Add declaraction for __nptl_nthreads.
8460 * pthread_create.c: Define __nptl_nthreads
8461 (start_thread): Increment __nptl_nthreads at beginning. Decrement
8462 after thread is done. If then zero, call exit(0).
8463 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8464 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
8465 * init.c (pthread_functions): Initialize ptr_nthreads.
8466 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8467 (__reclaim_stacks): Decrement __nptl_nthreads.
8468 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8470 * Makefile (tests): Add tst-basic3.
8471 * tst-basic3.c: New file.
8473 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
8474 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
8475 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8476 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
8477 if asynchronous canceling is enabled.
8478 * pthread_join.c (pthread_join): When recognizing circular joins,
8479 take into account the other thread might be already canceled.
8480 * Makefile (tests): Add tst-join5.
8481 * tst-join5.c: New file.
8483 * Makefile (tests): Add tst-join4.
8484 * tst-join4.c: New file.
8486 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8488 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8490 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
8492 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8493 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8494 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8496 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8498 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8499 error if lll_futex_wake failed.
8501 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8503 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8504 handling of cancellation and failung pthread_mutex_unlock call.
8505 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8506 * Makefile (tests): Add tst-cond8 and tst-cond9.
8507 * tst-cond8.c: New file.
8508 * tst-cond9.c: New file.
8510 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8512 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
8513 non-standard initializers with __USE_GNU.
8515 * Makefile (tests): Add tst-cleanup3.
8516 * tst-cleanup3.c: New file.
8518 2003-02-12 Ulrich Drepper <drepper@redhat.com>
8520 * Makefile (tests): Add tst-attr1 and tst-attr2.
8521 * tst-attr1.c: New file.
8522 * tst-attr2.c: New file.
8524 * Makefile: Add rules to build and run tst-atfork2 test.
8525 * tst-atfork2.c: New file.
8526 * tst-atfork2mod.c: New file.
8528 * sysdeps/unix/sysv/linux/unregister-atfork.c
8529 (__unregister_atfork): Free the memory allocated for the handlers
8530 after removing them from the lists.
8532 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8535 * tst-atfork1.c (do_test): Wait for the child we forked.
8536 Report error in child.
8538 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8540 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8542 2003-02-10 Ulrich Drepper <drepper@redhat.com>
8544 * Makefile (tests): Add tst-cancel8.
8545 * tst-cancel8.c: New file.
8547 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8548 clearing of control variable.
8549 * Makefile (tests): Add tst-once3 and tst-once4.
8550 * tst-once3.c: New file.
8551 * tst-once4.c: New file.
8553 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
8555 * sysdeps/sh/Makefile: New file.
8556 * sysdeps/sh/bits/atomic.h: New file.
8557 * sysdeps/sh/pthread_spin_init.c: New file.
8558 * sysdeps/sh/pthread_spin_lock.c: New file.
8559 * sysdeps/sh/pthread_spin_trylock.S: New file.
8560 * sysdeps/sh/pthread_spin_unlock.S: New file.
8561 * sysdeps/sh/pthreaddef.h: New file.
8562 * sysdeps/sh/tcb-offsets.sym: New file.
8563 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8564 * sysdeps/sh/tls.h: New file.
8565 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8566 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8567 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8568 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8569 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8570 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8571 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8572 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8573 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8574 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8575 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8576 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8577 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8578 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8579 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8580 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8581 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8582 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8583 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8584 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8585 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8586 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8587 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8588 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8589 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8590 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8591 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8592 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8593 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8594 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8596 2003-02-08 Ulrich Drepper <drepper@redhat.com>
8598 * tst-cond2.c: Rearrange code to not rely on behavior undefined
8601 * tst-basic2.c (do_test): Lock mutex before creating the thread.
8603 2003-02-07 Ulrich Drepper <drepper@redhat.com>
8605 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8606 (TLS_GET_FS): New #define.
8607 (TLS_SET_FS): New #define.
8608 Correct value of __NR_set_thread_area.
8610 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8612 2003-02-06 Ulrich Drepper <drepper@redhat.com>
8614 * Makefile (tests): Add tst-popen1.
8615 * tst-popen1.c: New file.
8617 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8618 but inactive generalization.
8619 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8620 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8621 Minor optimization, remove one instruction.
8622 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8624 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
8626 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8628 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
8630 * init.c (__NR_set_tid_address): Add #ifdef for s390.
8631 * sysdeps/pthread/pthread_barrier_wait.c: New file.
8632 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8633 * sysdeps/pthread/pthread_cond_signal.c: New file.
8634 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8635 * sysdeps/pthread/pthread_cond_wait.c: New file.
8636 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8637 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8638 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8639 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8640 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8641 * sysdeps/s390/Makefile: New file.
8642 * sysdeps/s390/bits/atomic.h: New file.
8643 * sysdeps/s390/pthread_spin_init.c: New file.
8644 * sysdeps/s390/pthread_spin_lock.c: New file.
8645 * sysdeps/s390/pthread_spin_trylock.c: New file.
8646 * sysdeps/s390/pthread_spin_unlock.c: New file.
8647 * sysdeps/s390/pthreaddef.h: New file.
8648 * sysdeps/s390/tcb-offsets.sym: New file.
8649 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8650 * sysdeps/s390/tls.h: New file.
8651 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8652 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8653 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8654 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8655 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8656 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8657 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8658 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8659 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8660 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8661 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8662 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8663 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8664 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8665 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8666 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8667 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8668 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8669 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8670 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8671 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8672 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8673 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8675 2003-02-04 Ulrich Drepper <drepper@redhat.com>
8677 * atomic.h: Add a couple more default implementations.
8678 (atomic_compare_and_exchange_acq): Use
8679 __arch_compare_and_exchange_32_acq in return value definition. It
8681 (atomic_bit_set): Renamed from atomic_set_bit.
8682 Add missing atomic_ prefixes.
8684 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8685 thread library is available, use correct value to mark initialized
8688 2003-02-03 Ulrich Drepper <drepper@redhat.com>
8690 * allocatestack.c (allocate_stack): Use __getpagesize instead of
8691 __sysconf to determine pagesize.
8693 * pthread_create.c: Include <atomic.h>.
8694 * allocatestack.c (allocate_stack): Implement coloring of the
8695 allocated stack memory. Rename pagesize to pagesize_m1. It's the
8696 size minus one. Adjust users.
8697 * sysdeps/i386/i686/Makefile: New file.
8699 2003-02-02 Ulrich Drepper <drepper@redhat.com>
8701 * allocatestack.c: Improve comment throughout the file.
8703 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8704 (__lll_lock_wait): Add branch prediction.
8705 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8706 (__lll_lock_wait): Likewise.
8707 (lll_unlock_wake_cb): Removed.
8709 2003-01-31 Ulrich Drepper <drepper@redhat.com>
8711 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8712 _POSIX_THREAD_PRIORITY_SCHEDULING.
8714 2003-01-30 Jakub Jelinek <jakub@redhat.com>
8716 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8717 Fix return type of ptr___pthread_getspecific.
8719 2003-01-29 Ulrich Drepper <drepper@redhat.com>
8721 * Makefile (tests): Add tst-umask1.
8722 (tst-umask1-ARGS): Define.
8723 * tst-umask1.c: New file.
8725 2003-01-28 Ulrich Drepper <drepper@redhat.com>
8727 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
8728 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8729 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8730 pthread_rwlock_unlock.
8731 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8732 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8733 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8734 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8735 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8737 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8738 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8740 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8741 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8742 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8744 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8745 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8747 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8748 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8749 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8751 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8752 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8754 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8756 * Makefile (libpthread-routines): Remove lowlevelcond and
8757 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8758 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8759 and pthread_cond_broadcast.
8760 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8761 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8762 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8763 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8764 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8765 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8766 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8767 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8768 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8769 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8770 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8771 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8772 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8773 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8774 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8775 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8776 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8777 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8778 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8779 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8780 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8781 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8782 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8783 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8784 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8785 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8786 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8787 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8788 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
8789 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
8790 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
8792 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
8793 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
8794 of the code is moved to ...
8795 * sysdeps/pthread/createthread.c: ...here. New file.
8797 2003-01-27 Ulrich Drepper <drepper@redhat.com>
8799 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
8800 (__new_sem_post): Clear %eax before returning.
8801 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
8803 * Makefile (tests): Add tst-cleanup2.
8804 * tst-cleanup2.c: New file.
8806 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8807 Interpret first parameter correctly.
8809 2003-01-17 Ulrich Drepper <drepper@redhat.com>
8811 * Makefile (headers): Add bits/semaphore.h.
8813 2003-01-16 Jakub Jelinek <jakub@redhat.com>
8815 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
8818 2003-01-14 Ulrich Drepper <drepper@redhat.com>
8820 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
8821 must be used and mapping failed.
8822 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
8824 * Makefile (CFLAGS-pthread_self.os): Define this, not
8825 CFLAGS-pthread_self.c.
8827 2003-01-13 Ulrich Drepper <drepper@redhat.com>
8829 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
8832 * Makefile (libpthread-routines): Add version. Add rules to build
8833 version.os and banner.h.
8834 * version.c: New file.
8836 2003-01-13 Jakub Jelinek <jakub@redhat.com>
8838 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
8839 the alias unconditional.
8840 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
8842 2003-01-13 Ulrich Drepper <drepper@redhat.com>
8844 * Makefile (CFLAGS-pthread_self.c): New definition.
8846 2003-01-06 Jakub Jelinek <jakub@redhat.com>
8848 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
8849 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
8850 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
8851 * init.c (__pthread_initialize_minimal_internal): Likewise.
8853 2003-01-07 Jakub Jelinek <jakub@redhat.com>
8855 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
8857 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8858 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8859 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8860 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8861 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8862 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8864 2003-01-06 Jakub Jelinek <jakub@redhat.com>
8866 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
8867 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
8868 * tst-cancel-wrappers.sh: Remove all exceptions.
8870 2003-01-05 Ulrich Drepper <drepper@redhat.com>
8872 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
8873 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
8875 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
8876 Use __libc_pthread_functions array if SHARED.
8878 * pthreadP.h: Move pthread_cond_2_0_t definition to...
8879 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
8881 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
8882 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
8883 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
8884 __libc_ptf_call instead of __libc_maybe_call.
8886 (__libc_cleanup_region_start): Wrap function name with PTF call.
8887 (__libc_cleanup_region_end): Likewise.
8888 (__libc_cleanup_end): Likewise.
8890 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
8891 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
8892 * pthread_key_create.c: Add __pthread_key_create_internal alias.
8893 * pthreadP.h: Add prototypes.
8895 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
8896 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
8897 __pthread_rwlock_unlock aliases.
8898 * pthreadP.h: Add prototypes for new aliases.
8900 * pthreadP.h (struct pthead_functions): Moved to...
8901 * sysdeps/pthread/pthread-functions.h: ...here. New file.
8902 * init.c (pthread_functions): Add initializers for new elements.
8904 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
8905 __pthread_cleanup_pop_restore aliases.
8906 * pthreadP.h: Add prototypes.
8908 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
8909 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
8910 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
8911 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
8912 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8913 * pthreadP.h: Adjust prototypes and callers.
8915 2003-01-04 Ulrich Drepper <drepper@redhat.com>
8917 * Makefile (tests): Add tst-cancel7.
8918 (tst-cancel7-ARGS): New variable.
8919 * tst-cancel7.c: New file.
8921 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
8922 around gcc defficiencies.
8923 * old_pthread_cond_signal.c: Likewise.
8924 * old_pthread_cond_timedwait.c: Likewise.
8925 * old_pthread_cond_wait.c: Likewise.
8927 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
8929 2003-01-03 Ulrich Drepper <drepper@redhat.com>
8931 * Makefile (tests): Add tst-cond7.
8932 * tst-cond7.c: New file.
8934 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
8935 (condvar_cleanup): Get condvar address from the right place.
8937 * atomic.h: Correct definitions of atomic_full_barrier,
8938 atomic_read_barrier, atomic_write_barrier.
8940 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
8942 * old_pthread_cond_signal.c: Likewise.
8943 * old_pthread_cond_timedwait.c: Likewise.
8944 * old_pthread_cond_wait.c: Likewise.
8946 2003-01-03 Jakub Jelinek <jakub@redhat.com>
8948 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
8950 2003-01-03 Ulrich Drepper <drepper@redhat.com>
8952 * pthreadP.h (pthread_cond_2_0_t): New type.
8953 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
8954 Use new type for the 2.0 condvar function prototypes.
8955 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
8956 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
8958 * old_pthread_cond_destroy.c: Likewise.
8959 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
8960 * old_pthread_cond_signal.c: Likewise.
8961 * old_pthread_cond_timedwait.c: Likewise.
8962 * old_pthread_cond_wait.c: Likewise.
8964 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
8965 (__pthread_cond_wait): Don't save cancellation mode and seq value
8968 * herrno.c (__h_errno_location): Don't define as weak.
8970 2003-01-02 Jakub Jelinek <jakub@redhat.com>
8972 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
8973 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
8974 and pthread_cond_wait.
8975 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
8977 (__pthread_cond_broadcast_2_0): ... this.
8978 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
8980 (__pthread_cond_destroy_2_0): ... this.
8981 * old_pthread_cond_init.c (__old_pthread_cond_init):
8983 (__pthread_cond_init_2_0): ... this.
8984 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
8986 (__pthread_cond_signal_2_0): ... this.
8987 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
8989 (__pthread_cond_wait_2_0): ... this.
8990 * pthread_cond_destroy.c: Include shlib-compat.h.
8991 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
8992 * pthread_cond_init.c: Include shlib-compat.h.
8993 (pthread_cond_init): Change strong_alias into versioned_symbol.
8994 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
8995 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
8997 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
8998 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
8999 __pthread_cond_wait_2_0): New prototypes.
9000 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9001 __old_pthread_cond_init, __old_pthread_cond_signal,
9002 __old_pthread_cond_wait): Removed.
9003 * init.c: Include shlib-compat.h.
9004 (pthread_functions): Guard ptr___pthread_attr_init_2_0
9005 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9006 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9007 ptr___pthread_cond_*_2_0 fields.
9008 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9009 pthread_cond_*@GLIBC_2.0 compatibility symbols.
9011 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9012 LIBC_SIGACTION was not yet defined.
9013 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9014 [!defined LIBC_SIGACTION] (__sigaction): New function and
9016 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9017 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9019 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9021 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9023 2003-01-02 Ulrich Drepper <drepper@redhat.com>
9025 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9026 New, larger type definition.
9027 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9029 * Versions [libpthread]: Add definitions for new pthread_cond_*
9030 interfaces for version GLIBC_2.3.2.
9031 * pthread_cond_init.c: Update initialization for new type definition.
9032 * Makefile (libpthread-routines): Remove pthread_cond_wait,
9033 pthread_cond_timedwait, pthread_cond_signal, and
9034 pthread_cond_broadcast. Add old_pthread_cond_init,
9035 old_pthread_cond_destroy, old_pthread_cond_wait,
9036 old_pthread_cond_timedwait, old_pthread_cond_signal, and
9037 old_pthread_cond_broadcast.
9038 * old_pthread_cond_broadcast.c: New file.
9039 * old_pthread_cond_destroy.c: New file.
9040 * old_pthread_cond_init.c: New file.
9041 * old_pthread_cond_signal.c: New file.
9042 * old_pthread_cond_timedwait.c: New file.
9043 * old_pthread_cond_wait.c: New file.
9044 * pthreadP.h: Add prototypes for the compatibility interfaces.
9046 * pthread_cond_destroy.c: Don't include <errno.h>.
9048 2003-01-01 Ulrich Drepper <drepper@redhat.com>
9050 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9051 unnecessary zero offset when addressing MUTEX.
9053 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9055 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9057 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9058 for __register_atfork.
9060 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9062 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9063 instead of ASSEMBLER test macro.
9065 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9066 __libc_current_sigrtmax): Add libc_hidden_def.
9068 * sysdeps/pthread/list.h: Remove assert.h include.
9070 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9072 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9073 __pthread_initialize_minimal_internal not
9074 __pthread_initialize_minimal.
9076 2002-12-30 Ulrich Drepper <drepper@redhat.com>
9078 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9079 __pthread_initialize_minimal as hidden.
9081 * init.c (__pthread_initialize_minimal_internal): Don't mark as
9084 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9086 * Makefile ($(inst_libdir)/libpthread.so): Depend on
9087 $(common-objpfx)format.lds, include that into the output script.
9089 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9091 2002-12-28 Andreas Jaeger <aj@suse.de>
9093 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9094 nsec resolution changes.
9095 (xstat64_conv): Likewise.
9096 (xstat32_conv): Likewise.
9097 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9099 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9100 structs stat and stat64.
9101 * time/time.h (__timespec_defined): Define for __USE_MISC.
9102 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9104 2002-12-30 Jakub Jelinek <jakub@redhat.com>
9106 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
9108 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9109 (pthread_exit): Use strong_alias to avoid warnings.
9110 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9111 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9112 ptr___pthread_attr_init_2_*.
9113 * init.c (pthread_functions): Adjust.
9115 2002-12-29 Ulrich Drepper <drepper@redhat.com>
9117 * forward.c: Make all functions available by default again. It
9118 caused too much trouble.
9120 * pt-siglongjmp.c: Removed.
9122 2002-12-28 Jakub Jelinek <jakub@redhat.com>
9124 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9125 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9126 * sysdeps/i386/Makefile: New file.
9127 * sysdeps/i386/tcb-offsets.sym: New file.
9128 * sysdeps/pthread/tcb-offsets.h: New file.
9129 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9130 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9132 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9133 __register_atfork...
9134 (GLIBC_2.3.2): ...here.
9136 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9138 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9139 pthread_attr_setstackaddr with __attribute_deprecated__.
9141 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9143 * pt-system.c (system): Remove cancellation handling.
9144 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9145 cancellation routines.
9147 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9149 * descr.h: Include <dl-sysdep.h>.
9150 (struct pthread): Move header.data.list to the back of the struct.
9151 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9152 (MULTIPLE_THREADS_OFFSET): Adjust offset.
9153 (SYSINFO_OFFSEET): Likewise.
9155 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9157 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9159 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9160 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9161 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9162 (USE_DL_SYSINFO): Undef.
9164 2002-12-22 Jakub Jelinek <jakub@redhat.com>
9166 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9167 $(common-objpfx)libc.so.
9168 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9169 it is bigger than pipe buffer size even on arches with bigger
9171 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9173 2002-12-25 Ulrich Drepper <drepper@redhat.com>
9175 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9176 correct errno access for case that USE___THREAD is not defined.
9178 2002-12-24 Ulrich Drepper <drepper@redhat.com>
9180 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9181 Patch by Marijn Ros <marijn@mad.scientist.com>.
9183 2002-12-22 Roland McGrath <roland@redhat.com>
9185 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9187 2002-12-20 Ulrich Drepper <drepper@redhat.com>
9189 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9191 2002-12-19 Ulrich Drepper <drepper@redhat.com>
9193 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9194 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9195 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9197 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9199 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9200 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9201 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9202 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9203 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9204 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9205 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9206 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9208 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9210 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9212 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9214 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9216 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9217 that sysinfo is properly initialized.
9218 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9219 to 1 only for ld.so.
9221 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9222 RTLD_CORRECT_DYNAMIC_WEAK.
9224 2002-12-19 Jakub Jelinek <jakub@redhat.com>
9226 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9227 Use return 0 as 6th argument to FORWARD4.
9228 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9230 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9232 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9233 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9234 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9235 (INIT_SYSINFO): New #define.
9236 (TLS_TP_INIT): Use INIT_SYSINFO.
9237 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9238 At test to make sure SYSINFO_OFFSET value is correct.
9239 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9241 2002-12-18 Jakub Jelinek <jakub@redhat.com>
9243 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9244 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9245 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9246 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9247 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9248 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9249 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9251 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9253 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9254 macro instead of using int $0x80 directly.
9256 * sysdeps/pthread/bits/stdio-lock.h: New file.
9257 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9258 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9259 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9260 * Makefile (routines): Add libc-lowlevelmutex.
9262 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9263 __i686.get_pc_thunk.dx.
9265 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9267 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9268 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9269 ($(objpfx)tst-cancel-wrappers.out): New rule.
9270 * tst-cancel-wrappers.sh: New test.
9271 * tst-locale1.c: Include signal.h.
9272 (uselocale): Test static linking of __libc_current_sigrt*.
9274 2002-12-17 Ulrich Drepper <drepper@redhat.com>
9276 * Makefile (tests): Add tst-cancel6.
9277 * tst-cancel6.c: New file
9279 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9281 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9282 Define meaningfully for assembler as well.
9283 * pthreadP.h (struct pthread_functions): Remove
9284 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
9285 and ptr_pthread_attr_init_2_1 fields.
9286 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9287 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9288 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9289 (FORWARD3): Define using FORWARD4.
9290 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9292 * pt-system.c: Remove duplicate stdlib.h include.
9294 2002-12-16 Ulrich Drepper <drepper@redhat.com>
9296 * sem_init.c: Define sem_init@GLIBC_2.0.
9297 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9298 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9300 * flockfile.c: Moved to...
9301 * sysdeps/pthread/flockfile.c: ...here. New file.
9302 * funlockfile.c: Moved to...
9303 * sysdeps/pthread/funlockfile.c: ...here. New file.
9304 * ftrylockfile.c: Moved to...
9305 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
9307 2002-12-16 Jakub Jelinek <jakub@redhat.com>
9309 * libc-cancellation.c: Guard both function with
9310 #if !defined NOT_IN_libc.
9311 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9312 automatically provided pthread wrappers.
9313 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9314 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9316 * pt-open.c: Removed.
9317 * pt-fcntl.c: Removed.
9318 * pt-fsync.c: Removed.
9319 * pt-lseek.c: Removed.
9320 * pt-msgrcv.c: Removed.
9321 * pt-msgsnd.c: Removed.
9322 * pt-msync.c: Removed.
9323 * pt-nanosleep.c: Removed.
9324 * pt-open64.c: Removed.
9325 * pt-pause.c: Removed.
9326 * pt-pread.c: Removed.
9327 * pt-pread64.c: Removed.
9328 * pt-pwrite.c: Removed.
9329 * pt-pwrite64.c: Removed.
9330 * pt-read.c: Removed.
9331 * pt-recv.c: Removed.
9332 * pt-recvfrom.c: Removed.
9333 * pt-recvmsg.c: Removed.
9334 * pt-send.c: Removed.
9335 * pt-sendto.c: Removed.
9336 * pt-sigtimedwait.c: Removed.
9337 * pt-sigwait.c: Removed.
9338 * pt-wait.c: Removed.
9339 * pt-waitpid.c: Removed.
9340 * pt-write.c: Removed.
9341 * pt-accept.c: Removed.
9342 * pt-close.c: Removed.
9343 * pt-connect.c: Removed.
9344 * pt-lseek64.c: Removed.
9345 * pt-sendmsg.c: Removed.
9346 * pt-tcdrain.c: Removed.
9348 2002-12-15 Ulrich Drepper <drepper@redhat.com>
9350 * init.c (__pthread_initialize_minimal_internal): Renamed from
9351 __pthread_initialize_minimal. Make old name an alias. This
9352 converts a normal relocation into a relative relocation.
9354 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9356 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9357 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9358 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9359 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9360 pt-sigwaitinfo, pt-waitid, and pt-writev.
9361 * pt-creat.c: Removed.
9362 * pt-poll.c: Removed.
9363 * pt-pselect.c: Removed.
9364 * pt-readv.c: Removed.
9365 * pt-select.c: Removed.
9366 * pt-sigpause.c: Removed.
9367 * pt-sigsuspend.c: Removed.
9368 * pt-sigwaitinfo.c: Removed.
9369 * pt-waitid.c: Removed.
9370 * pt-writev.c: Removed.
9372 * init.c (pthread_functions): New variable.
9373 (__pthread_initialize_minimal): Pass pointer to pthread_functions
9374 (or NULL) to __libc_pthread_init.
9375 * forward.c: Rewrite to use __libc:pthread_functions array to get
9377 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9379 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9380 Take new parameter. Copy content of variable pointed to by it
9381 to __libc_pthread_init.
9383 * pthreadP.h (struct pthread_functions): New type.
9384 (__libc_pthread_init): Declare.
9386 * pthread_attr_destroy.c: Add namespace protected alias.
9387 * pthread_attr_getdetachstate.c: Likewise.
9388 * pthread_attr_getinheritsched.c: Likewise.
9389 * pthread_attr_getschedparam.c: Likewise.
9390 * pthread_attr_getschedpolicy.c: Likewise.
9391 * pthread_attr_getscope.c: Likewise.
9392 * pthread_attr_setdetachstate.c: Likewise.
9393 * pthread_attr_setinheritsched.c: Likewise.
9394 * pthread_attr_setschedparam.c: Likewise.
9395 * pthread_attr_setschedpolicy.c: Likewise.
9396 * pthread_attr_setscope.c: Likewise.
9397 * pthread_cond_broadcast.c: Likewise.
9398 * pthread_cond_destroy.c: Likewise.
9399 * pthread_cond_init.c: Likewise.
9400 * pthread_cond_signal.c: Likewise.
9401 * pthread_cond_wait.c: Likewise.
9402 * pthread_condattr_destroy.c: Likewise.
9403 * pthread_condattr_init.c: Likewise.
9404 * pthread_equal.c: Likewise.
9405 * pthread_exit.c: Likewise.
9406 * pthread_getschedparam.c: Likewise.
9407 * pthread_self.c: Likewise.
9408 * pthread_setcancelstate.c: Likewise.
9409 * pthread_setschedparam.c: Likewise.
9410 * pthread_mutex_destroy.c: Likewise.
9411 * pthread_mutex_init.c: Likewise.
9412 * pthreadP.h: Add prototypes for the aliases.
9414 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9415 multiple_threads member in correct TCB to 1.
9417 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9418 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
9419 member of thread decriptor, otherwise return unconditionally 1.
9421 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9423 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9424 regular Linux version. Remove file.
9425 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
9426 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
9427 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
9428 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
9429 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
9430 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
9431 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
9432 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
9433 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
9434 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
9435 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
9436 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
9437 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
9438 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
9439 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
9440 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
9441 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
9442 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
9443 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
9444 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
9445 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
9446 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
9447 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
9448 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
9449 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
9450 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
9451 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
9452 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
9453 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
9454 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
9456 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9458 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9459 * sysdeps/unix/sysv/linux/open.c: Removed.
9460 * sysdeps/unix/sysv/linux/fsync.c: Removed.
9461 * sysdeps/unix/sysv/linux/lseek.c: Removed.
9462 * sysdeps/unix/sysv/linux/msync.c: Removed.
9463 * sysdeps/unix/sysv/linux/read.c: Removed.
9464 * sysdeps/unix/sysv/linux/close.c: Removed.
9465 * sysdeps/unix/sysv/linux/creat.c: Removed.
9466 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9467 * sysdeps/unix/sysv/linux/pause.c: Removed.
9468 * sysdeps/unix/sysv/linux/select.c: Removed.
9469 * sysdeps/unix/sysv/linux/write.c: Removed.
9471 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9473 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9474 element in TCB to see whether locking is needed.
9476 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9477 MULTIPLE_THREADS_OFFSET value is correct.
9479 * sysdeps/unix/sysv/linux/close.c: New file.
9480 * sysdeps/unix/sysv/linux/connect.S: New file.
9481 * sysdeps/unix/sysv/linux/creat.c: New file.
9482 * sysdeps/unix/sysv/linux/fsync.c: New file.
9483 * sysdeps/unix/sysv/linux/llseek.c: New file.
9484 * sysdeps/unix/sysv/linux/lseek.c: New file.
9485 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9486 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9487 * sysdeps/unix/sysv/linux/msync.c: New file.
9488 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9489 * sysdeps/unix/sysv/linux/open.c: New file.
9490 * sysdeps/unix/sysv/linux/open64.c: New file.
9491 * sysdeps/unix/sysv/linux/pause.c: New file.
9492 * sysdeps/unix/sysv/linux/poll.c: New file.
9493 * sysdeps/unix/sysv/linux/pread.c: New file.
9494 * sysdeps/unix/sysv/linux/pread64.c: New file.
9495 * sysdeps/unix/sysv/linux/pselect.c: New file.
9496 * sysdeps/unix/sysv/linux/pwrite.c: New file.
9497 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9498 * sysdeps/unix/sysv/linux/readv.c: New file.
9499 * sysdeps/unix/sysv/linux/recv.S: New file.
9500 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9501 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9502 * sysdeps/unix/sysv/linux/select.c: New file.
9503 * sysdeps/unix/sysv/linux/send.S: New file.
9504 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9505 * sysdeps/unix/sysv/linux/sendto.S: New file.
9506 * sysdeps/unix/sysv/linux/sigpause.c: New file.
9507 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9508 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9509 * sysdeps/unix/sysv/linux/sigwait.c: New file.
9510 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9511 * sysdeps/unix/sysv/linux/system.c: New file.
9512 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9513 * sysdeps/unix/sysv/linux/wait.c: New file.
9514 * sysdeps/unix/sysv/linux/waitid.c: New file.
9515 * sysdeps/unix/sysv/linux/waitpid.c: New file.
9516 * sysdeps/unix/sysv/linux/writev.c: New file.
9517 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9519 * pt-readv.c: Fix comment.
9521 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9523 * tst-cleanup1.c: Include stdlib.h.
9525 * tst-cancel5.c: New test.
9526 * Makefile (tests): Add tst-cancel5.
9527 (tst-cancel5): Link against libc.so libpthread.so in that order.
9529 2002-12-13 Ulrich Drepper <drepper@redhat.com>
9531 * forward.c (test_loaded): Prevent recursive calls.
9533 * Makefile (routines): Add libc-cancellation.
9534 * libc-cancellation.c: New file.
9535 * descr.h (struct pthread): Add multiple_threads field.
9536 * allocatestack.c (allocate_stack): Initialize multiple_header field of
9537 new thread descriptor to 1.
9538 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9539 Initialize multiple_thread field after successful thread creation.
9540 * cancellation.c (__do_cancel): Move to pthreadP.h.
9541 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9542 (__pthread_disable_asynccancel): Add internal_function attribute.
9543 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9544 * pthread_setcancelstate.c: Likewise.
9545 * pthread_setcanceltype.c: Likewise.
9546 * pthread_exit.c: Likewise.
9547 * pthreadP.h (CANCELLATION_P): Likewise.
9548 (__do_cancel): Define as static inline.
9549 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9550 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9552 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9553 fields. Define MULTIPLE_THREADS_OFFSET.
9554 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9556 * sysdeps/unix/sysv/linux/accept.S: New file.
9557 * sysdeps/unix/sysv/linux/read.c: New file.
9558 * sysdeps/unix/sysv/linux/write.c: New file.
9559 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9560 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9561 initialization of __libc_locking_needed.
9562 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9563 __libc_locking_needed, use multiple_threads field in TCB.
9564 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9566 2002-12-12 Ulrich Drepper <drepper@redhat.com>
9568 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9570 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9572 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9573 access to __libc_locking_needed for PIC.
9575 2002-12-12 Jakub Jelinek <jakub@redhat.com>
9577 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9578 declare for libc.so.
9579 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9581 (__libc_lock_lock): Put into statement expression.
9582 (__libc_lock_unlock): Remove trailing semicolon.
9583 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9585 2002-12-12 Roland McGrath <roland@redhat.com>
9587 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9588 "m" constraint to refer to __libc_locking_needed. Declare it here.
9590 2002-12-12 Ulrich Drepper <drepper@redhat.com>
9592 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9593 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9594 Initialize __libc_locking_needed.
9595 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9596 instead of __register_pthread_fork_handler.
9597 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9598 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9599 fork-gen with libc_pthread_init.
9600 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9601 of __register_pthread_fork_handler.
9602 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9603 of __register_pthread_fork_handler.
9604 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9605 __libc_locking_needed to determine whether lock prefix can be avoided.
9606 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9608 2002-12-11 Ulrich Drepper <drepper@redhat.com>
9610 * Makefile (tests): Add tst-cleanup1.
9611 * tst-cleanup1.c: New file.
9612 * cancellation.c (__cleanup_thread): Removed.
9613 (__do_cancel): Remove call to __cleanup_thread.
9614 * pthreadP.h: Remove __cleanup_thread prorotype.
9616 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9617 Remember function and argument even if cancellation handler
9618 function is not available.
9619 (__libc_cleanup_region_end): Execute registered function directly if
9620 pthread functions are not available.
9621 (__libc_cleanup_end): Likewise.
9623 * init.c (__pthread_initialize_minimal): Fix initialization in
9624 static lib by preventing gcc from being too clever.
9626 2002-12-10 Ulrich Drepper <drepper@redhat.com>
9628 * init.c (__pthread_initialize_minimal): Remove unneccesary
9631 * Makefile (tests): We can run tst-locale2 now.
9633 2002-12-09 Ulrich Drepper <drepper@redhat.com>
9635 * Versions: Remove duplicated sigwait entry.
9637 2002-12-08 Ulrich Drepper <drepper@redhat.com>
9639 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9642 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9644 * pthreadP.h: Declare __pthread_enable_asynccancel and
9645 __pthread_disable_asynccancel.
9646 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9647 (CANCEL_RESET): Use __pthread_disable_asynccancel.
9648 * cancellation.c (__pthread_enable_asynccancel): New function.
9649 (__pthread_disable_asynccancel): New function.
9650 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9651 * pt-close.c: Likewise.
9652 * pt-connect.c: Likewise.
9653 * pt-creat.c: Likewise.
9654 * pt-fcntl.c: Likewise.
9655 * pt-fsync.c: Likewise.
9656 * pt-lseek.c: Likewise.
9657 * pt-lseek64.c: Likewise.
9658 * pt-msgrcv.c: Likewise.
9659 * pt-msgsnd.c: Likewise.
9660 * pt-msync.c: Likewise.
9661 * pt-nanosleep.c: Likewise.
9662 * pt-open.c: Likewise.
9663 * pt-open64.c: Likewise.
9664 * pt-pause.c: Likewise.
9665 * pt-poll.c: Likewise.
9666 * pt-pread.c: Likewise.
9667 * pt-pread64.c: Likewise.
9668 * pt-pselect.c: Likewise.
9669 * pt-pwrite.c: Likewise.
9670 * pt-pwrite64.c: Likewise.
9671 * pt-read.c: Likewise.
9672 * pt-readv.c: Likewise.
9673 * pt-recv.c: Likewise.
9674 * pt-recvfrom.c: Likewise.
9675 * pt-recvmsg.c: Likewise.
9676 * pt-select.c: Likewise.
9677 * pt-send.c: Likewise.
9678 * pt-sendmsg.c: Likewise.
9679 * pt-sendto.c: Likewise.
9680 * pt-sigpause.c: Likewise.
9681 * pt-sigsuspend.c: Likewise.
9682 * pt-sigtimedwait.c: Likewise.
9683 * pt-sigwait.c: Likewise.
9684 * pt-sigwaitinfo.c: Likewise.
9685 * pt-system.c: Likewise.
9686 * pt-tcdrain.c: Likewise.
9687 * pt-wait.c: Likewise.
9688 * pt-waitid.c: Likewise.
9689 * pt-waitpid.c: Likewise.
9690 * pt-write.c: Likewise.
9691 * pt-writev.c: Likewise.
9692 * pthread_join.c: Likewise.
9693 * pthread_timedjoin.c: Likewise.
9695 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9696 (__xpg_sigpause): New function.
9697 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9699 2002-12-07 Ulrich Drepper <drepper@redhat.com>
9701 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9703 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9704 _GI_pthread_cleanup_pop to pthreadP.h.
9706 * ftrylockfile.c: Use _IO_lock_trylock instead of
9707 pthread_mutex_trylock.
9709 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9710 (CANCEL_RESET): Likewise.
9711 (__pthread_setcanceltype_): Declare.
9712 (__pthread_mutex_lock_internal): Declare.
9713 (__pthread_mutex_unlock_internal): Declare.
9714 (__pthread_once_internal): Declare.
9715 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9716 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9718 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9719 and pthread_mutex_unlock.
9720 * pthread_cond_wait.c: Likewise.
9721 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9722 * pthread_mutex_unlock.c: Likewise.
9724 * pthread_setcanceltype.c: Add additional alias
9725 __pthread_setcanceltype.
9727 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9728 * sem_open.c (sem_open): Likewise.
9729 Use __libc_open, __libc_write, and __libc_close instead of
9730 open, write, and close respectively.
9732 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9733 Rewrite as statement expression since it must return a value.
9735 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9736 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9739 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9740 alias __pthread_once_internal.
9742 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9744 2002-12-06 Ulrich Drepper <drepper@redhat.com>
9746 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9747 * tst-stdio1.c: New file.
9748 * tst-stdio2.c: New file.
9750 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9752 * Makefile (tests): Comment out tst-locale2 for now.
9753 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9755 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9757 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9758 Use _IO_lock_init instead of explicit assignment.
9760 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9761 Define __libc_lock_* and __libc_lock_recursive macros with
9762 lowlevellock macros, not pthread mutexes.
9764 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
9765 of pthread_mutex_lock.
9766 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
9767 instead of pthread_mutex_unlock.
9769 2002-12-06 Roland McGrath <roland@redhat.com>
9771 * allocatestack.c (__stack_user): Use uninitialized defn.
9772 * init.c (__pthread_initialize_minimal): Initialize it here.
9774 2002-12-05 Roland McGrath <roland@redhat.com>
9776 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9778 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9780 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9783 2002-12-05 Ulrich Drepper <drepper@redhat.com>
9785 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9787 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9788 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
9789 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
9790 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
9791 for __libc_lock_* macros.
9792 * Makefile (routines): Add libc-lowlevellock.
9794 2002-10-09 Roland McGrath <roland@redhat.com>
9796 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
9797 Under [__PIC__], call the function via the pointer fetched for
9798 comparison rather than a call by name that uses the PLT.
9799 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
9800 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
9801 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
9802 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
9803 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
9805 2002-12-04 Roland McGrath <roland@redhat.com>
9807 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
9809 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
9810 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
9812 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
9814 2002-12-04 Ulrich Drepper <drepper@redhat.com>
9816 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
9817 a completely opaque, non-integer type.
9818 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9820 2002-12-05 Jakub Jelinek <jakub@redhat.com>
9822 * sysdeps/i386/tls.h: Include stdlib.h.
9823 * sysdeps/x86_64/tls.h: Likewise.
9825 2002-12-04 Ulrich Drepper <drepper@redhat.com>
9827 * Makefile (tests): Add tst-locale2.
9828 (tests-static): Likewise.
9829 * tst-locale2.c: New file.
9831 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
9832 volatile and add memory clobbers to lock operations.
9834 2002-12-03 Ulrich Drepper <drepper@redhat.com>
9836 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
9837 * sysdeps/i386/i486/bits/atomic.h: New file.
9838 * sysdeps/i386/i586/bits/atomic.h: New file.
9839 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
9840 include i486 version.
9841 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
9842 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
9843 Patch by Marijn Ros <marijn@mad.scientist.com>.
9845 * allocatestack.c (get_cached_stack): Don't crash if we first
9846 found a stack with a larger size then needed.
9847 Reported by Hui Huang <hui.huang@sun.com>.
9849 * Makefile (tests): Add tst-sysconf.
9850 * tst-sysconf.c: New file.
9852 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
9853 PTHREAD_THREADS_MAX.
9855 2002-12-02 Roland McGrath <roland@redhat.com>
9857 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
9858 Declare using hidden_proto instead of attribute_hidden, so there are
9859 non-.hidden static symbols for gdb to find.
9860 (__pthread_keys): Likewise.
9861 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
9862 * allocatestack.c (__stack_user): Likewise.
9863 * pthread_create.c (__pthread_keys): Likewise.
9864 (__nptl_threads_events, __nptl_last_event): Make these static instead
9866 * pthread_key_create.c (__pthread_pthread_keys_max,
9867 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
9869 2002-12-02 Ulrich Drepper <drepper@redhat.com>
9871 * Makefile (tests): Add tst-locale1. If buid-static is yes link
9873 * tst-locale1.c: New file.
9875 * pthread_cond_timedwait.c: Include <stdlib.h>.
9877 * Makefile (tests): Add tst-fork2 and tst-fork3.
9878 * tst-fork2.c: New file.
9879 * tst-fork3.c: New file.
9881 2002-11-28 Ulrich Drepper <drepper@redhat.com>
9883 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
9885 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
9886 require it to 200112L.
9888 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
9889 instruction only if HAVE_CMOV is defined.
9890 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
9892 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
9894 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
9896 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
9898 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
9900 2002-11-27 Ulrich Drepper <drepper@redhat.com>
9902 * sysdeps/x86_64/bits/atomic.h: New file.
9904 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
9907 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
9908 possible since gettid cannot fail.
9910 * sysdeps/x86_64/pthreaddef.h: New file.
9912 * sysdeps/i386/pthreaddef.h (gettid): Removed.
9914 * sysdeps/x86_64/pthread_spin_init.c: New file.
9915 * sysdeps/x86_64/pthread_spin_lock.c: New file.
9916 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
9917 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
9919 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
9920 Add missing lock prefix. Minute optimization.
9922 * tst-spin2.c (main): Also check successful trylock call.
9924 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
9925 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
9927 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
9928 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
9930 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
9931 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
9932 value in case of an error. Add support for INTERNAL_SYSCALL.
9934 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
9935 value in case of an error.
9937 * sysdeps/x86_64/tls.h: New file.
9939 2002-11-26 Ulrich Drepper <drepper@redhat.com>
9941 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
9942 takes the array member name and the index as parameters.
9943 (THREAD_SETMEM_NC): Likewise.
9944 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
9945 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
9948 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
9949 to decide which code to use.
9950 (THREAD_SETMEM_NC): Likewise.
9952 * allocatestack.c (queue_stack): Don't remove stack from list here.
9953 Do it in the caller. Correct condition to prematurely terminate
9954 loop to free stacks.
9955 (__deallocate_stack): Remove stack from list here.
9957 2002-11-26 Ulrich Drepper <drepper@redhat.com>
9959 * Makefile (tests): Add tst-stack1.
9960 * tst-stack1.c: New file.
9962 * allocatestack.c (allocate_stack): Initialize the TCB on a user
9965 * pthread_attr_getstack.c: Return bottom of the thread area.
9967 2002-11-25 Ulrich Drepper <drepper@redhat.com>
9969 * Makefile (libpthread-routines): Add pt-allocrtsig and
9970 pthread_kill_other_threads.
9971 * pt-allocrtsig.c: New file.
9972 * pthread_kill_other_threads.c: New file.
9973 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
9974 all three functions.
9975 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9977 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
9978 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
9979 and __libc_allocate_rtsig_private.
9980 * Versions (libpthread): Export pthread_kill_other_threads_np,
9981 __libc_current_sigrtmin, and __libc_current_sigrtmax.
9983 2002-11-24 Ulrich Drepper <drepper@redhat.com>
9985 * allocatestack.c (allocate_stack): stackaddr in attribute points to
9986 the end of the stack. Adjust computations.
9987 When mprotect call fails dequeue stack and free it.
9988 * pthread_attr_setstack.c: Store top of the stack in stackaddr
9990 * pthread_getattr_np.c: Likewise.
9992 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
9995 2002-11-23 Ulrich Drepper <drepper@redhat.com>
9997 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
9998 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10000 2002-11-22 Ulrich Drepper <drepper@redhat.com>
10002 * pthread_getspecific.c: Optimize access to first 2nd-level array.
10003 * pthread_setspecific.c: Likewise.
10005 2002-11-21 Ulrich Drepper <drepper@redhat.com>
10007 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10008 definitions. Get them from the official place.
10009 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10011 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10012 Use new CLONE_ flags in clone() calls.
10014 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10015 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10017 * Versions: Add pthread_* functions for libc.
10018 * forward.c: New file.
10020 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10022 * herrno.c: New file.
10025 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10026 sem_trywait, and sem_timedwait. Add herrno and res.
10027 * sem_init.c: Don't initialize lock and waiters members.
10028 * sem_open.c: Likewise.
10029 * sem_post.c: Removed.
10030 * sem_wait.c: Removed.
10031 * sem_trywait.c: Removed.
10032 * sem_timedwait.c: Removed.
10033 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10034 Includes full implementations of sem_post, sem_wait, sem_trywait,
10036 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10037 for new implementation.
10038 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10039 and waiters fields.
10041 * tst-sem3.c: Improve error message.
10042 * tst-signal3.c: Likewise.
10044 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10045 to tell the kernel about the termination futex and to initialize tid
10046 member. Don't initialize main_thread.
10047 * descr.h (struct pthread): Remove main_thread member.
10048 * cancelllation.c (__do_cancel): Remove code handling main thread.
10049 The main thread is not special anymore.
10051 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
10052 size of the stacks to stack_cache_actsize.
10054 * pt-readv.c: Add missing "defined".
10055 * pt-sigwait.c: Likewise.
10056 * pt-writev.c: Likewise.
10058 2002-11-09 Ulrich Drepper <drepper@redhat.com>
10060 * Versions: Export __connect from libpthread.
10061 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10063 * Makefile (libpthread-routines): Add pt-raise.
10064 * sysdeps/unix/sysv/linux/raise.c: New file.
10065 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10066 * sysdeps/generic/pt-raise.c: New file.
10068 * pthread_cond_init.c: Initialize all data elements of the condvar
10069 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10071 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10072 * pthread_create.c: Likewise.
10074 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10075 * tst-key1.c: New file.
10076 * tst-key2.c: New file.
10077 * tst-key3.c: New file.
10079 * Versions: Export pthread_detach for version GLIBC_2.0.
10080 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10082 2002-11-08 Ulrich Drepper <drepper@redhat.com>
10084 * pthread_key_create.c: Terminate search after an unused key was found.
10085 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10087 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10088 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10090 2002-10-10 Ulrich Drepper <drepper@redhat.com>
10092 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10093 dynamic lookup for errno in PIC.
10095 * allocatestack.c (get_cached_stack): Rearrange code slightly to
10096 release the stack lock as soon as possible.
10097 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10098 the static TLS block.
10099 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10101 * cancellation.c: Renamed from cancelation.c.
10102 * Makefile: Adjust accordingly.
10103 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10104 * cleanup_defer.c: Use CANCELLATION_P.
10105 * pthread_testcancel.c: Likewise.
10106 * descr.h: Fix spelling in comments.
10107 * init.c: Likewise.
10108 * pthread_getattr_np.c: Likewise.
10109 * pthread_getschedparam.c: Likewise.
10110 * pthread_setschedparam.c: Likewise.
10111 * Versions: Likewise.
10113 * pt-pselect.c: New file.
10114 * Makefile (libpthread-routines): Add pt-pselect.
10115 * Versions: Add pselect.
10117 * tst-cancel4.c: New file.
10118 * Makefile (tests): Add tst-cancel4.
10120 2002-10-09 Ulrich Drepper <drepper@redhat.com>
10122 * pthread_mutex_lock.c: Always record lock ownership.
10123 * pthread_mutex_timedlock.c: Likewise.
10124 * pthread_mutex_trylock.c: Likewise.
10126 * pt-readv.c: New file.
10127 * pt-writev.c: New file.
10128 * pt-creat.c: New file.
10129 * pt-msgrcv.c: New file.
10130 * pt-msgsnd.c: New file.
10131 * pt-poll.c: New file.
10132 * pt-select.c: New file.
10133 * pt-sigpause.c: New file.
10134 * pt-sigsuspend.c: New file.
10135 * pt-sigwait.c: New file.
10136 * pt-sigwaitinfo.c: New file.
10137 * pt-waitid.c: New file.
10138 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10139 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10140 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10141 * Versions: Add all the new functions.
10143 * tst-exit1.c: New file.
10144 * Makefile (tests): Add tst-exit1.
10146 * sem_timedwait.c: Minor optimization for more optimal fastpath.
10148 2002-10-08 Ulrich Drepper <drepper@redhat.com>
10150 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10152 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10153 call. pthread_join is an official cancellation point.
10154 * pthread_timedjoin.c: Likewise.
10156 * pthread_cond_wait.c: Revert order in which internal lock are dropped
10157 and the condvar's mutex are retrieved.
10158 * pthread_cond_timedwait.c: Likewise.
10159 Reported by dice@saros.East.Sun.COM.
10161 2002-10-07 Ulrich Drepper <drepper@redhat.com>
10163 * pthreadP.h: Cut out all type definitions and move them...
10164 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
10165 * pthreadP.h: Include <internaltypes.h>.
10167 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10168 performance tweaks.
10170 * sem_trywait.c: Shuffle #includes around to get right order.
10171 * sem_timedwait.c: Likewise.
10172 * sem_post.c: Likewise.
10173 * sem_wait.c: Likewise.
10175 * nptl 0.3 released.
10177 * Makefile (tests): Add tst-signal3.
10178 * tst-signal3.c: New file.
10180 2002-10-05 Ulrich Drepper <drepper@redhat.com>
10182 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10183 the asms modify the sem object.
10184 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10186 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10187 the actual members.
10188 * pthreadP.h (struct sem): New type. Actual semaphore type.
10189 * semaphoreP.h: Include pthreadP.h.
10190 * sem_getvalue.c: Adjust to sem_t change.
10191 * sem_init.c: Likewise.
10192 * sem_open.c: Likewise.
10193 * sem_post.c: Likewise.
10194 * sem_timedwait.c: Likewise.
10195 * sem_trywait.c: Likewise.
10196 * sem_wait.c: Likewise.
10198 2002-10-04 Ulrich Drepper <drepper@redhat.com>
10200 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10201 * tst-basic2.c: New file.
10202 * tst-exec1.c: New file.
10203 * tst-exec2.c: New file.
10204 * tst-exec3.c: New file.
10206 * tst-fork1.c: Remove extra */.
10208 * nptl 0.2 released. The API for IA-32 is complete.