1 2008-01-10 Ulrich Drepper <drepper@redhat.com>
3 * pthread-errnos.sym: Add EOVERFLOW.
4 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
5 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
6 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9 2007-12-14 Ulrich Drepper <drepper@redhat.com>
11 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
12 parameter. Passed it as permission to mmap.
13 * allocatestack.c (allocate_stack): Pass prot as second parameter
16 2007-12-12 Ulrich Drepper <drepper@redhat.com>
18 * tst-basic7.c: Allocate memory for the stack.
21 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
22 (__pthread_cond_timedwait): Don't use VDSO.
23 Patch by Michal Januszewski.
25 2007-12-07 Ulrich Drepper <drepper@redhat.com>
28 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
29 Allow label before pthread_cleanup_pop.
30 (pthread_cleanup_pop_restore_np): Likewise.
32 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
34 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
35 Store 2 before returning ETIMEDOUT.
37 2007-11-23 Ulrich Drepper <drepper@redhat.com>
39 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
40 Store 2 before returning ETIMEDOUT.
41 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
42 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
43 (__lll_lock_wait_private): Optimize.
44 (__lll_lock_wait): Likewise.
46 2007-11-20 Jakub Jelinek <jakub@redhat.com>
48 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
49 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
50 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
52 2007-11-08 Ulrich Drepper <drepper@redhat.com>
55 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
56 If we time out, try one last time to lock the futex to avoid
57 losing a wakeup signal.
58 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
59 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
62 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
65 2007-11-07 Ulrich Drepper <drepper@redhat.com>
68 * allocatestack.c (allocate_stack): Change ENOMEM error in case
69 mmap failed to EAGAIN.
70 * Makefile (tests): Add tst-basic7.
71 * tst-basic7.c: New file.
73 2007-11-05 Ulrich Drepper <drepper@redhat.com>
75 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
78 2007-11-03 Mike Frysinger <vapier@gentoo.org>
80 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
81 missing line continuations.
82 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
83 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
85 2007-10-28 Ulrich Drepper <drepper@redhat.com>
88 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
89 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
90 (struct timer): Add next element.
91 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
92 enqueue timer structure into __active_timer_sigev_thread list.
93 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
94 remove timer struct from __active_timer_sigev_thread.
95 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
96 Before using timer structure make sure it is still on the
97 __active_timer_sigev_thread list. Keep lock until done.
98 Define __active_timer_sigev_thread and
99 __active_timer_sigev_thread_lock.
101 2007-10-27 Ulrich Drepper <drepper@redhat.com>
103 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
104 Redefine thread_atfork for use of ATFORK_MEM.
105 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
106 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
108 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
109 Use atomic operation when removing first element of list.
111 2007-10-17 Jakub Jelinek <jakub@redhat.com>
113 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
114 routine instead of an alias to __new_sem_post.
116 2007-10-15 Jakub Jelinek <jakub@redhat.com>
118 * init.c (__pthread_initialize_minimal): Initialize word to appease
121 2007-10-10 Jakub Jelinek <jakub@redhat.com>
123 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
124 libc.so just clear NAME.
125 (__libc_rwlock_fini): Nop inside of libc.so.
126 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
129 2007-09-02 Ulrich Drepper <drepper@redhat.com>
131 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
132 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
134 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
136 2007-08-21 Ulrich Drepper <drepper@redhat.com>
139 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
140 reclaimed stack if necessary.
141 * Makefile (tests): Add tst-tsd6.
142 * tst-tsd6.c: New file.
144 2007-08-21 Jakub Jelinek <jakub@redhat.com>
146 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
147 Add private argument.
149 2007-08-20 Ulrich Drepper <drepper@redhat.com>
151 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
152 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
154 2007-08-16 Jakub Jelinek <jakub@redhat.com>
156 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
157 (__lll_robust_timedlock): Pass private as last argument to
158 __lll_robust_timedlock_wait.
159 (__lll_unlock): Fix a pasto.
161 2007-08-15 Jakub Jelinek <jakub@redhat.com>
163 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
164 sparc_old_sem): New structs.
165 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
166 (__sem_wait_cleanup): New function.
167 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
168 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
169 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
171 (__old_sem_wait): New function.
172 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
173 nptl/sysdeps/unix/sysv/linux/sparc version.
174 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
176 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
177 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
178 (__new_sem_trywait): Use sparc_old_sem structure.
179 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
180 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
181 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
182 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
183 lll_futex_timed_wait.
184 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
185 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
186 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
188 (__old_sem_post): New function.
189 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
190 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
191 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
192 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
193 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
194 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
196 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
198 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
199 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
200 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
201 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
202 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
203 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
204 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
206 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
207 kernel-features.h and tcb-offsets.h.
208 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
209 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
211 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
213 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
214 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
216 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
217 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
218 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
219 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
220 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
221 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
222 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
224 2007-08-14 Jakub Jelinek <jakub@redhat.com>
226 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
227 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
228 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
229 lll_futex_timed_wait.
231 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
232 __lll_robust_unlock): Rewrite as macros instead of inline functions.
233 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
234 __lll_robust_unlock, __lll_wait_tid): Likewise.
236 2007-08-13 Jakub Jelinek <jakub@redhat.com>
238 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
240 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
241 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
242 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
243 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
244 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
245 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
246 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
247 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
249 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
250 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
251 process private. Switch DW_CFA_advance_loc1 and some
252 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
253 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
254 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
255 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
256 process private. Switch DW_CFA_advance_loc{1,2} and some
257 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
258 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
259 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
260 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
262 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
263 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
264 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
266 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
267 (__pthread_cond_broadcast): Compare %r8 instead of
268 dep_mutex-cond_*(%rdi) with $-1.
269 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
270 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
273 2007-08-13 Ulrich Drepper <drepper@redhat.com>
275 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
277 2007-08-13 Jakub Jelinek <jakub@redhat.com>
279 * allocatestack.c: Include kernel-features.h.
280 * pthread_create.c: Likewise.
281 * pthread_mutex_init.c: Likewise.
283 * pthread_cond_timedwait.c: Likewise.
284 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
285 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
286 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
287 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
288 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
289 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
290 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
292 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
294 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
295 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
296 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
297 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
299 2007-08-12 Jakub Jelinek <jakub@redhat.com>
301 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
302 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
303 byte elements. One of them is the new __shared element.
304 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
305 adjust names of other padding elements.
306 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
307 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
308 byte elements. One of them is the new __shared element.
309 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
310 adjust names of other padding elements.
311 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
312 Renamed __pad1 element to __shared, adjust names of other padding
314 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
315 (pthread_rwlock_t): Likewise.
316 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
319 2007-08-09 Anton Blanchard <anton@samba.org>
321 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
323 2007-08-12 Ulrich Drepper <drepper@redhat.com>
325 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
327 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
329 2007-08-11 Ulrich Drepper <drepper@redhat.com>
331 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
332 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
333 dealing with robust mutexes.
334 * pthread_mutex_timedlock.c: Likewise.
335 * pthread_mutex_trylock.c: Likewise.
336 * pthread_mutex_unlock.c: Likewise.
337 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
339 2007-08-06 Jakub Jelinek <jakub@redhat.com>
341 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
342 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
343 (PTHREAD_MUTEX_PSHARED): Define.
344 * pthread_mutex_init.c (__pthread_mutex_init): Set
345 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
347 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
348 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
349 as second argument to lll_lock.
350 (LLL_MUTEX_TRYLOCK): Take mutex as argument
351 instead of its __data.__lock field.
352 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
353 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
355 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
356 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
357 instead of mutex->__data.__kind directly, pass
358 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
359 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
360 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
361 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
362 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
363 to lll_timedlock, lll_robust_timedlock, lll_unlock and
364 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
365 of mutex->__data.__kind directly.
366 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
367 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
368 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
369 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
370 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
371 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
373 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
374 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
375 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
377 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
378 Take mutex as argument instead of its __data.__lock field, pass
379 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
380 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
382 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
383 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
384 to lll_robust_cond_lock.
385 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
386 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
387 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
388 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
389 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
390 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
392 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
393 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
395 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
396 pshared variable, pass it to lll_lock, lll_unlock,
397 lll_futex_timedwait and lll_futex_wake.
398 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
399 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
401 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
402 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
404 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
405 lll_futex_wake_unlock): Likewise.
406 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
408 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
409 lll_futex_wake_unlock): Likewise.
410 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
412 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
413 lll_futex_wake_unlock): Likewise.
414 (lll_futex_wake): Fix a typo.
415 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
416 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
417 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
418 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
419 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
420 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
421 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
422 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
423 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
424 (__pthread_cond_timedwait): Likewise.
425 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
426 (__condvar_cleanup, __pthread_cond_wait): Likewise.
428 2007-08-05 Jakub Jelinek <jakub@redhat.com>
430 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
431 Don't use CGOTSETUP and CGOTRESTORE macros.
432 (CGOTSETUP, CGOTRESTORE): Remove.
433 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
436 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
438 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
439 definitions for private futexes.
440 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
441 kernel-features.h and lowlevellock.h. Use private futexes if
443 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
444 (__lll_mutex_lock_wait): Rename to
445 (__lll_lock_wait): ... this. Don't compile in for libc.so.
446 (__lll_mutex_timedlock_wait): Rename to ...
447 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
448 Don't compile in for libc.so.
449 (__lll_mutex_unlock_wake): Rename to ...
450 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
451 (__lll_timedwait_tid): Use __NR_gettimeofday.
452 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
453 the header from assembler. Renamed all lll_mutex_* resp.
454 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
455 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
456 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
458 (__lll_lock_wait_private): Add prototype.
459 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
460 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
461 __lll_unlock_wake): Likewise.
462 (lll_lock): Add private argument. Call __lll_lock_wait_private
463 if private is constant LLL_PRIVATE.
464 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
465 lll_timedlock, lll_robust_timedlock): Add private argument.
466 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
467 if private is constant LLL_PRIVATE.
468 (lll_robust_unlock, lll_robust_dead): Add private argument.
469 (lll_lock_t): Remove.
470 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
471 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
472 lll_cond_wake, lll_cond_broadcast): Remove.
473 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
474 kernel-features.h and lowlevellock.h.
475 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
476 (LOAD_FUTEX_WAIT): Define.
477 (__lll_robust_mutex_lock_wait): Rename to ...
478 (__lll_robust_lock_wait): ... this. Add private argument.
479 Use LOAD_FUTEX_WAIT macro.
480 (__lll_robust_mutex_timedlock_wait): Rename to ...
481 (__lll_robust_timedlock_wait): ... this. Add private argument.
482 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
483 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
485 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
486 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
487 __lll_mutex_{lock,unlock}_*.
488 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
489 lowlevellock.h and pthread-errnos.h.
490 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
491 FUTEX_CMP_REQUEUE, EINVAL): Remove.
492 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
493 __lll_mutex_{lock,unlock}_*.
494 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
495 lowlevellock.h and pthread-errnos.h.
496 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
497 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
498 __lll_mutex_{lock,unlock}_*.
499 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
501 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
502 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
503 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
504 (__condvar_tw_cleanup): Likewise.
505 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
507 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
508 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
509 __lll_mutex_{lock,unlock}_*.
510 ( __condvar_w_cleanup): Likewise.
511 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
512 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
513 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
515 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
516 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
517 __lll_mutex_{lock,unlock}_*.
518 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
520 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
521 FUTEX_PRIVATE_FLAG): Remove.
522 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
523 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
524 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
526 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
527 FUTEX_PRIVATE_FLAG): Remove.
528 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
529 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
530 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
532 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
533 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
534 __lll_mutex_{lock,unlock}_*.
535 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
537 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
538 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
539 __lll_mutex_{lock,unlock}_*.
540 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
541 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
542 (__new_sem_post): Use standard initial exec code sequences.
543 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
545 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
546 FUTEX_PRIVATE_FLAG): Remove.
547 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
549 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
550 (__new_sem_trywait): Use standard initial exec code sequences.
551 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
552 (__new_sem_wait): Use standard initial exec code sequences.
554 2007-07-31 Anton Blanchard <anton@samba.org>
556 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
557 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
560 2007-07-31 Jakub Jelinek <jakub@redhat.com>
562 * allocatestack.c (stack_cache_lock): Change type to int.
563 (get_cached_stack, allocate_stack, __deallocate_stack,
564 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
565 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
566 as second argument to lll_lock and lll_unlock macros on
568 * pthread_create.c (__find_in_stack_list): Likewise.
569 (start_thread): Similarly with pd->lock. Use lll_robust_dead
570 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
572 * descr.h (struct pthread): Change lock and setxid_futex field
574 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
575 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
576 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
577 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
579 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
580 * pthread_cond_init.c (__pthread_cond_init): Likewise.
581 * pthreadP.h (__attr_list_lock): Change type to int.
582 * pthread_attr_init.c (__attr_list_lock): Likewise.
583 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
584 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
586 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
587 also for lll_futex_{wake,wait}.
588 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
590 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
591 LLL_SHARED as second argument to lll_{,un}lock.
592 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
593 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
594 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
595 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
597 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
598 as second argument to lll_{,un}lock macros on pd->lock.
599 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
600 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
601 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
602 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
604 * sysdeps/pthread/createthread.c (do_clone, create_thread):
606 * pthread_once.c (once_lock): Change type to int.
607 (__pthread_once): Pass LLL_PRIVATE as second argument to
608 lll_{,un}lock macros on once_lock.
609 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
610 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
611 rwlock->__data.__shared as second argument to them and similarly
613 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
615 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
617 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
618 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
619 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
620 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
621 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
622 to lll_{,un}lock macros on __sem_mappings_lock.
623 * sem_open.c (check_add_mapping): Likewise.
624 (__sem_mappings_lock): Change type to int.
625 * semaphoreP.h (__sem_mappings_lock): Likewise.
626 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
627 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
628 instead of lll_*mutex_*, pass LLL_SHARED as last
630 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
631 pass LLL_SHARED as last argument.
632 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
633 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
634 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
635 pass LLL_SHARED as last argument.
636 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
637 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
638 LLL_SHARED as last argument.
639 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
640 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
642 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
643 __libc_lock_lock_recursive, __libc_lock_unlock,
644 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
645 argument to lll_{,un}lock.
646 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
647 _IO_lock_unlock): Likewise.
648 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
650 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
651 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
653 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
655 (__fork_lock): Change type to int.
656 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
657 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
658 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
660 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
661 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
662 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
664 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
665 pass it through to lll_futex_*wait, only compile in when
667 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
668 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
669 argument and pass it through to lll_futex_*wait.
670 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
671 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
672 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
673 inline functions to __lll_* resp. __lll_robust_*.
674 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
675 (lll_mutex_dead): Add private argument.
676 (__lll_lock_wait_private): New prototype.
677 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
678 __lll_robust_lock_timedwait): Add private argument to prototypes.
679 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
680 call __lll_lock_wait_private, otherwise pass private to
682 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
683 __lll_robust_timedlock): Add private argument, pass it to
684 __lll_*wait functions.
685 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
686 call __lll_unlock_wake_private, otherwise pass private to
688 (__lll_robust_unlock): Add private argument, pass it to
689 __lll_robust_unlock_wake.
690 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
691 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
692 argument, pass it through to __lll_* inline function.
693 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
694 (lll_lock_t): Remove.
695 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
696 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
697 lll_cond_wake, lll_cond_broadcast): Remove.
698 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
699 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
700 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
701 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
702 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
703 the header from assembler. Renamed all lll_mutex_* resp.
704 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
705 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
706 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
707 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
708 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
709 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
710 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
712 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
713 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
714 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
715 (lll_trylock): Likewise, use __lll_trylock_asm, pass
716 MULTIPLE_THREADS_OFFSET as another asm operand.
717 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
718 MULTIPLE_THREADS_OFFSET as last asm operand, call
719 __lll_lock_wait_private if private is constant LLL_PRIVATE,
720 otherwise pass private as another argument to __lll_lock_wait.
721 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
722 lll_timedlock, lll_robust_timedlock): Add private argument, pass
723 private as another argument to __lll_*lock_wait call.
724 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
725 MULTIPLE_THREADS_OFFSET as another asm operand, call
726 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
727 otherwise pass private as another argument to __lll_unlock_wake.
728 (lll_robust_unlock): Add private argument, pass private as another
729 argument to __lll_unlock_wake.
730 (lll_robust_dead): Add private argument, use __lll_private_flag
732 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
733 LLL_MUTEX_LOCK_INITIALIZER.
734 (lll_lock_t): Remove.
735 (LLL_LOCK_INITIALIZER_WAITERS): Define.
736 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
737 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
738 lll_cond_wake, lll_cond_broadcast): Remove.
739 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
740 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
741 2007-05-2{3,9} changes.
742 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
743 kernel-features.h and lowlevellock.h.
744 (LOAD_PRIVATE_FUTEX_WAIT): Define.
745 (LOAD_FUTEX_WAIT): Rewritten.
746 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
748 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
749 (__lll_mutex_lock_wait): Rename to ...
750 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
751 %ecx, %ecx is now private argument. Don't compile in for libc.so.
752 (__lll_mutex_timedlock_wait): Rename to ...
753 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
754 contains private argument. Don't compile in for libc.so.
755 (__lll_mutex_unlock_wake): Rename to ...
756 (__lll_unlock_wake): ... this. %ecx contains private argument.
757 Don't compile in for libc.so.
758 (__lll_timedwait_tid): Use __NR_gettimeofday.
759 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
760 kernel-features.h and lowlevellock.h.
761 (LOAD_FUTEX_WAIT): Define.
762 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
764 (__lll_robust_mutex_lock_wait): Rename to ...
765 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
766 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
768 (__lll_robust_mutex_timedlock_wait): Rename to ...
769 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
770 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
771 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
773 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
774 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
775 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
776 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
777 to __lll_lock_wait in %edx.
778 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
779 Include lowlevellock.h and pthread-errnos.h.
780 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
781 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
782 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
783 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
784 pass LLL_SHARED in %ecx to both __lll_lock_wait and
786 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
787 Include lowlevellock.h and pthread-errnos.h.
788 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
789 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
790 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
791 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
792 pass LLL_SHARED in %ecx to both __lll_lock_wait and
794 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
795 Include lowlevellock.h.
796 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
798 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
799 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
800 pass LLL_SHARED in %ecx to both __lll_lock_wait and
801 __lll_unlock_wake. Use __NR_gettimeofday.
802 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
803 Include lowlevellock.h.
804 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
805 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
806 to __lll_*, pass cond_lock address in %edx rather than %ecx to
807 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
808 and __lll_unlock_wake.
809 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
810 Include lowlevellock.h.
811 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
812 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
813 MUTEX(%ebx) address in %edx rather than %ecx to
814 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
815 and __lll_unlock_wake. Move return value from %ecx to %edx
817 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
818 Include lowlevellock.h.
819 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
821 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
822 MUTEX(%ebp) address in %edx rather than %ecx to
823 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
824 and __lll_unlock_wake. Move return value from %ecx to %edx
825 register. Use __NR_gettimeofday.
826 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
827 Include lowlevellock.h.
828 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
830 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
831 MUTEX(%ebp) address in %edx rather than %ecx to
832 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
833 and __lll_unlock_wake. Move return value from %ecx to %edx
834 register. Use __NR_gettimeofday.
835 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
836 Include lowlevellock.h.
837 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
838 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
839 MUTEX(%edi) address in %edx rather than %ecx to
840 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
841 and __lll_unlock_wake.
842 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
843 Include lowlevellock.h.
844 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
845 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
846 MUTEX(%ebx) address in %edx rather than %ecx to
847 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
848 and __lll_unlock_wake. Move return value from %ecx to %edx
850 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
852 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
854 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
855 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
856 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
858 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
859 (sem_timedwait): Use __NR_gettimeofday.
860 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
862 (LOCK): Don't define.
863 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
865 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
866 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
868 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
869 2007-05-2{3,9} changes.
870 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
871 kernel-features.h and lowlevellock.h.
872 (LOAD_PRIVATE_FUTEX_WAIT): Define.
873 (LOAD_FUTEX_WAIT): Rewritten.
874 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
875 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
876 (__lll_mutex_lock_wait): Rename to ...
877 (__lll_lock_wait): ... this. %esi is now private argument.
878 Don't compile in for libc.so.
879 (__lll_mutex_timedlock_wait): Rename to ...
880 (__lll_timedlock_wait): ... this. %esi contains private argument.
881 Don't compile in for libc.so.
882 (__lll_mutex_unlock_wake): Rename to ...
883 (__lll_unlock_wake): ... this. %esi contains private argument.
884 Don't compile in for libc.so.
885 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
886 kernel-features.h and lowlevellock.h.
887 (LOAD_FUTEX_WAIT): Define.
888 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
889 (__lll_robust_mutex_lock_wait): Rename to ...
890 (__lll_robust_lock_wait): ... this. %esi argument contains private.
891 Use LOAD_FUTEX_WAIT macro.
892 (__lll_robust_mutex_timedlock_wait): Rename to ...
893 (__lll_robust_timedlock_wait): ... this. %esi argument contains
894 private, use LOAD_FUTEX_WAIT macro.
895 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
897 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
898 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
899 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
900 __lll_lock_wait and __lll_unlock_wake.
901 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
902 Include lowlevellock.h and pthread-errnos.h.
903 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
904 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
905 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
906 pass LLL_SHARED in %esi to both __lll_lock_wait and
908 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
909 Include lowlevellock.h and pthread-errnos.h.
910 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
911 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
912 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
913 pass LLL_SHARED in %esi to both __lll_lock_wait and
915 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
916 Include lowlevellock.h.
917 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
918 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
919 pass LLL_SHARED in %esi to both __lll_lock_wait and
921 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
922 Include lowlevellock.h.
923 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
924 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
925 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
926 and __lll_unlock_wake.
927 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
928 Include lowlevellock.h.
929 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
931 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
932 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
933 and __lll_unlock_wake.
934 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
935 Include lowlevellock.h.
936 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
938 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
939 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
940 and __lll_unlock_wake.
941 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
942 Include lowlevellock.h.
943 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
945 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
946 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
947 and __lll_unlock_wake.
948 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
949 Include lowlevellock.h.
950 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
952 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
953 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
954 and __lll_unlock_wake.
955 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
956 Include lowlevellock.h.
957 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
959 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
960 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
961 and __lll_unlock_wake.
962 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
964 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
966 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
967 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
968 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
970 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
971 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
973 (LOCK): Don't define.
974 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
976 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
977 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
978 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
979 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
980 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
981 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
982 (__lll_lock_wait_private): New function.
983 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
984 it to lll_futex_*wait. Don't compile in for libc.so.
985 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
987 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
988 (struct sparc_pthread_barrier): Remove.
989 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
990 struct sparc_pthread_barrier. Pass
991 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
992 and lll_futex_wait macros.
993 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
995 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
996 Include sparc pthread_barrier_wait.c instead of generic one.
998 2007-07-30 Jakub Jelinek <jakub@redhat.com>
1000 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1002 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1003 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1005 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1006 (pthread_rwlock_timedwrlock): Likewise.
1007 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1008 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1010 2007-07-31 Jakub Jelinek <jakub@redhat.com>
1012 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1014 2007-07-26 Jakub Jelinek <jakub@redhat.com>
1016 * tst-locale2.c (useless): Add return statement.
1018 2007-07-24 Jakub Jelinek <jakub@redhat.com>
1020 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1021 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1022 * pthread_create.c (start_thread): Likewise.
1023 * init.c (sighandler_setxid): Likewise.
1024 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1025 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1026 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1027 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1028 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1029 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1030 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1031 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1032 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1034 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1036 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1038 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1039 __rtld_notify): Likewise.
1040 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1041 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1042 __pthread_once): Likewise.
1043 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1044 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1045 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1046 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1047 (lll_futex_wait): Add private argument, define as wrapper around
1048 lll_futex_timed_wait.
1049 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1050 use __lll_private_flag macro.
1051 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1052 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1053 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1054 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1055 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1056 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1057 (lll_futex_wait): Add private argument, define as wrapper around
1058 lll_futex_timed_wait.
1059 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1060 use __lll_private_flag macro.
1061 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1062 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1063 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1065 (lll_futex_timed_wait, lll_futex_wake): Use it.
1066 (lll_private_futex_wait, lll_private_futex_timed_wait,
1067 lll_private_futex_wake): Removed.
1068 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1069 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1070 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1071 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1072 (lll_futex_wait): Add private argument, define as wrapper around
1073 lll_futex_timed_wait.
1074 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1075 use __lll_private_flag macro.
1076 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1077 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1079 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1080 (lll_private_futex_wait, lll_private_futex_timed_wait,
1081 lll_private_futex_wake): Removed.
1082 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1083 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1084 (lll_private_futex_wait, lll_private_futex_timed_wait,
1085 lll_private_futex_wake): Removed.
1086 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1087 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1088 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1089 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1090 (lll_futex_wait): Add private argument, define as wrapper around
1091 lll_futex_timed_wait.
1092 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1093 use __lll_private_flag macro.
1094 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1095 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1097 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1099 (lll_futex_timed_wait, lll_futex_wake): Use it.
1100 (lll_private_futex_wait, lll_private_futex_timed_wait,
1101 lll_private_futex_wake): Removed.
1103 2007-07-27 Jakub Jelinek <jakub@redhat.com>
1105 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1106 of the structure for sparc32.
1108 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
1110 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1112 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1114 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1115 code used when private futexes are assumed.
1116 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1119 2007-07-23 Jakub Jelinek <jakub@redhat.com>
1121 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1122 (__lll_private_flag): Define.
1123 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1124 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1126 (lll_private_futex_wait, lll_private_futex_timedwait,
1127 lll_private_futex_wake): Define as wrapper around non-_private
1129 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1130 (__lll_private_flag): Define.
1131 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1132 (lll_private_futex_wait, lll_private_futex_timedwait,
1133 lll_private_futex_wake): Define as wrapper around non-_private
1136 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
1138 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1139 parameter to lll_futex_wait call.
1140 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1142 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1143 Replace lll_futex_wait with lll_private_futex_wait.
1144 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1145 Add LLL_SHARED parameter to lll_futex_wake().
1147 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1148 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1149 lll_private_futex_wake.
1150 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1151 bit from private parm before syscall.
1152 (lll_futex_timed_wait): Likewise.
1153 (lll_futex_wake): Likewise.
1154 (lll_futex_wake_unlock): Likewise.
1155 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1156 (lll_robust_mutex_unlock): Likewise.
1157 (lll_mutex_unlock_force): Likewise.
1158 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1160 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1162 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1163 compilation when unconditionally using private futexes.
1164 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1165 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1167 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1168 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1170 2007-07-17 Jakub Jelinek <jakub@redhat.com>
1172 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1175 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1177 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1180 2007-05-16 Roland McGrath <roland@redhat.com>
1182 * init.c (__nptl_initial_report_events): New variable.
1183 (__pthread_initialize_minimal_internal): Initialize pd->report_events
1186 2007-06-22 Jakub Jelinek <jakub@redhat.com>
1188 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1189 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1191 2007-06-19 Ulrich Drepper <drepper@redhat.com>
1193 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1196 2007-06-18 Ulrich Drepper <drepper@redhat.com>
1198 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1199 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1200 * pthread_mutex_timedlock.c: Likewise.
1201 * pthread_mutex_trylock.c: Likewise.
1202 * pthread_mutex_unlock.c: Likewise.
1204 2007-06-17 Andreas Schwab <schwab@suse.de>
1206 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1209 2007-06-17 Ulrich Drepper <drepper@redhat.com>
1211 * allocatestack.c (allocate_stack): Make code compile if
1212 __ASSUME_PRIVATE_FUTEX is set.
1214 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1216 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1217 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1218 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1219 (__pthread_rwlock_wrlock): Likewise.
1220 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1221 (pthread_rwlock_timedrdlock): Likewise.
1222 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1223 (pthread_rwlock_timedwrlock): Likewise.
1224 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1225 (__pthread_rwlock_unlock): Likewise.
1227 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1229 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1230 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1231 Split __flags into __flags, __shared, __pad1 and __pad2.
1232 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1233 futexes if they are available.
1234 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1235 in libc-lowlevellock.S allow using private futexes.
1236 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1237 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
1238 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
1239 to call lll_futex_timed_wait. Add lll_private_futex_wait,
1240 lll_private_futex_timed_wait and lll_private_futex_wake.
1241 (lll_robust_mutex_unlock): Fix typo.
1242 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1243 field in futex command setup.
1244 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1245 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1246 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1247 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1248 if they are available. Remove clear_once_control.
1249 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1250 futexes if they are available.
1251 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1252 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1253 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1254 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1255 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1256 Wake only when there are waiters.
1257 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1258 support. Indicate that there are waiters. Remove unnecessary
1259 extra cancellation test.
1260 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
1261 left-over duplication of __sem_wait_cleanup.
1263 2007-06-07 Ulrich Drepper <drepper@redhat.com>
1265 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1266 parameter to lll_futex_wait, lll_futex_timed_wait, and
1267 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
1268 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1269 lll_private_futex_wake.
1270 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1271 * allocatestack.c: Adjust use of lll_futex_* macros.
1273 * lowlevellock.h: Likewise.
1274 * pthread_barrier_wait.c: Likewise.
1275 * pthread_cond_broadcast.c: Likewise.
1276 * pthread_cond_destroy.c: Likewise.
1277 * pthread_cond_signal.c: Likewise.
1278 * pthread_cond_timedwait.c: Likewise.
1279 * pthread_cond_wait.c: Likewise.
1280 * pthread_create.c: Likewise.
1281 * pthread_mutex_lock.c: Likewise.
1282 * pthread_mutex_setprioceiling.c: Likewise.
1283 * pthread_mutex_timedlock.c: Likewise.
1284 * pthread_mutex_unlock.c: Likewise.
1285 * pthread_rwlock_timedrdlock.c: Likewise.
1286 * pthread_rwlock_timedwrlock.c: Likewise.
1287 * pthread_rwlock_unlock.c: Likewise.
1288 * sysdeps/alpha/tls.h: Likewise.
1289 * sysdeps/i386/tls.h: Likewise.
1290 * sysdeps/ia64/tls.h: Likewise.
1291 * sysdeps/powerpc/tls.h: Likewise.
1292 * sysdeps/pthread/aio_misc.h: Likewise.
1293 * sysdeps/pthread/gai_misc.h: Likewise.
1294 * sysdeps/s390/tls.h: Likewise.
1295 * sysdeps/sh/tls.h: Likewise.
1296 * sysdeps/sparc/tls.h: Likewise.
1297 * sysdeps/unix/sysv/linux/fork.c: Likewise.
1298 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1299 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1300 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1301 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1302 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1303 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1304 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1305 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1306 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1308 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1309 * sysdeps/x86_64/tls.h: Likewise.
1311 2007-05-29 Ulrich Drepper <drepper@redhat.com>
1313 * pthread_getattr_np.c: No need to install a cancellation handler,
1314 this is no cancellation point.
1315 * pthread_getschedparam.c: Likewise.
1316 * pthread_setschedparam.c: Likewise.
1317 * pthread_setschedprio.c: Likewise.
1318 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1320 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1321 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1322 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1323 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1324 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1325 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1326 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1327 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1328 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1329 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1330 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1331 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1333 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1334 whether there are more than one thread makes no sense here since
1335 we only call the slow path if the locks are taken.
1336 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1338 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1339 COND_NWAITERS_SHIFT.
1340 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1342 * pthread_cond_init.c: Likewise.
1343 * pthread_cond_timedwait.c: Likewise.
1344 * pthread_cond_wait.c: Likewise.
1345 * pthread_condattr_getclock.c: Likewise.
1346 * pthread_condattr_setclock.c: Likewise.
1347 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1348 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1349 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1350 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1351 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1353 2007-05-28 Jakub Jelinek <jakub@redhat.com>
1355 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1358 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1360 (THREAD_GSCOPE_GET_FLAG): Remove.
1361 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1362 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1364 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1365 (THREAD_GSCOPE_GET_FLAG): Remove.
1366 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1367 instead of THREAD_GSCOPE_GET_FLAG.
1368 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
1370 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1371 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1372 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1373 THREAD_GSCOPE_WAIT): Define.
1374 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1375 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1376 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1377 THREAD_GSCOPE_WAIT): Define.
1378 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1379 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1380 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1381 THREAD_GSCOPE_WAIT): Define.
1382 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1383 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1384 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1385 THREAD_GSCOPE_WAIT): Define.
1387 2007-05-24 Richard Henderson <rth@redhat.com>
1389 * descr.h (struct pthread): Add header.gscope_flag.
1390 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1391 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1392 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1393 THREAD_GSCOPE_WAIT): Define.
1395 2007-05-27 Ulrich Drepper <drepper@redhat.com>
1397 * init.c: Make it compile with older kernel headers.
1399 * tst-initializers1.c: Show through exit code which test failed.
1401 * pthread_rwlock_init.c: Also initialize __shared field.
1402 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1403 element in rwlock structure into four byte elements. One of them is
1404 the new __shared element.
1405 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1407 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1408 __shared, adjust names of other padding elements.
1409 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1410 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1411 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1412 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1414 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1415 futex to use private operations if possible.
1416 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1418 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1420 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1421 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1422 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1423 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1425 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1427 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1428 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1430 2007-05-26 Ulrich Drepper <drepper@redhat.com>
1432 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1433 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1434 * pthread_rwlock_timedrdlock.c: Likewise.
1435 * pthread_rwlock_tryrdlock.c: Likewise.
1437 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1440 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1441 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1442 duplication of __sem_wait_cleanup.
1444 * allocatestack.c: Revert last change.
1446 * sysdeps/i386/tls.h: Likewise.
1447 * sysdeps/x86_64/tls.h: Likewise.
1448 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1450 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1452 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1454 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1455 * pthread_barrier_init.c: Set private flag if pshared and private
1456 futexes are supported.
1457 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1458 private field in futex command setup.
1459 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1461 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1463 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1465 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1466 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1467 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1468 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1469 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1471 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1472 * sem_init.c (__new_sem_init): Rewrite to initialize all three
1473 fields in the structure.
1474 (__old_sem_init): New function.
1475 * sem_open.c: Initialize all fields of the structure.
1476 * sem_getvalue.c: Adjust for renamed element.
1477 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1478 (gen-as-const-headers): Add structsem.sym.
1479 * sysdeps/unix/sysv/linux/structsem.sym: New file.
1480 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1481 struct new_sem. Add struct old_sem.
1482 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1483 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1484 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1485 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1486 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1487 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1488 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1489 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1490 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1491 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1492 * tst-sem10.c: New file.
1493 * tst-sem11.c: New file.
1494 * tst-sem12.c: New file.
1495 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1498 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1499 Jakub Jelinek <jakub@redhat.com>
1501 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1502 Move __pthread_enable_asynccancel right before futex syscall.
1503 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1506 2007-05-24 Jakub Jelinek <jakub@redhat.com>
1508 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1509 THREAD_COPY_PRIVATE_FUTEX): Define.
1510 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1511 THREAD_COPY_PRIVATE_FUTEX): Define.
1512 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1513 * init.c (__pthread_initialize_minimal_internal): Use
1514 THREAD_SET_PRIVATE_FUTEX.
1516 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1517 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1518 THREAD_GSCOPE_FLAG_WAIT): Define.
1519 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1520 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1521 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1523 (THREAD_GSCOPE_GET_FLAG): Define.
1524 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1525 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1526 instead of ->header.gscope_flag directly.
1528 2007-05-23 Ulrich Drepper <drepper@redhat.com>
1530 * init.c (__pthread_initialize_minimal_internal): Check whether
1531 private futexes are available.
1532 * allocatestack.c (allocate_stack): Copy private_futex field from
1533 current thread into the new stack.
1534 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1535 futexes if they are available.
1536 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1537 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1538 in libc-lowlevellock.S allow using private futexes.
1539 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1540 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1542 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1543 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1544 if they are available.
1545 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1546 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1547 * sysdeps/i386/tcb-offsets.sym: Likewise.
1548 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1549 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1551 2007-05-21 Ulrich Drepper <drepper@redhat.com>
1553 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1554 Remove ptr_wait_lookup_done again.
1555 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1556 (__pthread_initialize_minimal_internal): Initialize
1557 _dl_wait_lookup_done pointer in _rtld_global directly.
1558 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1559 Remove code to code _dl_wait_lookup_done.
1560 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1563 2007-05-21 Jakub Jelinek <jakub@redhat.com>
1565 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1566 pthread_mutex_init failed with ENOTSUP.
1568 2007-05-19 Ulrich Drepper <drepper@redhat.com>
1570 * allocatestack.c (__wait_lookup_done): New function.
1571 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1572 Add ptr_wait_lookup_done.
1573 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1574 * pthreadP.h: Declare __wait_lookup_done.
1575 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1576 Define macros to implement reference handling of global scope.
1577 * sysdeps/x86_64/tls.h: Likewise.
1578 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1579 Initialize GL(dl_wait_lookup_done).
1581 2007-05-17 Ulrich Drepper <drepper@redhat.com>
1584 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1586 * pthread_mutex_timedlock.c: Likewise.
1587 * pthread_mutex_trylock.c: Likewise.
1588 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1590 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1591 * tst-robust9.c: New file.
1592 * tst-robustpi9.c: New file.
1594 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1595 unnecessary extra cancellation test.
1597 2007-05-14 Ulrich Drepper <drepper@redhat.com>
1599 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1600 extra cancellation test.
1601 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1603 2007-05-10 Ulrich Drepper <drepper@redhat.com>
1605 * descr.h (struct pthread): Rearrange members to fill hole in
1608 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1609 (__pthread_setaffinity_new): If syscall was successful and
1610 RESET_VGETCPU_CACHE is defined, use it before returning.
1611 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1613 2007-05-10 Jakub Jelinek <jakub@redhat.com>
1616 * tst-align2.c: Include stackinfo.h.
1617 * tst-getpid1.c: Likewise.
1619 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
1622 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1623 * tst-getpid1.c (do_test): Likewise.
1626 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1627 (allocate_stack): Likewise.
1629 2007-05-07 Ulrich Drepper <drepper@redhat.com>
1631 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1632 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1633 (__lll_robust_timedlock_wait): Likewise.
1634 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1636 2007-05-06 Mike Frysinger <vapier@gentoo.org>
1639 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1640 * tst-cancel4.c (tf_fdatasync): New test.
1642 2007-04-27 Ulrich Drepper <drepper@redhat.com>
1645 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1646 check mutexes like normal mutexes.
1649 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1650 Initialize the whole sigevent structure to appease valgrind.
1652 2007-04-25 Ulrich Drepper <drepper@redhat.com>
1654 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1655 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1657 2007-04-06 Ulrich Drepper <drepper@redhat.com>
1659 * tst-locale1.c: Avoid warnings.
1660 * tst-locale2.c: Likewise.
1662 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
1664 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1665 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1667 2007-03-16 Jakub Jelinek <jakub@redhat.com>
1669 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1670 __extern_always_inline where appropriate.
1671 * sysdeps/pthread/pthread.h: Likewise.
1673 2007-03-13 Richard Henderson <rth@redhat.com>
1675 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1676 separate cfi regions for the two subsections.
1678 2007-02-25 Ulrich Drepper <drepper@redhat.com>
1680 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1681 new thread, don't just decrement it.
1682 Patch by Suzuki K P <suzuki@in.ibm.com>.
1684 2007-02-21 Ulrich Drepper <drepper@redhat.com>
1686 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1687 PTHFCT_CALL definition.
1689 2007-02-18 Ulrich Drepper <drepper@redhat.com>
1691 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1692 available, don't use it.
1694 2007-02-09 Jakub Jelinek <jakub@redhat.com>
1696 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1697 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1698 call into the kernel to delay.
1700 2007-01-18 Ulrich Drepper <drepper@redhat.com>
1702 * tst-initializers1.c: We want to test the initializers as seen
1703 outside of libc, so undefined _LIBC.
1705 * pthread_join.c (cleanup): Avoid warning.
1707 2007-01-17 Ulrich Drepper <drepper@redhat.com>
1709 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1710 (__lll_timedwait_tid): Add unwind info.
1712 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1713 function table, mangle the pointers.
1714 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1715 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1716 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1717 demangle pointers before use.
1718 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1720 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1721 * sysdeps/pthread/setxid.h: Likewise.
1723 2007-01-12 Ulrich Drepper <drepper@redhat.com>
1725 * tst-rwlock7.c: Show some more information in case of correct
1728 2007-01-11 Ulrich Drepper <drepper@redhat.com>
1730 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1731 (lll_futex_timed_wait): Undo part of last change, don't negate
1734 2007-01-10 Ulrich Drepper <drepper@redhat.com>
1736 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
1737 FUTEX_CMP_REQUEUE and lll_futex_requeue.
1739 2006-12-28 David S. Miller <davem@davemloft.net>
1741 * shlib-versions: Fix sparc64 linux target specification.
1743 2007-01-10 Jakub Jelinek <jakub@redhat.com>
1745 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1746 Adjust include path for pthread_barrier_wait.c move.
1748 2006-12-21 Jakub Jelinek <jakub@redhat.com>
1750 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1751 tid isn't reread from pd->tid in between ESRCH test and the syscall.
1753 2006-12-06 Jakub Jelinek <jakub@redhat.com>
1755 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1756 6 argument cancellable syscalls.
1757 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1758 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1759 6 argument cancellable syscalls.
1760 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1762 2006-12-09 Ulrich Drepper <drepper@redhat.com>
1764 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1765 (__rtld_mrlock_initialize): Add missing closing parenthesis.
1767 2006-10-30 Jakub Jelinek <jakub@redhat.com>
1769 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1770 __sync_lock_release instead of __sync_lock_release_si.
1772 2006-10-29 Jakub Jelinek <jakub@redhat.com>
1774 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1776 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1777 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1778 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1779 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1780 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1781 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1782 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1783 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1784 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1785 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1786 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1788 2006-10-27 Ulrich Drepper <drepper@redhat.com>
1790 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1791 * pthread_barrier_wait.c: ...here.
1792 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1793 * pthread_cond_broadcast.c: ...here.
1794 * sysdeps/pthread/pthread_cond_signal.c: Move to...
1795 * pthread_cond_signal.c: ...here.
1796 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1797 * pthread_cond_timedwait.c: ...here.
1798 * sysdeps/pthread/pthread_cond_wait.c: Move to...
1799 * pthread_cond_wait.c: ...here.
1800 * sysdeps/pthread/pthread_once.c: Move to...
1801 * pthread_once.c: ...here.
1802 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1803 * pthread_rwlock_rdlock.c: ...here.
1804 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1805 * pthread_rwlock_timedrdlock.c: ...here.
1806 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1807 * pthread_rwlock_timedwrlock.c: ...here.
1808 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1809 * pthread_rwlock_unlock.c: ...here.
1810 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1811 * pthread_rwlock_wrlock.c: ...here.
1812 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1813 * pthread_spin_destroy.c: ...here.
1814 * sysdeps/pthread/pthread_spin_init.c: Move to...
1815 * pthread_spin_init.c: ...here.
1816 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1817 * pthread_spin_unlock.c: ...here.
1818 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1819 * pthread_getcpuclockid.c: ...here.
1821 * init.c: USE_TLS support is now always enabled.
1822 * tst-tls5.h: Likewise.
1823 * sysdeps/alpha/tls.h: Likewise.
1824 * sysdeps/i386/tls.h: Likewise.
1825 * sysdeps/ia64/tls.h: Likewise.
1826 * sysdeps/powerpc/tls.h: Likewise.
1827 * sysdeps/s390/tls.h: Likewise.
1828 * sysdeps/sh/tls.h: Likewise.
1829 * sysdeps/sparc/tls.h: Likewise.
1830 * sysdeps/x86_64/tls.h: Likewise.
1832 2006-10-27 Jakub Jelinek <jakub@redhat.com>
1834 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1835 __rtld_mrlock_change): Update oldval if atomic compare and exchange
1838 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1839 Define to THREAD_SELF->header.multiple_threads.
1840 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1842 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1844 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1845 (SINGLE_THREAD_P): Likewise.
1846 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1847 (SINGLE_THREAD_P): Likewise.
1848 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1849 (SINGLE_THREAD_P): Likewise.
1850 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1851 (SINGLE_THREAD_P): Likewise.
1852 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1854 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1855 (SINGLE_THREAD_P): Likewise.
1856 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1857 (SINGLE_THREAD_P): Likewise.
1858 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1861 2006-10-26 Jakub Jelinek <jakub@redhat.com>
1863 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1864 by default rather than 2_3_3.
1866 2006-10-17 Jakub Jelinek <jakub@redhat.com>
1868 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1869 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1870 atomic_* instead of catomic_* macros.
1872 2006-10-12 Ulrich Drepper <drepper@redhat.com>
1875 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1876 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1877 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1878 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1879 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1880 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1881 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1882 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1883 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1884 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1885 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1886 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1887 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1889 2006-10-11 Ulrich Drepper <drepper@redhat.com>
1891 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1892 cancelable syscalls with six parameters.
1894 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1895 operations instead of atomic_*.
1897 2006-10-09 Ulrich Drepper <drepper@redhat.com>
1899 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
1901 2006-10-07 Ulrich Drepper <drepper@redhat.com>
1903 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1904 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1905 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1907 * pthread_attr_setstack.c: Allow overwriting the version number of the
1909 * pthread_attr_setstacksize.c: Likewise.
1910 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1912 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1913 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
1915 2006-09-24 Ulrich Drepper <drepper@redhat.com>
1918 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
1919 Patch by Petr Baudis.
1921 2006-09-18 Jakub Jelinek <jakub@redhat.com>
1923 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
1925 * tst-cancel2.c (tf): Loop as long as something was written.
1927 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1929 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
1930 mutexes wake all mutexes.
1931 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
1932 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1933 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1935 2006-09-12 Ulrich Drepper <drepper@redhat.com>
1937 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
1938 to guarantee the thread is always canceled.
1940 2006-09-08 Jakub Jelinek <jakub@redhat.com>
1942 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
1944 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
1945 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
1946 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1947 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1948 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1950 2006-09-08 Ulrich Drepper <drepper@redhat.com>
1953 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
1954 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1955 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1956 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1957 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1958 * Makefile (tests): Add tst-cond22.
1959 * tst-cond22.c: New file.
1961 2006-09-05 Ulrich Drepper <drepper@redhat.com>
1964 * descr.h (struct pthread): Add parent_cancelhandling.
1965 * sysdeps/pthread/createthread.c (create_thread): Pass parent
1966 cancelhandling value to child.
1967 * pthread_create.c (start_thread): If parent thread was canceled
1968 reset the SIGCANCEL mask.
1969 * Makefile (tests): Add tst-cancel25.
1970 * tst-cancel25.c: New file.
1972 2006-09-05 Jakub Jelinek <jakub@redhat.com>
1973 Ulrich Drepper <drepper@redhat.com>
1975 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
1976 counterp if it is already zero.
1977 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
1979 2006-03-04 Jakub Jelinek <jakub@redhat.com>
1980 Roland McGrath <roland@redhat.com>
1982 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
1983 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1984 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
1985 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1986 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1987 lll_robust_mutex_timedlock, lll_mutex_unlock,
1988 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1989 Add _L_*_ symbols around the subsection.
1990 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
1991 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
1993 2006-03-03 Jakub Jelinek <jakub@redhat.com>
1994 Roland McGrath <roland@redhat.com>
1996 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1997 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1998 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
1999 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2000 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2001 lll_robust_mutex_timedlock, lll_mutex_unlock,
2002 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2003 Add _L_*_ symbols around the subsection.
2004 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2005 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2007 2006-08-31 Ulrich Drepper <drepper@redhat.com>
2009 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2010 change because it can disturb too much existing code. If real hard
2011 reader preference is needed we'll introduce another type.
2012 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2013 (pthread_rwlock_timedwrlock): Likewise.
2014 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2017 2006-08-30 Ulrich Drepper <drepper@redhat.com>
2019 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2021 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2022 (pthread_rwlock_timedwrlock): Likewise.
2023 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2026 2006-08-25 Jakub Jelinek <jakub@redhat.com>
2028 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2029 Only define ifdef SHARED.
2031 2006-08-23 Ulrich Drepper <drepper@redhat.com>
2033 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2034 (free_stacks): ...here.
2035 (__free_stack_cache): New function.
2036 * pthreadP.h: Declare __free_stack_cache.
2037 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2039 * init.c (pthread_functions): Initialize ptr_freeres.
2040 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2041 New freeres function.
2043 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
2046 * Makefile (extra-objs): Add modules to extra-test-objs instead.
2048 2006-08-20 Ulrich Drepper <drepper@redhat.com>
2050 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2051 _XOPEN_REALTIME_THREADS.
2053 2006-08-15 Jakub Jelinek <jakub@redhat.com>
2055 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2056 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2057 HAVE_CLOCK_GETTIME_VSYSCALL.
2058 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2060 2006-08-14 Jakub Jelinek <jakub@redhat.com>
2062 * sysdeps/unix/sysv/linux/bits/posix_opt.h
2063 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2064 * descr.h (struct priority_protection_data): New type.
2065 (struct pthread): Add tpp field.
2066 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2067 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2068 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2069 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2071 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2072 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2073 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2074 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2076 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2078 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2079 * pthread_mutexattr_getprioceiling.c
2080 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2081 in the SCHED_FIFO priority range.
2082 * pthread_mutexattr_setprioceiling.c
2083 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2084 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2085 if mutex is not TPP. Ceiling is now in __data.__lock.
2086 * pthread_mutex_setprioceiling.c: Include stdbool.h.
2087 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
2088 is now in __data.__lock. Add locking.
2089 * pthread_create.c (__free_tcb): Free pd->tpp structure.
2090 * Makefile (libpthread-routines): Add tpp.
2091 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2092 * tst-tpp.h: New file.
2093 * tst-mutexpp1.c: New file.
2094 * tst-mutexpp6.c: New file.
2095 * tst-mutexpp10.c: New file.
2096 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2097 * tst-mutex6.c (TEST_FUNCTION): Likewise.
2099 2006-08-12 Ulrich Drepper <drepper@redhat.com>
2102 * pthread_join.c (pthread_join): Account for self being canceled
2103 when checking for deadlocks.
2104 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
2105 (tf1): Don't print anything after pthread_join returns, this would be
2106 another cancellation point.
2108 * tst-join6.c: New file.
2109 * Makefile (tests): Add tst-join6.
2111 2006-08-03 Ulrich Drepper <drepper@redhat.com>
2114 * pthread_setspecific.c (__pthread_setspecific): Check
2115 out-of-range index before checking for unused key.
2117 * sysdeps/pthread/gai_misc.h: New file.
2119 2006-08-01 Ulrich Drepper <drepper@redhat.com>
2121 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
2122 file. Don't use sysctl.
2123 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
2124 overwrite the file if this is likely not true.
2126 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
2128 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2129 * Makefile (tests): Add tst-getpid3.
2130 * tst-getpid3.c: New file.
2132 2006-07-30 Roland McGrath <roland@redhat.com>
2134 * Makefile (libpthread-routines): Add ptw-sigsuspend.
2136 * sysdeps/unix/sysv/linux/i386/not-cancel.h
2137 (pause_not_cancel): New macro.
2138 (nanosleep_not_cancel): New macro.
2139 (sigsuspend_not_cancel): New macro.
2140 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2141 nanosleep_not_cancel macro from <not-cancel.h>.
2142 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2143 macro from <not-cancel.h>.
2145 2006-07-28 Ulrich Drepper <drepper@redhat.com>
2146 Jakub Jelinek <jakub@redhat.com>
2148 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2149 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
2150 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2151 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2152 * pthread_mutex_init.c: Add support for priority inheritance mutex.
2153 * pthread_mutex_lock.c: Likewise.
2154 * pthread_mutex_timedlock.c: Likewise.
2155 * pthread_mutex_trylock.c: Likewise.
2156 * pthread_mutex_unlock.c: Likewise.
2157 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2159 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2160 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2161 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2162 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2163 pthread-pi-defines.sym.
2164 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2165 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2166 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2167 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2168 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2169 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2170 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2171 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2172 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2173 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2174 _POSIX_THREAD_PRIO_INHERIT to 200112L.
2175 * tst-mutex1.c: Adjust to allow use in PI mutex test.
2176 * tst-mutex2.c: Likewise.
2177 * tst-mutex3.c: Likewise.
2178 * tst-mutex4.c: Likewise.
2179 * tst-mutex5.c: Likewise.
2180 * tst-mutex6.c: Likewise.
2181 * tst-mutex7.c: Likewise.
2182 * tst-mutex7a.c: Likewise.
2183 * tst-mutex8.c: Likewise.
2184 * tst-mutex9.c: Likewise.
2185 * tst-robust1.c: Likewise.
2186 * tst-robust7.c: Likewise.
2187 * tst-robust8.c: Likewise.
2188 * tst-mutexpi1.c: New file.
2189 * tst-mutexpi2.c: New file.
2190 * tst-mutexpi3.c: New file.
2191 * tst-mutexpi4.c: New file.
2192 * tst-mutexpi5.c: New file.
2193 * tst-mutexpi6.c: New file.
2194 * tst-mutexpi7.c: New file.
2195 * tst-mutexpi7a.c: New file.
2196 * tst-mutexpi8.c: New file.
2197 * tst-mutexpi9.c: New file.
2198 * tst-robust1.c: New file.
2199 * tst-robust2.c: New file.
2200 * tst-robust3.c: New file.
2201 * tst-robust4.c: New file.
2202 * tst-robust5.c: New file.
2203 * tst-robust6.c: New file.
2204 * tst-robust7.c: New file.
2205 * tst-robust8.c: New file.
2206 * Makefile (tests): Add the new tests.
2208 * pthread_create.c (start_thread): Add some casts to avoid warnings.
2209 * pthread_mutex_destroy.c: Remove unneeded label.
2211 2006-07-01 Ulrich Drepper <drepper@redhat.com>
2213 * pthread_mutex_init.c (__pthread_mutex_init): Move some
2214 computations to compile time.
2216 2006-06-04 Ulrich Drepper <drepper@redhat.com>
2218 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2220 2006-05-15 Ulrich Drepper <drepper@redhat.com>
2222 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2224 2006-05-11 Ulrich Drepper <drepper@redhat.com>
2226 * pthread_key_create.c (__pthread_key_create): Do away with
2227 __pthread_keys_lock.
2229 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2230 (__kernel_cpumask_size): Mark as hidden.
2231 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2233 * sem_open.c (__sem_mappings_lock): Mark as hidden.
2234 * semaphoreP.h (__sem_mappings_lock): Likewise.
2236 2006-05-10 Ulrich Drepper <drepper@redhat.com>
2238 * pthread_atfork.c: Mark __dso_handle as hidden.
2240 2006-05-09 Ulrich Drepper <drepper@redhat.com>
2243 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2244 the reload problem. Change the one path in pthread_cancel_init
2245 which causes the problem. Force gcc to reload. Simplify callers.
2246 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2247 (_Unwind_GetBSP): Undo last patch.
2249 2006-05-07 Ulrich Drepper <drepper@redhat.com>
2251 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2252 function pointer is reloaded after pthread_cancel_init calls.
2255 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2256 pointers are reloaded after pthread_cancel_init calls.
2258 2006-05-01 Ulrich Drepper <drepper@redhat.com>
2260 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2263 2006-04-27 Ulrich Drepper <drepper@redhat.com>
2265 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2266 Allocate new object which is passed to timer_sigev_thread so that
2267 the timer can be deleted before the new thread is scheduled.
2269 2006-04-26 Roland McGrath <roland@redhat.com>
2271 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2273 2006-04-08 Ulrich Drepper <drepper@redhat.com>
2275 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2276 suffix for conditional jumps.
2277 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2278 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2279 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2280 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2281 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2282 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2284 * init.c (sigcancel_handler): Compare with correct PID even if the
2285 thread is in the middle of a fork call.
2286 (sighandler_setxid): Likewise.
2287 Reported by Suzuki K P <suzuki@in.ibm.com> .
2289 2006-04-07 Jakub Jelinek <jakub@redhat.com>
2291 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2293 2006-04-06 Ulrich Drepper <drepper@redhat.com>
2295 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2296 fails [Coverity CID 105].
2298 2006-04-05 Ulrich Drepper <drepper@redhat.com>
2300 * sysdeps/pthread/pthread.h: Add nonnull attributes.
2302 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
2305 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2306 Define __lll_rel_instr using lwsync.
2308 2006-03-27 Ulrich Drepper <drepper@redhat.com>
2310 * allocatestack.c (allocate_stack): Always initialize robust_head.
2311 * descr.h: Define struct robust_list_head.
2312 (struct pthread): Use robust_list_head in robust mutex list definition.
2313 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2314 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2315 (__pthread_initialize_minimal_internal): Register robust_list with
2317 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2318 Declare __set_robust_list_avail.
2319 * pthread_create.c (start_thread): Register robust_list of new thread.
2320 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2322 * pthread_mutex_destroy.c: For robust mutexes don't look at the
2323 number of users, it's unreliable.
2324 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2325 set_robust_list syscall is available.
2326 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2327 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2328 Set robust_head.list_op_pending before trying to lock a robust mutex.
2329 * pthread_mutex_timedlock.c: Likewise.
2330 * pthread_mutex_trylock.c: Likewise.
2331 * pthread_mutex_unlock.c: Likewise for unlocking.
2332 * Makefile (tests): Add tst-robust8.
2333 * tst-robust8.c: New file.
2335 2006-03-08 Andreas Schwab <schwab@suse.de>
2337 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2338 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2340 2006-03-05 Roland McGrath <roland@redhat.com>
2342 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2343 and $config_os doesn't match *linux*.
2345 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
2347 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2348 Use __syscall_error.
2349 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2350 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2351 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2352 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2353 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2354 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2356 2006-03-02 Ulrich Drepper <drepper@redhat.com>
2358 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2360 2006-03-01 Ulrich Drepper <drepper@redhat.com>
2362 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2363 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2365 (__lll_robust_timedlock_wait): Likewise.
2366 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2367 (__lll_robust_lock_wait): Likewise.
2368 (__lll_robust_timedlock_wait): Likewise.
2369 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2370 (__lll_robust_lock_wait): Likewise.
2371 (__lll_robust_timedlock_wait): Likewise.
2373 2006-03-01 Jakub Jelinek <jakub@redhat.com>
2375 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2376 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2377 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2378 lll_robust_mutex_unlock): Define.
2379 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2381 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
2383 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2384 instead of <clone.S>.
2386 2006-02-27 Jakub Jelinek <jakub@redhat.com>
2388 * Makefile (libpthread-routines): Add
2389 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2390 and pthread_mutex_[sg]etprioceiling.
2391 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2392 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2393 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2394 pthread_mutex_setprioceiling.
2395 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2396 PTHREAD_PRIO_PROTECT): New enum values.
2397 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2398 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2399 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2401 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2402 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2403 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2405 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2406 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2407 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2408 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2409 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2410 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2411 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2413 * pthread_mutex_getprioceiling.c: New file.
2414 * pthread_mutex_setprioceiling.c: New file.
2415 * pthread_mutexattr_getprioceiling.c: New file.
2416 * pthread_mutexattr_setprioceiling.c: New file.
2417 * pthread_mutexattr_getprotocol.c: New file.
2418 * pthread_mutexattr_setprotocol.c: New file.
2420 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2422 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2424 2006-02-27 Roland McGrath <roland@redhat.com>
2426 * sysdeps/pthread/Subdirs: List nptl here too.
2427 * configure (libc_add_on_canonical): New variable.
2429 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2431 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2432 self to get main source tree's file.
2433 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2434 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2435 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2436 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2437 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2438 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2439 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2440 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2441 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2442 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2443 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2444 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2445 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2447 * Makefile: Use $(sysdirs) in vpath directive.
2449 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2450 (CPPFLAGS-timer_routines.c): Likewise.
2452 * Makeconfig (includes): Variable removed.
2454 2006-02-26 Roland McGrath <roland@redhat.com>
2456 * sysdeps/generic/pt-raise.c: Moved to ...
2457 * pt-raise.c: ... here.
2458 * sysdeps/generic/lowlevellock.h: Moved to ...
2459 * lowlevellock.h: ... here.
2461 2006-02-23 Roland McGrath <roland@redhat.com>
2463 * descr.h (struct pthread): Add final member `end_padding'.
2464 (PTHREAD_STRUCT_END_PADDING): Use it.
2466 2006-02-20 Roland McGrath <roland@redhat.com>
2468 * sysdeps/mips: Directory removed, saved in ports repository.
2469 * sysdeps/unix/sysv/linux/mips: Likewise.
2471 2006-02-18 Ulrich Drepper <drepper@redhat.com>
2473 * tst-robust1.c: Add second mutex to check that the mutex list is
2476 2006-02-17 Jakub Jelinek <jakub@redhat.com>
2478 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2479 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2480 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2481 lll_robust_mutex_unlock): New macros.
2482 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2483 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2484 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2485 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2486 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2488 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2490 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2492 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2494 2006-02-17 Ulrich Drepper <drepper@redhat.com>
2496 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2497 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2498 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2499 (lll_robust_mutex_unlock): Likewise.
2501 2006-02-13 Jakub Jelinek <jakub@redhat.com>
2503 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2504 Set robust_list.__next rather than robust_list.
2505 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2506 (__pthread_list_t): New typedef.
2507 (pthread_mutex_t): Replace __next and __prev fields with __list.
2508 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2509 (__pthread_list_t): New typedef.
2510 (pthread_mutex_t): Replace __next and __prev fields with __list.
2511 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2512 (__pthread_list_t, __pthread_slist_t): New typedefs.
2513 (pthread_mutex_t): Replace __next and __prev fields with __list.
2514 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2515 (__pthread_list_t, __pthread_slist_t): New typedefs.
2516 (pthread_mutex_t): Replace __next and __prev fields with __list.
2517 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2518 (__pthread_list_t, __pthread_slist_t): New typedefs.
2519 (pthread_mutex_t): Replace __next and __prev fields with __list.
2520 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2521 (__pthread_slist_t): New typedef.
2522 (pthread_mutex_t): Replace __next field with __list.
2524 2006-02-15 Ulrich Drepper <drepper@redhat.com>
2526 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2527 PTHREAD_MUTEX_OWNERDEAD.
2528 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2529 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2530 * Makefile (libpthread-routines): Add lowlevelrobustlock.
2531 * pthread_create.c (start_thread): Very much simplify robust_list loop.
2532 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2533 to PTHREAD_MUTEX_INCONSISTENT.
2534 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2535 * pthread_mutex_lock.c: Reimplement robust mutex handling.
2536 * pthread_mutex_trylock.c: Likewise.
2537 * pthread_mutex_timedlock.c: Likewise.
2538 * pthread_mutex_unlock.c: Likewise.
2539 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2540 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2541 lowlevelrobustlock.sym.
2542 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2543 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2545 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2546 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2547 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2548 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2549 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2551 2006-02-12 Ulrich Drepper <drepper@redhat.com>
2553 * allocatestack.c (allocate_stack): Initialize robust_list.
2554 * init.c (__pthread_initialize_minimal_internal): Likewise.
2555 * descr.h (struct xid_command): Pretty printing.
2556 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2557 robust_list. Adjust macros.
2558 * pthread_create.c (start_thread): Adjust robust_list handling.
2559 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2560 but the owner for all robust mutex types.
2561 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2562 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
2563 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2564 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2566 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2567 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2569 2006-02-08 Jakub Jelinek <jakub@redhat.com>
2571 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2572 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2574 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2576 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2578 (lll_futex_timed_wait): Define.
2580 2006-01-19 Ulrich Drepper <drepper@redhat.com>
2582 * tst-cancel4.c: Test ppoll.
2584 2006-01-18 Andreas Jaeger <aj@suse.de>
2587 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2588 (pthread_mutex_t): Follow changes for other archs. Based on patch
2589 by Jim Gifford <patches@jg555.com>.
2591 2006-01-13 Richard Henderson <rth@redhat.com>
2593 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2595 2006-01-10 Roland McGrath <roland@redhat.com>
2597 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2598 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2599 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2600 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2601 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2602 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2603 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2604 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2605 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2606 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2608 2006-01-09 Roland McGrath <roland@redhat.com>
2610 * tst-initializers1-c89.c: New file.
2611 * tst-initializers1-c99.c: New file.
2612 * tst-initializers1-gnu89.c: New file.
2613 * tst-initializers1-gnu99.c: New file.
2614 * Makefile (tests): Add them.
2615 (CFLAGS-tst-initializers1-c89.c): New variable.
2616 (CFLAGS-tst-initializers1-c99.c): New variable.
2617 (CFLAGS-tst-initializers1-gnu89.c): New variable.
2618 (CFLAGS-tst-initializers1-gnu99.c): New variable.
2620 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2621 Use __extension__ on anonymous union definition.
2622 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2623 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2624 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2625 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2626 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2628 2006-01-08 Jakub Jelinek <jakub@redhat.com>
2630 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2631 Don't give the union a name because it changes the mangled name.
2632 Instead name the struct for __data.
2633 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2635 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2638 2006-01-09 Jakub Jelinek <jakub@redhat.com>
2640 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2641 stack bias to mc_ftp field.
2643 2006-01-07 Ulrich Drepper <drepper@redhat.com>
2645 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2646 being too clever and reloading the futex value where it shouldn't.
2648 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2650 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2653 2006-01-06 Jakub Jelinek <jakub@redhat.com>
2655 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2658 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2660 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2661 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2662 rename in tcbhead_t.
2664 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2665 Don't give the union a name because it changes the mangled name.
2666 Instead name the struct for __data.
2667 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2668 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2669 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2670 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2671 * pthread_create.c (start_thread): Adjust robust mutex free loop.
2672 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2674 2006-01-05 Ulrich Drepper <drepper@redhat.com>
2676 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2678 (lll_futex_timed_wait): Define.
2679 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2680 * sysdeps/pthread/aio_misc.h: New file.
2682 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
2684 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2686 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
2688 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2689 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2690 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2692 2006-01-04 Ulrich Drepper <drepper@redhat.com>
2694 * tst-cancel24.cc: Use C headers instead of C++ headers.
2696 2006-01-03 Jakub Jelinek <jakub@redhat.com>
2698 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2699 sparc-linux configured glibc.
2700 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2701 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2702 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2703 atomic_compare_and_exchange_val_24_acq instead of
2704 atomic_compare_and_exchange_val_acq.
2705 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2706 instead of atomic_exchange_rel.
2707 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2708 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2710 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2712 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2713 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2714 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2715 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2716 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2717 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2719 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2721 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2722 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2723 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2725 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2727 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2729 2006-01-03 Ulrich Drepper <drepper@redhat.com>
2731 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2734 2006-01-02 Jakub Jelinek <jakub@redhat.com>
2736 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2737 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2738 THREAD_COPY_POINTER_GUARD): Define.
2739 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2740 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2742 2006-01-01 Ulrich Drepper <drepper@redhat.com>
2744 * version.c: Update copyright year.
2746 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2748 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2749 .eh_frame section, use cfi_* directives.
2750 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2752 2005-12-30 Ulrich Drepper <drepper@redhat.com>
2754 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2757 2005-12-29 Ulrich Drepper <drepper@redhat.com>
2759 * sysdeps/pthread/sigaction.c: Removed.
2760 * sigaction.c: New file.
2761 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2763 2005-12-28 Ulrich Drepper <drepper@redhat.com>
2765 * Makefile (tests): Add tst-signal7.
2766 * tst-signal7.c: New file.
2768 2005-12-27 Roland McGrath <roland@redhat.com>
2770 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2771 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2772 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2773 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2774 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2775 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2776 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2777 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2778 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2779 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2780 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2782 2005-12-27 Jakub Jelinek <jakub@redhat.com>
2784 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2785 and __prev field to pthread_mutex_t.
2786 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2787 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2788 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2789 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2790 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2793 2005-12-26 Ulrich Drepper <drepper@redhat.com>
2795 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2796 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2797 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2798 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2799 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2800 and PTHREAD_MUTEXATTR_FLAG_BITS.
2801 * descr.h (struct pthread): Add robust_list field and define
2802 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2803 * pthread_mutexattr_getrobust.c: New file.
2804 * pthread_mutexattr_setrobust.c: New file.
2805 * pthread_mutex_consistent.c: New file.
2806 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2807 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2808 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2809 Adjust pthread_mutex_t initializers.
2810 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2811 field to pthread_mutex_t.
2812 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2813 and __prev field to pthread_mutex_t.
2814 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2815 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2816 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2817 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2818 * pthread_mutexattr_gettype.c: Likewise.
2819 * pthread_mutexattr_setpshared.c: Likewise.
2820 * pthread_mutexattr_settype.c: Likewise.
2821 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2822 Initialize mutex kind according to robust flag.
2823 * pthread_mutex_lock.c: Implement local robust mutex.
2824 * pthread_mutex_timedlock.c: Likewise.
2825 * pthread_mutex_trylock.c: Likewise.
2826 * pthread_mutex_unlock.c: Likewise.
2827 * pthread_create.c (start_thread): Mark robust mutexes which remained
2829 * tst-robust1.c: New file.
2830 * tst-robust2.c: New file.
2831 * tst-robust3.c: New file.
2832 * tst-robust4.c: New file.
2833 * tst-robust5.c: New file.
2834 * tst-robust6.c: New file.
2835 * tst-robust7.c: New file.
2836 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2837 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2838 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2839 tst-robust5, tst-robust6, and tst-robust7.
2841 * tst-typesizes.c: New file.
2842 * Makefile (tests): Add tst-typesizes.
2844 * tst-once3.c: More debug output.
2846 2005-12-24 Ulrich Drepper <drepper@redhat.com>
2848 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2849 missing after last change.
2851 * version.c: Update copyright year.
2853 2005-12-23 Ulrich Drepper <drepper@redhat.com>
2855 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2856 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2857 * pthread_mutex_trylock.c: Likewise.
2858 * pthread_mutex_timedlock.c: Likewise.
2859 * pthread_mutex_unlock.c: Likewise.
2861 2005-12-22 Roland McGrath <roland@redhat.com>
2863 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2864 so that #include_next's search location is not reset to the -I..
2865 directory where <nptl/...> can be found.
2867 2005-12-22 Ulrich Drepper <drepper@redhat.com>
2870 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2871 Fix unwind info. Remove useless branch prediction prefix.
2872 * tst-cancel24.cc: New file.
2873 * Makefile: Add rules to build and run tst-cancel24.
2875 2005-12-21 Roland McGrath <roland@redhat.com>
2877 * libc-cancellation.c: Use <> rather than "" #includes.
2878 * pt-cleanup.c: Likewise.
2879 * pthread_create.c: Likewise.
2880 * pthread_join.c: Likewise.
2881 * pthread_timedjoin.c: Likewise.
2882 * pthread_tryjoin.c: Likewise.
2883 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2884 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2885 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2886 * unwind.c: Likewise.
2888 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2890 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2891 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2892 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2893 THREAD_COPY_POINTER_GUARD): Define.
2895 2005-12-19 Jakub Jelinek <jakub@redhat.com>
2897 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2899 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2900 THREAD_COPY_POINTER_GUARD): Define.
2901 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2902 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2903 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2904 THREAD_COPY_POINTER_GUARD): Define.
2905 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2906 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2907 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2908 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2909 Use PTR_DEMANGLE for B0 if defined.
2911 2005-12-17 Ulrich Drepper <drepper@redhat.com>
2913 * pthread_create.c (__pthread_create_2_1): Use
2914 THREAD_COPY_POINTER_GUARD if available.
2915 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2916 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2917 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
2918 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
2919 * sysdeps/x86_64/tls.h: Likewise.
2921 2005-12-15 Roland McGrath <roland@redhat.com>
2923 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
2925 2005-12-13 Ulrich Drepper <drepper@redhat.com>
2927 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
2929 * errno-loc.c: New file.
2931 2005-12-12 Roland McGrath <roland@redhat.com>
2933 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
2934 adjustments before choosing stack size. Update minimum stack size
2935 calculation to match allocate_stack change.
2937 2005-12-12 Ulrich Drepper <drepper@redhat.com>
2939 * allocatestack.c (allocate_stack): Don't demand that there is an
2940 additional full page available on the stack beside guard, TLS, the
2943 2005-11-24 Ulrich Drepper <drepper@redhat.com>
2945 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2946 (__cleanup_fct_attribute): Use __regparm__ not regparm.
2948 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
2949 compiling 32-bit code we must define __cleanup_fct_attribute.
2951 005-11-24 Jakub Jelinek <jakub@redhat.com>
2954 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
2955 __attribute__ instead of __attribute.
2956 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2957 (__cleanup_fct_attribute): Likewise.
2959 2005-11-17 Jakub Jelinek <jakub@redhat.com>
2961 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
2962 a write barrier before writing libgcc_s_getcfa.
2964 2005-11-06 Ulrich Drepper <drepper@redhat.com>
2966 * sysdeps/unix/sysv/linux/configure: Removed.
2968 2005-11-05 Ulrich Drepper <drepper@redhat.com>
2970 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
2971 optional init_array/fini_array support.
2973 2005-10-24 Roland McGrath <roland@redhat.com>
2975 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
2976 versioned_symbol use.
2978 2005-10-16 Roland McGrath <roland@redhat.com>
2980 * init.c (__pthread_initialize_minimal_internal): Even when using a
2981 compile-time default stack size, apply the minimum that allocate_stack
2982 will require, and round up to page size.
2984 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
2986 * Makefile ($(test-modules)): Remove static pattern rule.
2988 2005-10-14 Jakub Jelinek <jakub@redhat.com>
2989 Ulrich Drepper <drepper@redhat.com>
2991 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
2992 alignment in callback function.
2993 * Makefile: Add rules to build and run tst-align3.
2994 * tst-align3.c: New file.
2996 2005-10-03 Jakub Jelinek <jakub@redhat.com>
2998 * allocatestack.c (setxid_signal_thread): Add
2999 INTERNAL_SYSCALL_DECL (err).
3001 2005-10-02 Jakub Jelinek <jakub@redhat.com>
3003 * allocatestack.c (setxid_signal_thread): Need to use
3004 atomic_compare_and_exchange_bool_acq.
3006 2005-10-01 Ulrich Drepper <drepper@redhat.com>
3007 Jakub Jelinek <jakub@redhat.com>
3009 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
3011 (struct pthread): Move specific_used field to avoid padding.
3012 Add setxid_futex field.
3013 * init.c (sighandler_setxid): Reset setxid flag and release the
3015 * allocatestack.c (setxid_signal_thread): New function. Broken
3016 out of the bodies of the two loops in __nptl_setxid. For undetached
3017 threads check whether they are exiting and if yes, don't send a signal.
3018 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3019 * pthread_create.c (start_thread): For undetached threads, check
3020 whether setxid bit is set. If yes, wait until signal has been
3023 * allocatestack.c (STACK_VARIABLES): Initialize them.
3024 * pthread_create.c (__pthread_create_2_1): Initialize pd.
3026 2004-09-02 Jakub Jelinek <jakub@redhat.com>
3028 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3029 waiters, awake all waiters on the associated mutex.
3031 2005-09-22 Roland McGrath <roland@redhat.com>
3033 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3034 ../sysdeps/x86_64/hp-timing.h).
3036 2005-08-29 Jakub Jelinek <jakub@redhat.com>
3038 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3039 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3040 (lll_futex_wake_unlock): Define.
3041 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3042 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3043 (lll_futex_wake_unlock): Define.
3044 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3045 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3046 (lll_futex_wake_unlock): Define.
3047 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3048 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3049 (lll_futex_wake_unlock): Define.
3050 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3051 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3052 (lll_futex_wake_unlock): Define.
3053 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3054 lll_futex_wake_unlock.
3055 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3056 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3057 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3058 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3059 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3060 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3062 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3064 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3065 Fix typo in register name.
3067 2005-08-23 Ulrich Drepper <drepper@redhat.com>
3069 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3070 Use __sigfillset. Document that sigfillset does the right thing wrt
3073 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3076 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3077 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3078 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3079 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3080 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3081 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3083 * Makefile (tests): Add tst-initializers1.
3084 (CFLAGS-tst-initializers1.c): Set.
3085 * tst-initializers1.c: New test.
3087 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3089 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3090 Make sure __flags are located at offset 48 from the start of the
3093 2005-07-02 Roland McGrath <roland@redhat.com>
3095 * Makeconfig: Comment fix.
3097 2005-07-05 Jakub Jelinek <jakub@redhat.com>
3099 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3100 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3101 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3102 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3103 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3104 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3105 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3106 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3107 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3108 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3110 2005-06-25 Jakub Jelinek <jakub@redhat.com>
3112 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3113 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3114 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3116 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3117 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3118 field. Put in sysinfo field unconditionally.
3119 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3120 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3121 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3122 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3124 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3125 * pthread_create.c (__pthread_create_2_1): Use
3126 THREAD_COPY_STACK_GUARD macro.
3127 * Makefile: Add rules to build and run tst-stackguard1{,-static}
3129 * tst-stackguard1.c: New file.
3130 * tst-stackguard1-static.c: New file.
3132 2005-06-14 Alan Modra <amodra@bigpond.net.au>
3134 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3135 Invoke CGOTSETUP and CGOTRESTORE.
3136 (CGOTSETUP, CGOTRESTORE): Define.
3138 2005-05-29 Richard Henderson <rth@redhat.com>
3140 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3141 (tf_write, tf_writev): Use it.
3142 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
3145 2005-05-23 Jakub Jelinek <jakub@redhat.com>
3147 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3148 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3149 __librt_*_asynccancel@local.
3151 2005-05-17 Alan Modra <amodra@bigpond.net.au>
3153 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3154 all occurrences of JUMPTARGET. Instead append @local to labels.
3156 2005-05-20 Jakub Jelinek <jakub@redhat.com>
3158 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3159 size/alignment of struct pthread rather than tcbhead_t.
3160 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3162 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3164 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3167 2005-05-19 Richard Henderson <rth@redhat.com>
3169 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3170 __sync_val_compare_and_swap, not explicit _si variant.
3171 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3173 2005-05-03 Ulrich Drepper <drepper@redhat.com>
3176 * sysdeps/pthread/pthread.h: Avoid empty initializers.
3178 2005-05-03 Jakub Jelinek <jakub@redhat.com>
3180 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3181 .eh_frame section, use cfi_* directives.
3183 2005-04-27 Jakub Jelinek <jakub@redhat.com>
3185 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3188 2005-04-27 Ulrich Drepper <drepper@redhat.com>
3191 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3194 2005-04-27 Roland McGrath <roland@redhat.com>
3196 * Makefile (tests): Remove tst-clock2.
3198 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3199 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3200 translating to the kernel clockid_t for our own process/thread clock.
3202 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3204 2005-04-15 Jakub Jelinek <jakub@redhat.com>
3206 * old_pthread_cond_init.c: Include <errno.h>.
3207 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3208 process shared or uses clock other than CLOCK_REALTIME.
3209 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3211 2005-04-13 David S. Miller <davem@davemloft.net>
3213 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3214 * sysdeps/sparc/sparc64/clone.S: New file.
3216 2005-04-05 Jakub Jelinek <jakub@redhat.com>
3219 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3220 __inline instead of inline.
3221 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3223 2005-03-31 Jakub Jelinek <jakub@redhat.com>
3225 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3226 functionally equivalent, but shorter instructions.
3227 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3228 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3229 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3231 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3232 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3233 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3234 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3235 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3236 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3237 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3239 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3240 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3241 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3242 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3243 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3245 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
3247 * sysdeps/mips/Makefile: New file.
3248 * sysdeps/mips/nptl-sysdep.S: New file.
3249 * sysdeps/mips/tcb-offsets.sym: New file.
3250 * sysdeps/mips/pthread_spin_lock.S: New file.
3251 * sysdeps/mips/pthread_spin_trylock.S: New file.
3252 * sysdeps/mips/pthreaddef.h: New file.
3253 * sysdeps/mips/tls.h: New file.
3254 * sysdeps/mips/jmpbuf-unwind.h: New file.
3255 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3256 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3257 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3258 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3259 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3260 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3261 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3262 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3263 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3264 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3266 2005-03-23 Ulrich Drepper <drepper@redhat.com>
3269 * pthread_create.c (__pthread_create_2_1): Rename syscall error
3272 2005-03-10 Jakub Jelinek <jakub@redhat.com>
3274 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3276 2005-02-25 Roland McGrath <roland@redhat.com>
3278 * alloca_cutoff.c: Correct license text.
3279 * tst-unload.c: Likewise.
3280 * sysdeps/pthread/allocalim.h: Likewise.
3281 * sysdeps/pthread/pt-initfini.c: Likewise.
3282 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3283 * sysdeps/pthread/bits/sigthread.h: Likewise.
3284 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3285 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3287 2005-02-16 Roland McGrath <roland@redhat.com>
3289 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3290 Use unsigned int * for ptr_nthreads.
3292 2005-02-14 Alan Modra <amodra@bigpond.net.au>
3295 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3298 2005-02-07 Richard Henderson <rth@redhat.com>
3301 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3304 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
3306 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3307 order of arguments in invocation of atomic_add_zero.
3309 2005-01-26 Jakub Jelinek <jakub@redhat.com>
3312 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3313 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3314 at least gotntpoff relocation and addition.
3315 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3317 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3319 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3322 2005-01-06 Ulrich Drepper <drepper@redhat.com>
3324 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3325 entry for static tls deallocation fix.
3326 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3327 also contains information whether the memory pointed to is static
3329 * sysdeps/i386/tls.h: Likewise.
3330 * sysdeps/ia64/tls.h: Likewise.
3331 * sysdeps/powerpc/tls.h: Likewise.
3332 * sysdeps/s390/tls.h: Likewise.
3333 * sysdeps/sh/tls.h: Likewise.
3334 * sysdeps/sparc/tls.h: Likewise.
3335 * sysdeps/x86_64/tls.h: Likewise.
3337 2004-12-27 Ulrich Drepper <drepper@redhat.com>
3339 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3341 2004-12-21 Jakub Jelinek <jakub@redhat.com>
3343 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3345 * Makefile (tests): Add tst-align2.
3346 * tst-align2.c: New test.
3347 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3348 -mpreferred-stack-boundary=4.
3350 2004-12-18 Roland McGrath <roland@redhat.com>
3352 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3353 New file removed withdrawn for the moment.
3355 2004-12-17 Richard Henderson <rth@redhat.com>
3357 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3358 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3360 2004-12-16 Ulrich Drepper <drepper@redhat.com>
3362 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3363 Increased PTHREAD_STACK_MIN.
3365 * tst-context1.c (stacks): Use bigger stack size.
3367 2004-12-16 Jakub Jelinek <jakub@redhat.com>
3369 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3370 * sysdeps/sparc/tcb-offsets.sym: Add TID.
3372 2004-12-15 Jakub Jelinek <jakub@redhat.com>
3374 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3375 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3376 * sysdeps/s390/tcb-offsets.sym (TID): Add.
3378 2004-12-15 Ulrich Drepper <drepper@redhat.com>
3380 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3382 2004-12-14 Ulrich Drepper <drepper@redhat.com>
3384 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3385 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3387 * tst-getpid1.c: If child crashes, report this first. Print which
3390 2004-12-09 Ulrich Drepper <drepper@redhat.com>
3392 * init.c (__pthread_initialize_minimal_internal): Also unblock
3395 2004-12-01 Jakub Jelinek <jakub@redhat.com>
3397 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3398 _POSIX_THREAD_CPUTIME): Define to 0.
3399 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3400 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3401 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3402 __timer_signal_thread_tclk): Remove.
3403 (init_module): Remove their initialization.
3404 (thread_cleanup): Remove their cleanup assertions.
3405 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3406 __timer_signal_thread_tclk): Remove.
3407 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3408 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3409 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3411 2004-12-07 Jakub Jelinek <jakub@redhat.com>
3413 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3414 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3416 * Makefile (tests): Add tst-getpid2.
3417 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3418 (do_test): Use it. Use __clone2 instead of clone on ia64.
3419 * tst-getpid2.c: New test.
3421 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3423 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3425 2004-12-04 Ulrich Drepper <drepper@redhat.com>
3427 * Makefile (tests): Add tst-getpid1.
3428 * tst-getpid1.c: New file.
3429 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3430 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3432 2004-12-02 Roland McGrath <roland@redhat.com>
3434 * Makefile (libpthread-nonshared): Variable removed.
3435 ($(objpfx)libpthread_nonshared.a): Target removed.
3436 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3437 These are now handled by generic magic from
3438 libpthread-static-only-routines being set.
3440 2004-11-27 Ulrich Drepper <drepper@redhat.com>
3442 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3443 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3444 _POSIX_THREAD_PRIO_PROTECT): Define.
3445 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3446 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3447 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3449 2004-11-26 Jakub Jelinek <jakub@redhat.com>
3451 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3452 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3453 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3454 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3455 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3456 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3457 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3459 2004-11-24 Ulrich Drepper <drepper@redhat.com>
3461 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3463 * Makefile (libpthread-routines): Add pthread_setschedprio.
3464 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3465 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3466 * pthread_setschedprio.c: New file.
3468 2004-11-20 Jakub Jelinek <jakub@redhat.com>
3470 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3471 * pthread_cancel.c (pthread_create): Likewise.
3473 * Makefile (libpthread-routines): Add vars.
3474 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3475 * init.c (__default_stacksize, __is_smp): Remove.
3477 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3478 and define a wrapper macro.
3479 (PTHREAD_STATIC_FN_REQUIRE): Define.
3480 * allocatestack.c (__find_thread_by_id): Undefine.
3481 * pthread_create (__pthread_keys): Remove.
3482 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3483 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3484 PTHREAD_STATIC_FN_REQUIRE.
3486 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3488 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3489 parameter to REGISTER macro.
3491 2004-11-17 Roland McGrath <roland@redhat.com>
3493 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3494 Make sure SIGCANCEL is blocked as well.
3496 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3498 * sysdeps/pthread/setxid.h: New file.
3499 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3500 (struct xid_command): Add forward decl.
3501 (struct pthread_functions): Change return type of __nptl_setxid hook
3503 * pthreadP.h (__nptl_setxid): Change return type to int.
3504 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3505 calling thread, return its return value and set errno on failure.
3506 * descr.h (struct xid_command): Change id type to long array.
3508 * Makefile: Add rules to build and test tst-setuid1 and
3510 * tst-setuid1.c: New test.
3511 * tst-setuid1-static.c: New test.
3513 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3515 * Makefile (tests): Add tst-exit3.
3516 * tst-exit3.c: New test.
3518 2004-11-09 Ulrich Drepper <drepper@redhat.com>
3520 * Makefile (tests): Add tst-exit2.
3521 * tst-exit2.c: New file.
3523 2004-11-09 Roland McGrath <roland@redhat.com>
3526 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3527 here, before calling clone.
3528 * pthread_create.c (start_thread): Don't do it here.
3530 2004-11-02 Jakub Jelinek <jakub@redhat.com>
3532 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3534 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3536 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3537 Set ETIMEDOUT to errno when time is up. Tweak to avoid
3540 2004-10-28 Jakub Jelinek <jakub@redhat.com>
3542 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3543 if sched_priority is not between minprio and maxprio.
3545 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3547 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3548 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3550 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3551 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3553 2004-10-24 Ulrich Drepper <drepper@redhat.com>
3555 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3556 not-cancelable I/O functions.
3558 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3560 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3561 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3562 make sure 2 is stored in the futex and we looked at the old value.
3563 Fix a few other problems to return the correct value.
3565 2004-10-14 Richard Henderson <rth@redhat.com>
3567 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3570 2004-10-06 Jakub Jelinek <jakub@redhat.com>
3572 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3573 of pthread-functions.h and pthreaddef.h.
3574 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3576 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3577 Change __data.__nwaiters from int to unsigned int.
3579 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3580 sysconf (_SC_THREAD_CPUTIME) returns negative value.
3582 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3585 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3586 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3588 2004-10-06 Ulrich Drepper <drepper@redhat.com>
3590 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
3591 test fails, remove message queue.
3592 (tf_msgsnd): Likewise.
3594 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3596 * tst-clock1.c: Change #ifdef to #if defined.
3597 * tst-clock2.c: Likewise.
3598 * tst-cond11.c: Likewise.
3600 * sysdeps/pthread/timer_create.c (timer_create): Use
3601 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3602 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3605 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3607 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3608 _POSIX_THREAD_CPUTIME): Define to 0.
3610 2004-10-04 Ulrich Drepper <drepper@redhat.com>
3612 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3613 and _POSIX_THREAD_CPUTIME to zero.
3614 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3615 * tst-barrier2.c: Fix testing for POSIX feature.
3616 * tst-clock1.c: Likewise.
3617 * tst-clock2.c: Likewise.
3618 * tst-cond11.c: Likewise.
3619 * tst-cond4.c: Likewise.
3620 * tst-cond6.c: Likewise.
3621 * tst-flock2.c: Likewise.
3622 * tst-mutex4.c: Likewise.
3623 * tst-mutex9.c: Likewise.
3624 * tst-rwlock12.c: Likewise.
3625 * tst-rwlock4.c: Likewise.
3626 * tst-signal1.c: Likewise.
3627 * tst-spin2.c: Likewise.
3628 * sysdeps/pthread/posix-timer.h: Likewise.
3629 * sysdeps/pthread/timer_create.c: Likewise.
3630 * sysdeps/pthread/timer_routines.c: Likewise.
3632 2004-10-01 Ulrich Drepper <drepper@redhat.com>
3634 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3635 (__lll_mutex_timedlock_wait): Address futex correctly.
3637 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3638 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3639 make sure 2 is stored in the futex and we looked at the old value.
3640 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3641 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
3642 which might very well made the code not working at all before.
3645 2004-09-28 Ulrich Drepper <drepper@redhat.com>
3647 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3648 allow SIGSETXID to be sent.
3649 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3650 for SIGSETXID to be defined.
3651 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3652 SIGSETXID cannot be blocked.
3654 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3655 Add __extension__ to long long types.
3656 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3657 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3658 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3659 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3660 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3661 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3662 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3664 2004-09-25 Ulrich Drepper <drepper@redhat.com>
3666 * descr.h (struct pthread): Add stopped_start field.
3667 * sysdeps/pthread/createthread.c (create_thread): Set
3668 start_stopped flag in descriptor for new thread appropriately.
3669 * pthread_create.c (start_thread): Only take lock to be stopped on
3670 startup if stopped_start flag says so.
3672 2004-09-24 Ulrich Drepper <drepper@redhat.com>
3674 * pthread_create.c (__pthread_create_2_1): Remember whether thread
3675 is created detached and if yes, do not try to free the stack in case
3676 the thread creation failed.
3677 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3678 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3679 case there has been no error. [BZ #405]
3681 * pthread_create.c (start_thread): Don't wait for scheduler data
3682 etc to be set at the beginning of the function. The cancellation
3683 infrastructure must have been set up. And enable async
3684 cancellation before potentially going to sleep. [BZ #401]
3686 2004-09-20 Ulrich Drepper <drepper@redhat.com>
3688 * Versions: Remove exports for pthread_set*id_np functions.
3689 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3691 * Makefile: Don't build pthread_set*id code for now.
3693 2004-09-19 Ulrich Drepper <drepper@redhat.com>
3695 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3697 * allocatestack.c (__nptl_setxid): New function.
3698 * descr.h (struct xid_command): Define type.
3699 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3700 (sighandler_setxid): New function.
3701 (__pthread_initialize_minimal): Register sighandler_setxid for
3703 * pt-allocrtsig.c: Update comment.
3704 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
3705 Declare __nptl_setxid.
3706 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3707 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3708 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3709 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3710 and pthread_setresuid_np.
3711 * pthread_setgid_np.c: New file.
3712 * pthread_setuid_np.c: New file.
3713 * pthread_setegid_np.c: New file.
3714 * pthread_seteuid_np.c: New file.
3715 * pthread_setregid_np.c: New file.
3716 * pthread_setreuid_np.c: New file.
3717 * pthread_setresgid_np.c: New file.
3718 * pthread_setresuid_np.c: New file.
3719 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3720 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3721 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3722 and pthread_setresuid_np.
3723 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3724 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3725 pthread_setregid, and pthread_setresgid.
3727 2004-09-18 Ulrich Drepper <drepper@redhat.com>
3729 * allocatestack.c (allocate_stack): Return EAGAIN instead of
3730 ENOMEM when out of memory.
3732 2004-09-10 Roland McGrath <roland@redhat.com>
3735 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3736 code, since we don't try to use the broken CLONE_STOPPED any more.
3737 * pthread_create.c (start_thread): Likewise.
3739 2004-09-15 Richard Henderson <rth@redhat.com>
3741 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3743 2004-09-01 David Mosberger <davidm@hpl.hp.com>
3745 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3746 (__libc_unwind_longjmp): Delete macro and declare as function.
3747 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3748 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3750 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3751 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3752 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3754 2004-09-12 Ulrich Drepper <drepper@redhat.com>
3756 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3758 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3759 types also for __USE_XOPEN2K.
3760 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3761 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3762 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3763 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3764 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3765 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3766 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3769 2004-09-08 Ulrich Drepper <drepper@redhat.com>
3771 * sysdeps/pthread/pthread.h
3772 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3773 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3774 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3775 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3778 2004-09-07 Ulrich Drepper <drepper@redhat.com>
3780 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3781 PSEUDO to be used with . prefix.
3783 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3784 Use atomic_increment instead of atomic_exchange_and_add.
3785 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3787 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3789 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3792 * allocatestack.c (allocate_stack): Use atomic_increment_val
3793 instead of atomic_exchange_and_add.
3794 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3795 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3797 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3800 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3801 the initialization function might throw.
3803 2005-09-05 Richard Henderson <rth@redhat.com>
3805 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3806 Move definition inside libpthread, libc, librt check. Provide
3807 definition for rtld.
3809 2004-09-02 Ulrich Drepper <drepper@redhat.com>
3811 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3812 * sysdeps/i386/jmpbuf-unwind.h: Likewise
3813 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3814 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3815 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3816 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3817 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3818 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3821 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3822 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3823 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3825 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3826 Decrement __nwaiters. If pthread_cond_destroy has been called and
3827 this is the last waiter, signal pthread_cond_destroy caller and
3828 avoid using the pthread_cond_t structure after unlock.
3829 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3830 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3831 Read clock type from the least significant bits of __nwaiters instead
3833 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3834 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3836 2004-08-31 Jakub Jelinek <jakub@redhat.com>
3839 * Makefile (tests): Add tst-cond20 and tst-cond21.
3840 * tst-cond20.c: New test.
3841 * tst-cond21.c: New test.
3842 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3843 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3845 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3847 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3848 (pthread_cond_t): Likewise.
3849 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3851 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3853 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3855 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3856 (cond_nwaiters): New.
3858 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3859 if there are waiters not signalled yet.
3860 Wait until all already signalled waiters wake up.
3861 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3862 __nwaiters. If pthread_cond_destroy has been called and this is the
3863 last waiter, signal pthread_cond_destroy caller and avoid using
3864 the pthread_cond_t structure after unlock.
3865 (__pthread_cond_wait): Increment __nwaiters in the beginning,
3866 decrement it when leaving. If pthread_cond_destroy has been called
3867 and this is the last waiter, signal pthread_cond_destroy caller.
3868 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3869 Likewise. Read clock type from the least significant bits of
3870 __nwaiters instead of __clock.
3871 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3872 whether clock ID can be encoded in COND_CLOCK_BITS bits.
3873 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3874 clock type just from the last COND_CLOCK_BITS bits of value.
3875 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3876 instead of __clock, just from second bit of condattr's value.
3878 2004-08-30 Jakub Jelinek <jakub@redhat.com>
3880 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3881 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
3883 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3885 2004-08-15 Roland McGrath <roland@frob.com>
3887 * pthread_atfork.c: Update copyright terms including special exception
3888 for these trivial files, which are statically linked into executables
3889 that use dynamic linking for the significant library code.
3891 2004-08-09 Jakub Jelinek <jakub@redhat.com>
3893 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3894 pthread_rwlock_rdlock.
3895 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3896 Decrease __nr_readers_queued after reacquiring lock.
3897 * sysdeps/pthread/pthread_rwlock_timedrdlock
3898 (pthread_rwlock_timedrdlock): Likewise.
3899 Reported by Bob Cook <bobcook47@hotmail.com>.
3901 2004-08-11 Jakub Jelinek <jakub@redhat.com>
3903 * tst-rwlock14.c (tf): Read main thread handle from *ARG
3904 before pthread_barrier_wait.
3906 2004-08-07 Ulrich Drepper <drepper@redhat.com>
3908 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3909 Remove unnecessary exception handling data.
3911 2004-07-23 Jakub Jelinek <jakub@redhat.com>
3914 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3915 instead of clockid_t.
3917 2004-07-21 Roland McGrath <roland@redhat.com>
3919 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
3921 2004-07-19 Roland McGrath <roland@redhat.com>
3923 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
3925 2004-07-02 Roland McGrath <roland@redhat.com>
3927 * configure: Don't exit.
3929 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3931 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3932 (__pthread_cond_timedwait): Check for invalid nanosecond in
3935 2004-07-07 Ulrich Drepper <drepper@redhat.com>
3937 * Makefile: Add rules to build and run tst-fini1.
3938 * tst-fini1.c: New file.
3939 * tst-fini1mod.c: New file.
3941 2004-07-05 Ulrich Drepper <drepper@redhat.com>
3943 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
3944 if no cancellation support is needed.
3945 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3946 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3947 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3948 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3949 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3950 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3951 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3952 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3953 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3955 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
3956 only if not already defined.
3958 2004-07-05 Jakub Jelinek <jakub@redhat.com>
3960 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
3961 constraint "m" instead of "0" for futex.
3963 * shlib-versions: Add powerpc64-.*-linux.*.
3965 2004-07-04 Jakub Jelinek <jakub@redhat.com>
3967 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
3968 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
3970 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
3971 1 billion and 64-bit tv_nsec which is valid when truncated to 32
3974 2004-06-29 Roland McGrath <roland@redhat.com>
3976 * Banner: NPTL no longer has its own version number.
3977 * Makefile (nptl-version): Variable removed.
3978 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
3979 using $(version), the glibc version number.
3981 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3983 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
3984 Fix branch offset for a PLT entry.
3985 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
3987 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3989 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
3991 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
3994 2004-06-28 Jakub Jelinek <jakub@redhat.com>
3996 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
3999 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4001 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4002 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4004 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4005 (pthread_rwlock_timedrdlock): Likewise.
4007 2004-06-22 Jakub Jelinek <jakub@redhat.com>
4009 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4010 Set __r7 to val, not mutex.
4012 2004-06-27 Ulrich Drepper <drepper@redhat.com>
4014 * Makefile: Add rules to build tst-rwlock14.
4015 * tst-rwlock14.c: New file.
4017 2004-06-24 Boris Hu <boris.hu@intel.com>
4019 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4021 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4023 2004-06-19 Andreas Jaeger <aj@suse.de>
4025 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4026 assembler in last patch.
4028 2004-06-17 Ulrich Drepper <drepper@redhat.com>
4030 * sysdeps/pthread/pthread_cond_timedwait.c
4031 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4032 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4033 (__pthread_cond_timedwait): Check for invalid nanosecond in
4035 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4036 * tst-cond19.c: New file.
4037 * Makefile: Add rules to build and run tst-cond19.
4039 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
4041 * tst-context1.c (GUARD_PATTERN): Defined.
4042 (tst_context_t): Define struct containing ucontext_t & guard words.
4043 (ctx): Declare as an array of tst_context_t.
4044 (fct): Verify uc_link & guard words are still valid.
4045 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
4047 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4049 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4050 Add __data.__futex field, reshuffle __data.__clock.
4051 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4052 (__pthread_cond_signal): Increment __futex at the same time as
4053 __wakeup_seq or __total_seq. Pass address of __futex instead of
4054 address of low 32-bits of __wakeup_seq to futex syscall.
4055 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4056 (__pthread_cond_wait): Likewise. Pass __futex value from before
4057 releasing internal lock to FUTEX_WAIT.
4058 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4059 (__pthread_cond_timedwait): Likewise.
4060 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4061 (FUTEX_CMP_REQUEUE): Define.
4062 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4063 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4064 Pass __futex value from before the unlock and __futex address instead
4065 of address of low 32-bits of __wakeup_seq to futex syscall.
4066 Fallback to FUTEX_WAKE all on any errors.
4068 2004-06-08 Jakub Jelinek <jakub@redhat.com>
4070 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4072 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4073 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4074 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4075 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4076 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
4078 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
4080 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4081 Add memory clobber to inline assembly.
4082 (__lll_mutex_trylock): Likewise.
4083 (__lll_mutex_cond_trylock): Likewise.
4085 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
4087 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4088 Pass val argument as 6th system call argument in %r7.
4090 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4092 * Makefile (tests): Add tst-cond16.
4093 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4094 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4095 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4096 Add __data.__futex field, reshuffle __data.__clock.
4097 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4098 (__pthread_cond_signal): Increment __futex at the same time as
4099 __wakeup_seq or __total_seq. Pass address of __futex instead of
4100 address of low 32-bits of __wakeup_seq to futex syscall.
4101 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4102 (__pthread_cond_wait): Likewise. Pass __futex value from before
4103 releasing internal lock to FUTEX_WAIT.
4104 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4105 (__pthread_cond_timedwait): Likewise.
4106 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4107 (FUTEX_CMP_REQUEUE): Define.
4108 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4109 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4110 Pass __futex value from before the unlock and __futex address instead
4111 of address of low 32-bits of __wakeup_seq to futex syscall.
4112 Fallback to FUTEX_WAKE all on any errors.
4113 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4115 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4116 internally. Return non-zero if error, zero if success.
4117 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4118 Add __data.__futex field, reshuffle __data.__clock.
4119 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4121 (lll_futex_requeue): Add val argument, return 1 unconditionally
4123 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4124 Add __data.__futex field, reshuffle __data.__clock.
4125 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4127 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4128 internally. Return non-zero if error, zero if success.
4129 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4130 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4131 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4133 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4134 internally. Return non-zero if error, zero if success.
4135 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4136 Add __data.__futex field, reshuffle __data.__clock.
4137 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4139 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4140 internally. Return non-zero if error, zero if success.
4141 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4142 Add __data.__futex field, reshuffle __data.__clock.
4143 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4144 Add __data.__futex field, reshuffle __data.__clock.
4145 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4146 Increment __futex at the same time as __wakeup_seq or __total_seq.
4147 Pass address of __futex instead of address of low 32-bits of
4148 __wakeup_seq to futex syscall.
4149 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4150 Pass __futex value from before releasing internal lock
4152 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4153 Likewise. Avoid unnecessary shadowing of variables.
4154 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4155 Set __futex to 2 * __total_seq. Pass __futex value from before the
4156 unlock and __futex address instead of address of low 32-bits of
4157 __wakeup_seq to futex_requeue macro, adjust for new return value
4159 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4160 (__pthread_cond_signal): Increment __futex at the same time as
4161 __wakeup_seq or __total_seq. Pass address of __futex instead of
4162 address of low 32-bits of __wakeup_seq to futex syscall.
4163 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4164 (__pthread_cond_wait): Likewise. Pass __futex value from before
4165 releasing internal lock to FUTEX_WAIT.
4166 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4167 (__pthread_cond_timedwait): Likewise.
4168 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4169 (FUTEX_CMP_REQUEUE): Define.
4170 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4171 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4172 Pass __futex value from before the unlock and __futex address instead
4173 of address of low 32-bits of __wakeup_seq to futex syscall.
4174 Fallback to FUTEX_WAKE all on any errors.
4176 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4178 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4179 Add nop to align the end of critical section.
4180 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4182 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4184 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4185 Add __broadcast_seq field.
4186 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4187 all waiters as woken with woken_seq and bump broadcast counter.
4188 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4189 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
4190 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4191 Comment typo fixes. Avoid returning -ETIMEDOUT.
4193 2004-06-01 Ulrich Drepper <drepper@redhat.com>
4195 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4196 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4197 Reported by Kaz Kojima.
4199 2004-05-25 Jakub Jelinek <jakub@redhat.com>
4201 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4203 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4205 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4206 __broadcast_seq with bc_seq after acquiring internal lock instead of
4209 2004-05-18 Jakub Jelinek <jakub@redhat.com>
4211 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4213 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4214 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4215 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4216 (pthread_cond_t): Add __data.__broadcast_seq field.
4217 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4218 (FRAME_SIZE): Define.
4219 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
4221 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4223 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
4225 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4226 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
4229 2004-05-18 Ulrich Drepper <drepper@redhat.com>
4231 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4232 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4233 Add __broadcast_seq field.
4234 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4235 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4236 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4237 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4238 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4239 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4240 all waiters as woken with woken_seq and bump broadcast counter.
4241 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4242 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4243 __broadcast_seq field.
4244 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4245 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4246 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4247 * pthread_cond_init.c: Initialize __broadcast_seq field.
4248 * Makefile (tests): Add tst-cond17 and tst-cond18.
4249 Add .NOTPARALLEL goal.
4250 * tst-cond16.c: New file. From Jakub.
4251 * tst-cond17.c: New file. From Jakub.
4252 * tst-cond18.c: New file. From Jakub.
4254 2004-05-16 Ulrich Drepper <drepper@redhat.com>
4256 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4259 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4260 Parametrize frame size. Correct some unwind info.
4261 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4263 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4265 * tst-stack3.c: Note testing functionality beyond POSIX.
4267 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4269 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4270 Change conditional from ifdef to if.
4272 2004-04-23 Jakub Jelinek <jakub@redhat.com>
4274 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4275 SYSDEP_CANCEL_ERROR): Define.
4278 2004-05-01 Jakub Jelinek <jakub@redhat.com>
4280 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4282 2004-04-20 Jakub Jelinek <jakub@redhat.com>
4284 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4286 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4288 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4289 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4290 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4291 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4293 2004-04-19 Ulrich Drepper <drepper@redhat.com>
4295 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4296 thread has all signals blocked.
4298 2004-04-18 Andreas Jaeger <aj@suse.de>
4300 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4301 (SEM_VALUE_MAX): Add missing brace.
4303 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4305 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4307 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4308 * sysdeps/pthread/tst-mqueue8x.c: New test.
4309 * tst-cancel4.c: Update comment about message queues.
4311 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4312 return it_value { 0, 0 }.
4313 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4315 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4316 assertion for SIGEV_NONE.
4317 (thread_attr_compare): Compare all attributes, not just a partial
4320 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4322 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4324 2004-04-17 Ulrich Drepper <drepper@redhat.com>
4326 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4327 Just use a plain number.
4328 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4329 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4330 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4331 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4332 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4333 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4334 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4336 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4338 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4340 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4342 2004-04-15 Jakub Jelinek <jakub@redhat.com>
4344 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4345 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4346 of calling sigwaitinfo.
4348 2004-04-16 Ulrich Drepper <drepper@redhat.com>
4350 * allocatestack.c (allocate_stack): Set reported_guardsize
4352 * pthread_getattr_np.c (pthread_getattr_np): Use
4353 reported_guardsize instead of guardsize.
4354 * descr.h (struct pthread): Add reported_guardsize field.
4356 2004-04-13 Jakub Jelinek <jakub@redhat.com>
4358 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4360 2004-04-12 Ulrich Drepper <drepper@redhat.com>
4362 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4364 2004-04-08 Jakub Jelinek <jakub@redhat.com>
4366 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4367 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4368 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4369 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4370 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4372 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4373 (_POSIX_MESSAGE_PASSING): Define.
4374 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4375 (_POSIX_MESSAGE_PASSING): Define.
4376 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4377 (_POSIX_MESSAGE_PASSING): Define.
4379 2004-04-04 Ulrich Drepper <drepper@redhat.com>
4381 * tst-context1.c (fct): Check whether correct stack is used.
4383 2004-04-03 Ulrich Drepper <drepper@redhat.com>
4385 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4386 matching constraints for asm mem parameters.
4388 * tst-clock2.c (tf): Don't define unless needed.
4390 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
4392 * Makefile (link-libc-static): Use $(static-gnulib) instead of
4395 2004-03-30 Ulrich Drepper <drepper@redhat.com>
4397 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4398 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4399 * pthreadP.h: Declare __nptl_deallocate_tsd.
4400 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4403 * Makefile (tests): Add tst-tsd5.
4404 * tst-tsd5.c: New file.
4406 2004-03-29 Ulrich Drepper <drepper@redhat.com>
4408 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4409 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4410 is SHLIB_COMPAT check.
4411 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4412 (__pthread_attr_getaffinity_old): Likewise.
4413 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4414 (__pthread_getaffinity_old): Likewise.
4415 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4416 (__pthread_setaffinity_old): Likewise.
4418 2004-03-26 Ulrich Drepper <drepper@redhat.com>
4420 * allocatestack.c (_make_stacks_executable): Call
4421 _dl_make_stack_executable first.
4423 2004-03-24 Roland McGrath <roland@redhat.com>
4425 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4426 constraint instead of "0".
4428 2004-03-24 Ulrich Drepper <drepper@redhat.com>
4430 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4431 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4433 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4434 code to avoid warning.
4436 2004-03-24 Andreas Jaeger <aj@suse.de>
4438 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4439 (__pthread_attr_setaffinity_old): Remove const.
4441 2004-03-23 Ulrich Drepper <drepper@redhat.com>
4443 * sysdeps/unix/sysv/linux/smp.h: New file.
4444 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4445 * init.c: Define __is_smp.
4446 (__pthread_initialize_minimal_internal): Call is_smp_system to
4447 initialize __is_smp.
4448 * pthreadP.h: Declare __is_smp.
4449 Define MAX_ADAPTIVE_COUNT is necessary.
4450 * pthread_mutex_init.c: Add comment regarding __spins field.
4451 * pthread_mutex_lock.c: Implement adaptive mutex type.
4452 * pthread_mutex_timedlock.c: Likewise.
4453 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4454 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4456 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4457 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4458 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4459 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4460 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4461 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4462 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4463 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4464 lll_mutex_cond_trylock.
4465 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4466 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4467 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4468 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4469 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4470 Define BUSY_WAIT_NOP.
4471 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4472 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4474 * tst-mutex5.c: Add support for testing adaptive mutexes.
4475 * tst-mutex7.c: Likewise.
4476 * tst-mutex5a.c: New file.
4477 * tst-mutex7a.c: New file.
4478 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4480 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4481 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4482 vgettimeofday call might destroy the content.
4484 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4487 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4488 No need to restrict type of ret. Make it int. Add comment.
4490 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4491 Remove unnecessary setne instruction.
4493 2004-03-22 Jakub Jelinek <jakub@redhat.com>
4495 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4496 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4497 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4498 If realloc fails, break out of the loop.
4500 2004-03-20 Andreas Jaeger <aj@suse.de>
4502 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4503 (__pthread_setaffinity_old): Fix interface.
4504 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4505 (__pthread_getaffinity_old): Likewise.
4507 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4508 (__pthread_setaffinity_new): Remove duplicate declaration.
4510 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4512 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4513 the return value to a safe register.
4514 (CDISABLE): Set the function argument correctly.
4516 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4518 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4519 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4520 Rewrite so that only one locked memory operation per round is needed.
4521 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4522 (pthread_barrier_wait): After wakeup, release lock only when the
4523 last thread stopped using the barrier object.
4524 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4525 (__pthread_cond_wait): Don't store mutex address if the current
4526 value is ~0l. Add correct cleanup support and unwind info.
4527 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4528 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4529 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4530 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4531 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4532 Add correct cleanup support and unwind info.
4533 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4534 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4535 information for syscall wrappers.
4537 2004-03-18 Ulrich Drepper <drepper@redhat.com>
4539 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4540 cpusetsize field, remove next.
4541 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4542 parameter for size of the CPU set.
4543 (pthread_setaffinity_np): Likewise.
4544 (pthread_attr_getaffinity_np): Likewise.
4545 (pthread_attr_setaffinity_np): Likewise.
4546 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4547 interface change, keep compatibility code.
4548 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4549 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4550 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4551 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
4552 __pthread_getaffinity_np.
4553 * Versions: Add version for changed interfaces.
4554 * tst-attr3.c: Adjust test for interface change.
4555 * pthread_getattr_np.c: Query the kernel about the affinity mask with
4556 increasing buffer sizes.
4557 * pthread_attr_destroy.c: Remove unused list handling.
4558 * pthread_attr_init.c: Likewise.
4560 2004-03-17 Roland McGrath <roland@redhat.com>
4562 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4563 first argument to clock_getres so we ever enable kernel timers.
4565 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
4567 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4569 2004-03-12 Richard Henderson <rth@redhat.com>
4571 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4572 oldvalue from CENABLE to CDISABLE.
4574 2004-03-12 Ulrich Drepper <drepper@redhat.com>
4576 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4577 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4578 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4579 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4581 2004-03-11 Richard Henderson <rth@redhat.com>
4583 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4584 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4585 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4587 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4589 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4590 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4591 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4593 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4595 * forward.c (__pthread_cond_broadcast_2_0,
4596 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4597 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4598 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4600 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4602 * sysdeps/sh/tcb-offsets.sym: Add PID.
4603 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4604 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4606 2004-03-10 Ulrich Drepper <drepper@redhat.com>
4608 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4609 include <sysdep-cancel.h>, vfork is no cancellation point.
4610 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4611 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4612 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4614 2004-03-10 Jakub Jelinek <jakub@redhat.com>
4616 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4618 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4619 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4621 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4623 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4624 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4625 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4626 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4627 of DO_CALL_VIA_BREAK. Work around a gas problem.
4629 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4630 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4631 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4632 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4633 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4634 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4636 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4637 a local register for saving old PID. Negate PID in parent upon exit.
4639 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4641 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4642 before syscall, set to the old value in the parent afterwards.
4643 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4644 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4646 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4647 before syscall, set to the old value in the parent afterwards.
4648 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4649 * sysdeps/s390/tcb-offsets.sym: Add PID.
4651 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4652 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4653 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4654 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4655 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4656 * sysdeps/sparc/tcb-offsets.sym: Add PID.
4658 2004-03-10 Andreas Schwab <schwab@suse.de>
4660 * sysdeps/ia64/tcb-offsets.sym: Add PID.
4661 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4662 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4664 2004-03-09 Jakub Jelinek <jakub@redhat.com>
4666 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4667 * tst-cancel21.c (do_one_test): Likewise.
4668 Reported by Gordon Jin <gordon.jin@intel.com>.
4670 2004-02-09 Jakub Jelinek <jakub@redhat.com>
4672 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4673 if non-zero and set to INT_MIN if zero.
4674 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4675 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4676 (SAVE_PID, RESTORE_PID): Define.
4678 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4679 Use relative path to avoid including NPTL i386/vfork.S.
4680 (SAVE_PID, RESTORE_PID): Define.
4681 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4682 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4683 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4685 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4686 * tst-vfork1.c: New test.
4687 * tst-vfork2.c: New test.
4688 * tst-vfork1x.c: New test.
4689 * tst-vfork2x.c: New test.
4691 2004-03-08 Ulrich Drepper <drepper@redhat.com>
4693 * sysdeps/i386/tcb-offsets.sym: Add PID.
4694 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4695 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4696 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4698 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
4700 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4702 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
4704 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4707 2004-03-07 Ulrich Drepper <drepper@redhat.com>
4709 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4712 * tst-once4.c: Remove unnecessary macro definition.
4714 * tst-mutex7.c (do_test): Limit thread stack size.
4715 * tst-once2.c (do_test): Likewise.
4716 * tst-tls3.c (do_test): Likewise.
4717 * tst-tls1.c (do_test): Likewise.
4718 * tst-signal3.c (do_test): Likewise.
4719 * tst-kill6.c (do_test): Likewise.
4720 * tst-key4.c (do_test): Likewise.
4721 * tst-join4.c (do_test): Likewise.
4722 * tst-fork1.c (do_test): Likewise.
4723 * tst-context1.c (do_test): Likewise.
4724 * tst-cond2.c (do_test): Likewise.
4725 * tst-cond10.c (do_test): Likewise.
4726 * tst-clock2.c (do_test): Likewise.
4727 * tst-cancel10.c (do_test): Likewise.
4728 * tst-basic2.c (do_test): Likewise.
4729 * tst-barrier4.c (do_test): Likewise.
4731 2004-03-05 Ulrich Drepper <drepper@redhat.com>
4733 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4735 2004-03-01 Ulrich Drepper <drepper@redhat.com>
4737 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4738 (__pthread_cond_timedwait): Optimize wakeup test.
4739 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4740 (__pthread_cond_wait): Likewise.
4741 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4742 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4745 2004-02-29 Ulrich Drepper <drepper@redhat.com>
4747 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4748 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
4749 the atomic instruction needed.
4750 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4751 (__lll_mutex_lock_wait): Likewise.
4753 2004-02-28 Ulrich Drepper <drepper@redhat.com>
4755 * Makefile (tests): Add tst-cond14 and tst-cond15.
4756 * tst-cond14.c: New file.
4757 * tst-cond15.c: New file.
4759 2004-02-27 Ulrich Drepper <drepper@redhat.com>
4761 * sysdeps/pthread/createthread.c (create_thread): Remove use of
4762 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
4763 needs to be implemented differently to be useful.
4765 2004-02-26 Ulrich Drepper <drepper@redhat.com>
4767 * pthread_attr_setschedparam.c: Don't test priority against limits
4768 here. Set ATTR_FLAG_SCHED_SET flag.
4769 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4770 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4771 from parent thread to child. If attribute is used and scheduling
4772 parameters are not inherited, copy parameters from attribute or
4773 compute them. Check priority value.
4774 * pthread_getschedparam.c: If the parameters aren't known yet get
4775 them from the kernel.
4776 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4777 ATTR_FLAG_POLICY_SET flag for thread.
4778 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4779 and ATTR_FLAG_POLICY_SET.
4781 * sysdeps/pthread/createthread.c: Use tgkill if possible.
4783 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4784 fail if stack address hasn't been set. Just return 0.
4786 2004-02-25 Ulrich Drepper <drepper@redhat.com>
4788 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
4789 libpthread for the files in this list.
4790 (CFLAGS-tst-unload): Removed.
4791 * tst-unload.c (do_test): Don't use complete path for
4794 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4797 2004-02-22 Ulrich Drepper <drepper@redhat.com>
4799 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4800 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4801 operation per round is needed.
4802 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4803 (__lll_mutex_lock_wait): Likewise.
4805 2004-02-20 Ulrich Drepper <drepper@redhat.com>
4807 * tst-cancel9.c (cleanup): Don't print to stderr.
4809 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4811 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4813 2004-02-20 Jakub Jelinek <jakub@redhat.com>
4815 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4816 (__syscall_error_handler2): Call CDISABLE.
4817 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4818 (__syscall_error_handler2): Call CDISABLE.
4820 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4821 Release lock before the loop, don't reacquire it.
4823 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4825 2004-02-19 Andreas Schwab <schwab@suse.de>
4827 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4830 2004-02-18 Ulrich Drepper <drepper@redhat.com>
4832 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4833 (pthread_barrier_wait): After wakeup, release lock only when the
4834 last thread stopped using the barrier object.
4835 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4836 (pthread_barrier_wait): Likewise.
4837 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4839 * Makefile (tests): Add tst-barrier4.
4840 * tst-barrier4.c: New file.
4842 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4843 (__pthread_cond_timedwait): Perform timeout test while holding
4844 internal lock to prevent wakeup race.
4845 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4846 * sysdeps/pthread/pthread_cond_timedwait.c
4847 (__pthread_cond_timedwait): Likewise.
4848 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4849 (__pthread_cond_timedwait): Likewise.
4851 2004-02-18 Jakub Jelinek <jakub@redhat.com>
4853 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4854 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4855 * Makefile (tests): Add tst-rwlock13.
4856 * tst-rwlock13.c: New test.
4858 2004-02-16 Ulrich Drepper <drepper@redhat.com>
4860 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4861 (__condvar_tw_cleanup): Little optimization.
4862 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4864 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
4866 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4867 libpthread as "lib" parameter to SHLIB_COMPAT.
4868 (__novmx_siglongjmp): Fix typo in function name.
4869 (__novmx_longjmp): Fix typo in function name.
4871 2004-02-13 Ulrich Drepper <drepper@redhat.com>
4873 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4876 * sysdeps/generic/pt-longjmp.c: Moved to...
4877 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
4879 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
4881 * Makefile (libpthread-routines): Add pt-cleanup.
4882 * pt-longjmp.c: Removed.
4883 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4884 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4885 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4886 Version longjmp, siglongjmp for GLIBC_2.3.4.
4887 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4889 2004-02-13 Ulrich Drepper <drepper@redhat.com>
4891 * sysdeps/pthread/pthread_cond_timedwait.c
4892 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
4893 Reuse code. Add __builtin_expects.
4895 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4896 (__pthread_cond_timedwait): Get internal lock in case timeout has
4897 passed before the futex syscall.
4898 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4900 2004-01-20 Ulrich Drepper <drepper@redhat.com>
4902 * allocatestack.c: Pretty printing.
4904 * sysdeps/pthread/createthread.c (create_thread): Don't add
4905 CLONE_DETACHED bit if it is not necessary.
4907 2004-01-16 Ulrich Drepper <drepper@redhat.com>
4909 * pthread_getattr_np.c: Include ldsodefs.h.
4911 2004-01-16 Richard Henderson <rth@redhat.com>
4913 * allocatestack.c: Don't declare __libc_stack_end.
4914 * init.c (__pthread_initialize_minimal_internal): Likewise.
4915 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
4917 2004-01-15 Richard Henderson <rth@redhat.com>
4919 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4920 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
4921 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
4922 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
4923 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
4924 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
4925 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
4926 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
4928 2004-01-14 Ulrich Drepper <drepper@redhat.com>
4930 * init.c (pthread_functions): Make array const.
4932 2004-01-13 Ulrich Drepper <drepper@redhat.com>
4934 * allocatestack.c (__make_stacks_executable): Change interface.
4935 Check parameters. Pass parameter on to libc counterpart.
4936 * pthreadP.h: Change declaration.
4938 2004-01-13 Richard Henderson <rth@redhat.com>
4940 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
4942 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
4945 * sysdeps/alpha/Makefile: New file.
4946 * sysdeps/alpha/tcb-offsets.sym: New file.
4947 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4948 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
4950 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
4953 2004-01-08 Jakub Jelinek <jakub@redhat.com>
4955 * Makefile (tests): Add tst-backtrace1.
4956 * tst-backtrace1.c: New test.
4958 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
4960 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
4961 register as second parameter to the REGISTER macro.
4962 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
4963 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
4964 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
4965 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
4966 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
4967 of thread register as second parameter to REGISTER macro in 64 case.
4969 2004-01-03 Ulrich Drepper <drepper@redhat.com>
4971 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
4972 (CFLAGS-getpid.o): Defined.
4973 (CFLAGS-getpid.os): Defined.
4975 2003-12-31 Ulrich Drepper <drepper@redhat.com>
4977 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
4978 returned for main thread does not overlap with any other VMA.
4979 Patch by Jakub Jelinek.
4981 2003-12-29 Jakub Jelinek <jakub@redhat.com>
4983 * tst-raise1.c: Include stdio.h.
4985 2003-12-23 Jakub Jelinek <jakub@redhat.com>
4987 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
4988 setting with __ASSUME_TGKILL || defined __NR_tgkill.
4989 If pid is 0, set it to selftid.
4990 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
4991 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
4992 != 0, return self->tid without doing a syscall.
4993 * descr.h (struct pthread): Move pid field after tid.
4995 * Makefile (tests): Add tst-raise1.
4996 * tst-raise1.c: New file.
4998 2003-12-23 Roland McGrath <roland@redhat.com>
5000 * tst-oddstacklimit.c: New file.
5001 * Makefile (tests): Add it.
5002 (tst-oddstacklimit-ENV): New variable.
5004 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5005 value up to page size for __default_stacksize.
5007 2003-12-21 Ulrich Drepper <drepper@redhat.com>
5009 * Makefile (tests): Add tst-eintr5.
5010 * tst-eintr5.c: New file.
5012 * eintr.c (eintr_source): Prevent sending signal to self.
5014 * tst-eintr2.c (tf1): Improve error message.
5016 2003-12-20 Ulrich Drepper <drepper@redhat.com>
5018 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5019 * sysdeps/unix/sysv/linux/getpid.c: New file.
5020 * pthread_cancel.c: Add comment explaining use of PID field.
5021 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5022 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5023 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5024 temporarily to signal the field must not be relied on and updated
5026 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5027 temporarily negative.
5028 * sysdeps/unix/sysv/linux/raise.c: Likewise.
5030 2003-12-19 Ulrich Drepper <drepper@redhat.com>
5032 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
5033 (eintr_source): If ARG != NULL, use pthread_kill.
5034 * tst-eintr1.c: Adjust for this change.
5035 * tst-eintr2.c: Likewise.
5036 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5037 * tst-eintr3.c: New file.
5038 * tst-eintr4.c: New file.
5040 2003-12-19 Jakub Jelinek <jakub@redhat.com>
5042 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5043 if CANCELSTATE_BITMASK is set.
5044 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5047 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5048 (tests-reverse): Add tst-cancel23.
5049 * tst-cancel22.c: New test.
5050 * tst-cancel23.c: New test.
5052 2003-12-18 Ulrich Drepper <drepper@redhat.com>
5054 * tst-eintr1.c: Better error messages.
5056 * Makefile (tests): Add tst-eintr2.
5057 * tst-eintr2.c: New file.
5059 2003-12-18 Jakub Jelinek <jakub@redhat.com>
5061 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5062 (CFLAGS-tst-cancelx21.c): Set.
5063 * tst-cancel21.c: New test.
5064 * tst-cancelx21.c: New test.
5066 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
5068 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5069 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
5070 * pt-longjmp.c: Include jmpbuf-unwind.h.
5071 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5072 _JMPBUF_UNWINDS. Adjust compared pointers.
5073 * init.c (__pthread_initialize_minimal_internal): Initialize
5074 pd->stackblock_size.
5075 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5076 * sysdeps/alpha/jmpbuf-unwind.h: New file.
5077 * sysdeps/i386/jmpbuf-unwind.h: New file.
5078 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5079 * sysdeps/s390/jmpbuf-unwind.h: New file.
5080 * sysdeps/sh/jmpbuf-unwind.h: New file.
5081 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5082 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5083 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5084 (_JMPBUF_CFA_UNWINDS): Remove.
5085 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5087 2003-12-12 Jakub Jelinek <jakub@redhat.com>
5089 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5090 (CFLAGS-tst-cancelx20.c): Set.
5091 * tst-cancel20.c: New test.
5092 * tst-cancelx20.c: New test.
5094 2003-12-17 Ulrich Drepper <drepper@redhat.com>
5096 * init.c (__pthread_initialize_minimal_internal): Don't treat
5097 architectures with separate register stack special here when
5098 computing default stack size.
5100 2003-12-17 Roland McGrath <roland@redhat.com>
5102 * Makefile (tst-cancelx7-ARGS): New variable.
5103 Reportd by Greg Schafer <gschafer@zip.com.au>.
5105 2003-12-17 Jakub Jelinek <jakub@redhat.com>
5107 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
5108 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5109 (tst-stack3-ENV): Set.
5110 ($(objpfx)tst-stack3-mem): New.
5111 * tst-stack3.c: New test.
5113 2003-12-10 David Mosberger <davidm@hpl.hp.com>
5115 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5116 Add unwind directives. Drop unused .regstk directive.
5117 (_fini_EPILOG_BEGINS): Add unwind directives.
5119 2003-12-11 Ulrich Drepper <drepper@redhat.com>
5121 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5122 Assume parameter is a pointer.
5123 (lll_futex_wake): Likewise.
5124 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5126 (lll_futex_wake): Likewise.
5127 Reported by Boris Hu.
5128 * sysdeps/unix/sysv/linux/unregister-atfork.c
5129 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5131 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5133 2003-12-10 Ulrich Drepper <drepper@redhat.com>
5135 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5136 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5137 __rtld_lock_initialize for ld.so lock.
5138 Patch in part by Adam Li <adam.li@intel.com>.
5140 2003-12-02 David Mosberger <davidm@hpl.hp.com>
5142 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5143 in $(gnulib). Also, remove stale comment.
5145 2003-11-12 David Mosberger <davidm@hpl.hp.com>
5147 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5148 advantage of new syscall stub and optimize accordingly.
5150 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5151 from SYS_futex, to match expectations of
5152 sysdep.h:DO_INLINE_SYSCALL.
5153 (lll_futex_clobbers): Remove.
5154 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5155 (lll_futex_wake): Likewise.
5156 (lll_futex_requeue): Likewise.
5157 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5158 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5160 (__lll_mutex_lock): Likewise.
5161 (__lll_mutex_cond_lock): Likewise.
5162 (__lll_mutex_timed_lock): Likewise.
5163 (__lll_mutex_unlock): Likewise.
5164 (__lll_mutex_unlock_force): Likewise.
5166 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5167 comes before the include of <sysdep.h>.
5168 (THREAD_SELF_SYSINFO): New macro.
5169 (THREAD_SYSINFO): Likewise.
5170 (INIT_SYSINFO): New macro.
5171 (TLS_INIT_TP): Call INIT_SYSINFO.
5173 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5175 * sysdeps/pthread/createthread.c (create_thread): Use
5176 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5177 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5178 THREAD_SELF_SYSINFO instead of open code.
5179 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5180 (THREAD_SYSINFO): Likewise.
5182 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5184 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5186 2003-12-06 Ulrich Drepper <drepper@redhat.com>
5188 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5189 instead of .init. Patch by David Mosberger.
5191 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
5193 * sysdeps/pthread/configure.in: Remove broken declaration in C
5194 cleanup handling check.
5196 2003-11-30 Andreas Jaeger <aj@suse.de>
5198 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5199 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5202 2003-11-27 Jakub Jelinek <jakub@redhat.com>
5204 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5205 * pthread_attr_destroy.c: Include shlib-compat.h.
5206 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5207 is set in iattr->flags.
5208 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5210 2003-11-21 Jakub Jelinek <jakub@redhat.com>
5212 * Makefile (distribute): Add tst-cleanup4aux.c.
5214 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
5217 2003-11-21 Ulrich Drepper <drepper@redhat.com>
5219 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5220 pthread_cond_signal.
5222 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5223 store mutex address if the current value is ~0l.
5224 * sysdeps/pthread/pthread_cond_timedwait.c
5225 (__pthread_cond_timedwait): Likewise.
5226 * sysdeps/pthread/pthread_cond_broadcast.c
5227 (__pthread_cond_broadcast): Don't use requeue for pshared
5230 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5231 (__pthread_cond_wait): Don't store mutex address if the current
5233 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5234 (__pthread_cond_timedwait): Likewise.
5235 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5236 (__pthread_cond_broadcast): Don't use requeue for pshared
5239 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5240 element with ~0l for pshared condvars, with NULL otherwise.
5242 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5243 (__pthread_cond_wait): Don't store mutex address if the current
5245 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5246 (__pthread_cond_timedwait): Likewise.
5247 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5248 (__pthread_cond_broadcast): Don't use requeue for pshared
5251 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5252 * tst-cond12.c: New file.
5253 * tst-cond13.c: New file.
5255 2003-11-17 Ulrich Drepper <drepper@redhat.com>
5257 * sysdeps/pthread/configure.in: Make missing forced unwind support
5260 2003-11-11 Ulrich Drepper <drepper@redhat.com>
5262 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5264 2003-11-06 Ulrich Drepper <drepper@redhat.com>
5266 * Makefile: Add magic to clean up correctly.
5268 2003-11-05 Jakub Jelinek <jakub@redhat.com>
5270 * unwind.c (FRAME_LEFT): Define.
5271 (unwind_stop): Handle old style cleanups here.
5272 (__pthread_unwind): Handle old style cleanups only if
5273 !HAVE_FORCED_UNWIND.
5274 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5275 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5276 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5277 ($(objpfx)tst-cleanupx4): Likewise.
5278 * tst-cleanup4.c: New test.
5279 * tst-cleanup4aux.c: New.
5280 * tst-cleanupx4.c: New test.
5282 2003-11-04 Ulrich Drepper <drepper@redhat.com>
5284 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5285 lll_mutex_*lock macros to skip atomic operations on some archs.
5287 2003-11-03 Ulrich Drepper <drepper@redhat.com>
5289 * sysdeps/pthread/tst-timer.c (main): Initialize
5290 sigev2.sigev_value as well.
5292 2003-10-15 Roland McGrath <roland@redhat.com>
5294 * sysdeps/pthread/configure.in: Barf if visibility attribute support
5296 * sysdeps/pthread/configure: Regenerated.
5298 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5300 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5301 locking macros. No distinction between normal and mutex locking
5303 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5304 Merge bits from lowlevelmutex.S we still need.
5305 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5306 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5307 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5308 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5309 new mutex implementation.
5310 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5311 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5312 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5313 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5314 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5315 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5316 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5317 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5318 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5319 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5320 symbol for entry point to avoid cancellation.
5322 2003-10-07 Jakub Jelinek <jakub@redhat.com>
5324 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5326 (SAVE_OLDTYPE_0): Fix a typo.
5328 2003-10-03 Ulrich Drepper <drepper@redhat.com>
5330 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5331 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
5333 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5335 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5338 2003-10-02 Jakub Jelinek <jakub@redhat.com>
5340 * Makefile (tests): Add tst-cancel19.
5341 * tst-cancel19.c: New test.
5343 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5345 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5346 restoring of the old cancellation type.
5348 2003-09-30 Jakub Jelinek <jakub@redhat.com>
5350 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5352 2003-09-27 Wolfram Gloger <wg@malloc.de>
5354 * sysdeps/pthread/malloc-machine.h: New file
5356 2003-09-24 Roland McGrath <roland@redhat.com>
5358 * allocatestack.c (__make_stacks_executable): Don't ignore return
5359 value from _dl_make_stack_executable.
5361 2003-09-24 Ulrich Drepper <drepper@redhat.com>
5363 * allocatestack.c (__make_stacks_executable): Also change
5364 permission of the currently unused stacks.
5366 * allocatestack.c (change_stack_perm): Split out from
5367 __make_stacks_executable.
5368 (allocate_stack): If the required permission changed between the time
5369 we started preparing the stack and queueing it, change the permission.
5370 (__make_stacks_executable): Call change_stack_perm.
5372 * Makefile: Build tst-execstack-mod locally.
5373 * tst-execstack-mod.c: New file.
5375 2003-09-23 Jakub Jelinek <jakub@redhat.com>
5377 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5379 2003-09-23 Roland McGrath <roland@redhat.com>
5381 * tst-execstack.c: New file.
5382 * Makefile (tests): Add it.
5383 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5384 (LDFLAGS-tst-execstack): New variable.
5386 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5387 whether to use PROT_EXEC for stack mmap.
5388 (__make_stacks_executable): New function.
5389 * pthreadP.h: Declare it.
5390 * init.c (__pthread_initialize_minimal_internal): Set
5391 GL(dl_make_stack_executable_hook) to that.
5393 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5395 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5396 recommendation from AMD re avoidance of lock prefix.
5398 2003-09-22 Jakub Jelinek <jakub@redhat.com>
5400 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5401 lll_futex_timed_wait instead of lll_futex_wait.
5402 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5403 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5404 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5405 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5406 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5407 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5408 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5409 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5410 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5411 Completely revamp the locking macros. No distinction between
5412 normal and mutex locking anymore.
5413 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5414 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5415 __lll_lock_timedwait): Fix prototypes.
5416 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5417 __lll_lock_timedwait): Likewise.
5418 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5419 macros, add __builtin_expect.
5420 (lll_mutex_timedlock): Likewise. Fix return value.
5421 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5422 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5423 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5424 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5425 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5426 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5427 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5428 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5430 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5432 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5433 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5434 operation if possible.
5436 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5437 like jumping over the lock prefix.
5439 2003-09-21 Ulrich Drepper <drepper@redhat.com>
5441 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5442 locking macros. No distinction between normal and mutex locking
5444 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5445 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5446 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5447 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5448 locking. Merge bits from lowlevelmutex.S we still need.
5449 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5450 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5451 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5452 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5453 * Makefile (routines): Remove libc-lowlevelmutex.
5454 (libpthread-rountines): Remove lowlevelmutex.
5455 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5456 for new mutex implementation.
5457 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5458 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5459 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5460 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5461 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5463 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5465 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5466 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5467 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5468 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5469 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5470 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5471 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5472 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5474 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5476 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5477 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5478 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5480 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5481 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5483 2003-09-20 Ulrich Drepper <drepper@redhat.com>
5485 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5486 in parameters of asm with output parameters.
5488 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5489 type of DECR parameter to int.
5490 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5492 2003-09-18 Jakub Jelinek <jakub@redhat.com>
5494 * tst-attr3.c (tf, do_test): Print stack start/end/size and
5495 guardsize for each thread.
5497 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5499 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5500 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5501 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5503 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5504 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5506 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5507 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5508 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5509 (pthread_getaffinity_np): Add hidden_def.
5511 * Makefile (tests): Add tst-attr3.
5512 * tst-attr3.c: New test.
5514 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5516 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5518 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5519 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5521 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5523 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5524 * tst-align.c: Include tst-stack-align.h.
5525 (tf, do_test): Use TEST_STACK_ALIGN macro.
5527 2003-09-17 Ulrich Drepper <drepper@redhat.com>
5529 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5532 2003-09-16 Ulrich Drepper <drepper@redhat.com>
5534 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5535 stack-related values for the initial thread.
5537 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5539 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5541 2003-09-11 Ulrich Drepper <drepper@redhat.com>
5543 * pthread_mutex_lock.c: Minor code rearrangements.
5545 2003-09-05 Roland McGrath <roland@redhat.com>
5547 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5548 Instead, include ../nptl_db/db_info.c to do its magic.
5549 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5550 (__pthread_pthread_key_2ndlevel_size): Likewise.
5551 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5552 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5553 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5554 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5555 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5556 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5557 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5558 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5559 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5560 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5561 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5562 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5563 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5564 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5565 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5566 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5567 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5569 2003-09-08 Ulrich Drepper <drepper@redhat.com>
5571 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5572 of pthread_t to be compatible with LT.
5573 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5574 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5575 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5576 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5577 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5578 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5579 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5581 2003-09-04 Ulrich Drepper <drepper@redhat.com>
5583 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5585 2003-09-04 Jakub Jelinek <jakub@redhat.com>
5587 * unwind-forcedunwind.c: Move to...
5588 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5589 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5590 * sysdeps/pthread/jmpbuf-unwind.h: New file.
5591 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5592 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5593 * unwind.c: Include jmpbuf-unwind.h.
5594 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5596 2003-09-02 Jakub Jelinek <jakub@redhat.com>
5598 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5599 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5600 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5601 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5602 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5603 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5604 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5605 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5606 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5607 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5608 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5610 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5611 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5612 * Makefile (tests): Add tst-stack2.
5613 * tst-stack2.c: New test.
5614 * tst-stack1.c: Include limits.h and sys/param.h.
5615 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5617 * pthread_condattr_setpshared.c: Include errno.h.
5618 (pthread_condattr_setpshared): Return EINVAL if pshared
5619 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5621 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5622 defined symbol for entry point to avoid cancellation.
5623 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5625 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5627 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5629 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5631 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5633 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5634 __close_nocancel, __read_nocancel, __write_nocancel,
5635 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
5636 libpthread.so or librt.so, define to corresponding function
5637 without _nocancel suffix.
5638 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5639 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5640 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5642 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5644 2003-09-02 Ulrich Drepper <drepper@redhat.com>
5646 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5647 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5649 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5650 in subsections has a symbol associated with it.
5652 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5653 defined symbol for entry point to avoid cancellation.
5654 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5656 2003-09-01 Jakub Jelinek <jakub@redhat.com>
5658 * Makefile (tests): Add tst-tls5.
5659 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5660 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5661 ($(objpfx)tst-tls5): New.
5662 ($(objpfx)tst-tls6.out): Likewise.
5663 (tests): Depend on $(objpfx)tst-tls6.out.
5664 * tst-tls3.c: Include stdint.h and pthreaddef.h.
5665 (do_test): Check pthread_self () return value alignment.
5666 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5667 (tf): Check pthread_self () return value alignment.
5668 * tst-tls5.c: New test.
5670 * tst-tls5mod.c: New.
5671 * tst-tls5moda.c: New.
5672 * tst-tls5modb.c: New.
5673 * tst-tls5modc.c: New.
5674 * tst-tls5modd.c: New.
5675 * tst-tls5mode.c: New.
5676 * tst-tls5modf.c: New.
5677 * tst-tls6.sh: New test.
5679 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5680 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5681 * init.c (pthread_functions): Initialize them.
5682 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5683 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5684 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5685 pthread_cond_timedwait@@GLIBC_2.3.2.
5687 2003-09-01 Jakub Jelinek <jakub@redhat.com>
5689 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5690 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5691 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5692 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5693 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5694 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5696 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5698 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5699 _POSIX_THREAD_PRIORITY_SCHEDULING.
5700 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5702 2003-08-31 Ulrich Drepper <drepper@redhat.com>
5704 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5705 nested function, use static inline function from libio.h.
5706 Code by Richard Henderson.
5708 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5711 2003-08-30 Jakub Jelinek <jakub@redhat.com>
5713 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5714 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5715 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5716 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5717 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5718 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5719 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5720 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5721 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5722 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5723 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5724 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5725 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5726 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5727 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5728 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5729 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5730 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5731 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5732 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5733 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5734 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5735 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5736 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5737 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5738 * sysdeps/sparc/tls.h: New file.
5739 * sysdeps/sparc/tcb-offsets.sym: New file.
5740 * sysdeps/sparc/Makefile: New file.
5741 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5742 * init.c [__sparc__] (__NR_set_tid_address): Define.
5744 2003-08-29 Jakub Jelinek <jakub@redhat.com>
5746 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5747 _IO_release_lock): Define.
5749 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
5751 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5752 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
5754 2003-08-27 Ulrich Drepper <drepper@redhat.com>
5756 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5757 (__pthread_cleanup_class): Add missing return types of member
5760 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
5762 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5763 (lll_mutex_unlock_force): Add memory barrier between store and futex
5766 2003-08-25 Ulrich Drepper <drepper@redhat.com>
5768 * tst-cancel4.c (do_test): Also unlink tempfname and remove
5769 tempmsg in first loop.
5771 2003-08-18 Ulrich Drepper <drepper@redhat.com>
5773 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5774 _POSIX_THREAD_PRIORITY_SCHEDULING.
5775 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5777 2003-08-07 Jakub Jelinek <jakub@redhat.com>
5779 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5780 (__rtld_lock_default_lock_recursive,
5781 __rtld_lock_default_unlock_recursive): Define.
5782 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5783 __rtld_lock_unlock_recursive): Define using
5784 GL(_dl_rtld_*lock_recursive).
5785 * init.c (__pthread_initialize_minimal_internal): Initialize
5786 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5787 Lock GL(_dl_load_lock) the same number of times as
5788 GL(_dl_load_lock) using non-mt implementation was nested.
5790 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5791 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5793 2003-08-06 Jakub Jelinek <jakub@redhat.com>
5795 * tst-cancel17.c (do_test): Make len2 maximum of page size and
5798 2003-08-07 Jakub Jelinek <jakub@redhat.com>
5800 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5802 2003-08-03 Jakub Jelinek <jakub@redhat.com>
5804 * sysdeps/pthread/createthread.c (do_clone): Move error handling
5805 to first syscall error check. Move syscall error check for tkill
5806 into __ASSUME_CLONE_STOPPED #ifdef.
5808 2003-08-02 Ulrich Drepper <drepper@redhat.com>
5810 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5811 is not defined, do explicit synchronization.
5812 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
5813 is not defined also unlock pd->lock for non-debugging case in case
5815 * pthread_create.c (start_thread): Always get and release pd->lock
5816 if __ASSUME_CLONE_STOPPED is not defined.
5817 (start_thread_debug): Removed. Adjust users.
5818 * allocatestack.c (allocate_stack): Always initialize lock if
5819 __ASSUME_CLONE_STOPPED is not defined.
5820 * Makefile (tests): Add tst-sched1.
5821 * tst-sched1.c: New file.
5823 * sysdeps/pthread/createthread.c (do_clone): Only use
5824 sched_setschduler and pass correct parameters.
5826 2003-07-31 Jakub Jelinek <jakub@redhat.com>
5828 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5829 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5830 PTHREAD_STACK_MIN in comments.
5832 2003-07-31 Jakub Jelinek <jakub@redhat.com>
5834 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5835 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5837 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5838 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5839 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5840 (__pthread_cleanup_upto): Fix prototype.
5841 (_longjmp_unwind): Adjust caller.
5842 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5843 Change second argument to const struct pointer.
5844 * tst-sem8.c (main): Remove unused s2 and s3 variables.
5845 * tst-sem9.c (main): Likewise.
5846 * unwind.c: Include string.h for strlen prototype.
5848 2003-07-31 Ulrich Drepper <drepper@redhat.com>
5850 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5851 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5852 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5854 Patch by Nicholas Miell <nmiell@attbi.com>.
5856 2003-07-30 Jakub Jelinek <jakub@redhat.com>
5858 * init.c (__pthread_initialize_minimal_internal): Initialize
5859 GL(dl_init_static_tls).
5860 * pthreadP.h (__pthread_init_static_tls): New prototype.
5861 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5863 * Makefile (tests): Add tst-tls4.
5864 (modules-names): Add tst-tls4moda and tst-tls4modb.
5865 ($(objpfx)tst-tls4): Link against libdl and libpthread.
5866 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5868 * tst-tls4.c: New file.
5869 * tst-tls4moda.c: New file.
5870 * tst-tls4modb.c: New file.
5872 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
5874 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5875 before __timer_dealloc.
5876 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5877 Don't call list_unlink.
5879 2003-07-29 Roland McGrath <roland@redhat.com>
5881 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5883 2003-07-25 Jakub Jelinek <jakub@redhat.com>
5885 * tst-cancel17.c (do_test): Check if aio_cancel failed.
5886 Don't reuse struct aiocb A if it failed.
5887 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5888 not just one byte, as that does not block.
5890 2003-07-22 Jakub Jelinek <jakub@redhat.com>
5892 * sysdeps/pthread/unwind-resume.c: New file.
5893 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5894 unwind-resume in csu subdir.
5895 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5897 (librt-sysdep_routines, librt-shared-only-routines): Add
5899 * sysdeps/pthread/rt-unwind-resume.c: New file.
5900 * unwind-forcedunwind.c: New file.
5901 * Makefile (libpthread-routines): Add unwind-forcedunwind.
5902 (libpthread-shared-only-routines): Likewise.
5903 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5904 * pthreadP.h (pthread_cancel_init): New prototype.
5905 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5907 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5908 attr argument const struct pthread_attr *.
5910 * res.c (__res_state): Return __resp.
5911 * descr.h: Include resolv.h.
5912 (struct pthread): Add res field.
5913 * pthread_create.c: Include resolv.h.
5914 (start_thread): Initialize __resp.
5915 * Makefile (tests): Add tst-_res1.
5916 (module-names): Add tst-_res1mod1, tst-_res1mod2.
5917 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
5918 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
5920 * tst-_res1.c: New file.
5921 * tst-_res1mod1.c: New file.
5922 * tst-_res1mod2.c: New file.
5924 2003-07-21 Ulrich Drepper <drepper@redhat.com>
5926 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
5928 * Makefile: Define various *-no-z-defs variables for test DSOs
5929 which has undefined symbols.
5931 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
5933 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5934 Retry if the stwcx fails to store once_control.
5936 2003-07-20 Ulrich Drepper <drepper@redhat.com>
5938 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
5939 pthread_attr_setaffinity.
5940 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
5941 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
5942 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
5943 * pthread_attr_destroy.c: Free cpuset element if allocated.
5944 * pthread_create.c: Pass iattr as additional parameter to
5946 * sysdeps/pthread/createthread.c: If attribute is provided and
5947 a new thread is created with affinity set or scheduling parameters,
5948 start thread with CLONE_STOPPED.
5949 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
5950 pthread_attr_setaffinity.
5951 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5954 2003-07-15 Ulrich Drepper <drepper@redhat.com>
5956 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
5958 2003-07-14 Ulrich Drepper <drepper@redhat.com>
5960 * sysdeps/pthread/configure.in: Require CFI directives also for
5963 2003-07-15 Jakub Jelinek <jakub@redhat.com>
5965 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5968 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5970 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
5972 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
5973 registers as variables. Call __pthread_mutex_unlock_usercnt.
5974 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5975 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
5976 not self pointer in __writer. Compare with TID to determine
5978 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5979 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
5981 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
5983 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
5984 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5985 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
5986 macros also when compiling librt.
5988 2003-07-11 Jakub Jelinek <jakub@redhat.com>
5990 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
5991 -fasynchronous-unwind-tables.
5992 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5993 (PSEUDO): Add cfi directives.
5994 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
5996 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5999 2003-07-08 Jakub Jelinek <jakub@redhat.com>
6001 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6002 __pthread_unregister_cancel): Add prototypes and hidden_proto.
6003 * unwind.c (__pthread_unwind_next): Add hidden_def.
6004 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6006 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6007 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6008 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6010 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6011 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6013 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6014 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6015 __pthread_unregister_cancel and __pthread_unwind_next.
6017 2003-07-04 Jakub Jelinek <jakub@redhat.com>
6019 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6020 different symbol for the cancellation syscall wrapper and
6021 non-cancellation syscall wrapper.
6022 (PSEUDO_END): Define.
6024 2003-07-05 Richard Henderson <rth@redhat.com>
6026 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6027 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6028 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6029 return actual return value from the syscall, not 0.
6031 2003-07-07 Ulrich Drepper <drepper@redhat.com>
6033 * descr.h (struct pthread): Add pid field.
6034 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6035 (__reclaim_stacks): Likewise.
6036 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6037 also check for PID of the signal source.
6038 (__pthread_initialize_minimal_internal): Also initialize pid field
6039 of initial thread's descriptor.
6040 * pthread_cancel.c: Use tgkill instead of tkill if possible.
6041 * sysdeps/unix/sysv/linux/fork.c: Likewise.
6042 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6043 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6044 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6046 2003-07-05 Ulrich Drepper <drepper@redhat.com>
6048 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6049 Fix use of parameter.
6050 (__libc_cleanup_pop): Likewise.
6052 2003-07-04 Ulrich Drepper <drepper@redhat.com>
6054 * init.c (sigcancel_handler): Change parameters to match handler
6055 for SA_SIGACTION. Check signal number and code to recognize
6056 invalid invocations.
6058 2003-07-03 Roland McGrath <roland@redhat.com>
6060 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6061 Apply sizeof (struct pthread) bias to r13 value.
6063 2003-07-03 Ulrich Drepper <drepper@redhat.com>
6065 * sysdeps/pthread/configure.in: Require CFI directives.
6067 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6069 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6070 libpthread compilation.
6071 * unwind.c (__pthread_unwind): Add hidden_def.
6072 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6074 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6076 * libc-cancellation.c (__libc_cleanup_routine): Define.
6077 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6078 (__pthread_cleanup_pop): Define.
6080 2003-07-01 Richard Henderson <rth@redhat.com>
6082 * sysdeps/alpha/elf/pt-initfini.c: New file.
6083 * sysdeps/alpha/pthread_spin_lock.S: New file.
6084 * sysdeps/alpha/pthread_spin_trylock.S: New file.
6085 * sysdeps/alpha/pthreaddef.h: New file.
6086 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6087 * sysdeps/alpha/tls.h: New file.
6088 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6089 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6090 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6091 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6092 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6093 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6094 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6095 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6096 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6097 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6099 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6101 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6102 cleanup support and unwind info.
6104 2003-06-30 Ulrich Drepper <drepper@redhat.com>
6106 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6107 Use correct cleanup handler registration. Add unwind info.
6108 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6109 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6110 * tst-once3.c: Add cleanup handler and check it is called.
6111 * tst-once4.c: Likewise.
6112 * tst-oncex3.c: New file.
6113 * tst-oncex4.c: New file.
6114 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6116 2003-06-29 Ulrich Drepper <drepper@redhat.com>
6118 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6120 2003-06-27 Ulrich Drepper <drepper@redhat.com>
6122 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6123 (tf_msgsnd): Likewise.
6125 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6126 premature returns a bit more.
6128 2003-06-26 Ulrich Drepper <drepper@redhat.com>
6130 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6131 definition to the front.
6133 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6134 the cleanup functions to make the names unique. Fix dwarf opcode
6136 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6137 functions to make the names unique. Fix CFA offset for two blocks.
6139 2003-06-25 Ulrich Drepper <drepper@redhat.com>
6141 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6142 missing closing braces.
6143 Patch by Christophe Saout <christophe@saout.de>.
6145 2003-06-24 Roland McGrath <roland@redhat.com>
6147 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6149 2003-06-24 Ulrich Drepper <drepper@redhat.com>
6151 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6152 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6154 * pthreadP.h: Declare __find_thread_by_id.
6155 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6156 * pthread_clock_gettime.c: Allow using other thread's clock.
6157 * pthread_clock_settime.c: Likewise.
6158 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6159 * Makefile: Add rules to build and run tst-clock2.
6160 * tst-clock2.c: New file.
6162 2003-06-23 Ulrich Drepper <drepper@redhat.com>
6164 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6165 to use exception-based cleanup handler.
6166 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6168 * tst-cond8.c (ch): Announce that we are done.
6170 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6172 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6173 Also test aio_suspend with timeout value.
6175 2003-06-22 Ulrich Drepper <drepper@redhat.com>
6177 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6178 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6181 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6182 (__pthread_mutex_lock_internal): Likewise.
6183 (__pthread_mutex_unlock_internal): Likewise.
6184 (__pthread_mutex_unlock_usercnt): Declare.
6185 * pthread_mutex_destroy.c: Always fail if used in any way.
6186 * pthread_mutex_init.c: Update comment.
6187 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6188 * pthread_mutex_timedlock.c: Adjust __nusers.
6189 * pthread_mutex_trylock.c: Adjust __nusers.
6190 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6191 and public interfaces are wrapper with pass additional parameter.
6192 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6194 * tst-mutex8.c: New file.
6195 * Makefile (tests): Add tst-mutex8.
6196 * sysdeps/pthread/pthread_cond_timedwait.c: Call
6197 __pthread_mutex_unlock_usercnt.
6198 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6199 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6200 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6201 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6202 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6203 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6204 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6206 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6207 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6208 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6209 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6210 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6212 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6213 * pthread_mutex_timedlock.c: Likewise.
6214 * pthread_mutex_trylock.c: Adjust __nusers.
6215 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6216 * tst-mutex9.c: New file.
6217 * Makefile (tests): Add tst-mutex9.
6218 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6219 * sysdeps/ia64/tls.h: Likewise.
6220 * sysdeps/powerpc/tls.h: Likewise.
6221 * sysdeps/s390/tls.h: Likewise.
6222 * sysdeps/sh/tls.h: Likewise.
6223 * sysdeps/x86_64/tls.h: Likewise.
6224 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6225 Change type of __owner.
6226 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6227 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6228 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6229 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6230 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6232 2003-06-19 Jakub Jelinek <jakub@redhat.com>
6234 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6235 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6237 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6238 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
6239 instead of nr to lll_futex_wake. Only set errno and return -1
6242 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6243 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6244 return actual return value from the syscall, not 0.
6246 2003-06-18 Ulrich Drepper <drepper@redhat.com>
6248 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6249 find a random value.
6250 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
6253 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6254 compat_timer_settime.
6255 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6256 compat_timer_gettime.
6257 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6258 compat_timer_getoverrun.
6259 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6260 compat_timer_delete.
6262 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6263 error-checking mutex detect busy mutexes.
6265 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6267 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6268 Add ax to clobber list.
6269 (lll_mutex_cond_lock): Likewise.
6270 (lll_mutex_unlock): Likewise.
6271 (lll_lock): Likewise.
6272 (lll_unlock): Likewise.
6274 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6275 * tst-cancel18.c: New file.
6276 * tst-cancelx18.c: New file.
6278 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6281 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6282 * tst-cancel17.c: New file.
6283 * tst-cancelx17.c: New file.
6285 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6286 * sysdeps/unix/sysv/linux/sigwait.c: New file.
6287 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6289 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6291 2003-06-16 Jakub Jelinek <jakub@redhat.com>
6293 * sysdeps/pthread/createthread.c (create_thread): Set
6294 header.multiple_threads unconditionally.
6295 * allocatestack.c (allocate_stack): Likewise.
6296 * descr.h (struct pthread): Add header.multiple_threads
6298 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6299 Define for librt. #error if neither libpthread, libc nor librt.
6300 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6302 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6303 CDISABLE): Likewise.
6304 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6305 CDISABLE): Likewise.
6306 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6307 CDISABLE): Likewise.
6308 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6309 CDISABLE): Likewise. Access header.multiple_threads outside of
6310 libc and libpthread.
6311 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6313 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6314 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6316 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6318 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6319 Also test early cancellation before the thread reaches the cancellation
6322 * Makefile: Compile forward.c with exceptions.
6324 * sysdeps/unix/sysv/linux/sleep.c: New file.
6326 2003-06-16 Ulrich Drepper <drepper@redhat.com>
6328 * Makefile: Add CFLAGS definition to compile function wrappers
6329 duplicated from libc with exceptions.
6330 * tst-cancel4.c: Also check cancellation handlers.
6332 * Makefile: Add rules to build and run tst-cancel16 and
6333 tst-cancelx16. Add missing CFLAGS definitions.
6334 * tst-cancel16.c: New file.
6335 * tst-cancelx16.c: New file.
6337 2003-06-15 Ulrich Drepper <drepper@redhat.com>
6339 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6340 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6341 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6342 (DL_SYSINFO_IMPLEMENTATION): Likewise.
6344 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6345 (LIBC_CANCEL_RESET): Likewise.
6346 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6347 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6349 (CFLAGS-libcrt-cancellation.c): Define.
6350 * sysdeps/pthread/librt-cancellation.c: New file.
6351 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6352 macros also when compiling librt.
6353 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6354 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6355 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6356 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6357 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6358 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6359 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6361 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6362 compat_timer_create.
6364 2003-06-14 Ulrich Drepper <drepper@redhat.com>
6366 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6368 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6370 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6371 Add libc_hidden_def.
6373 2003-06-13 Roland McGrath <roland@redhat.com>
6375 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6376 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6378 2003-06-11 Ulrich Drepper <drepper@redhat.com>
6380 * allocatestack.c (queue_stack): Always inline.
6381 * ptreadhP.h (__do_cancel): Likewise.
6383 2003-06-10 Jakub Jelinek <jakub@redhat.com>
6385 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6388 2003-06-10 Ulrich Drepper <drepper@redhat.com>
6390 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6391 (__pthread_cond_signal): Remove incorrect second addition for
6394 2003-06-09 Ulrich Drepper <drepper@redhat.com>
6396 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6397 (__pthread_cond_signal): Use correct futex pointer in
6398 __lll_mutex_lock_wait call.
6400 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6401 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6403 2003-06-08 Ulrich Drepper <drepper@redhat.com>
6405 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6407 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6410 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6411 hand-written CFI generation code. Since ENTRY/END also initiated
6412 CFI frames this caused two CFI sets to be generated.
6414 2003-06-07 Ulrich Drepper <drepper@redhat.com>
6416 * cleanup_routine.c: New file.
6417 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6418 * sysdeps/pthread/pthread.h: Add support for fully exception-based
6420 * Makefile (libpthread-routines): Add cleanup_routine.
6421 Add more CFLAGS variables to compile with exceptions. Add comments
6422 why which file needs unwind tables.
6423 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6425 * tst-cancelx1.c: New file.
6426 * tst-cancelx2.c: New file.
6427 * tst-cancelx3.c: New file.
6428 * tst-cancelx4.c: New file.
6429 * tst-cancelx5.c: New file.
6430 * tst-cancelx6.c: New file.
6431 * tst-cancelx7.c: New file.
6432 * tst-cancelx8.c: New file.
6433 * tst-cancelx9.c: New file.
6434 * tst-cancelx10.c: New file.
6435 * tst-cancelx11.c: New file.
6436 * tst-cancelx12.c: New file.
6437 * tst-cancelx13.c: New file.
6438 * tst-cancelx14.c: New file.
6439 * tst-cancelx15.c: New file.
6440 * tst-cleanupx0.c: New file.
6441 * tst-cleanupx0.expect: New file.
6442 * tst-cleanupx1.c: New file.
6443 * tst-cleanupx2.c: New file.
6444 * tst-cleanupx3.c: New file.
6446 * tst-cleanup0.c: Make standard compliant.
6447 * tst-cleanup1.c: Likewise.
6449 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6450 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6451 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6452 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6453 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6454 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6455 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6457 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6458 * tst-cancel12.c: New file.
6459 * tst-cancel13.c: New file.
6460 * tst-cancel14.c: New file.
6461 * tst-cancel15.c: New file.
6462 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6465 * tst-cancel1.c: Add some comments.
6467 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6470 2003-06-06 Ulrich Drepper <drepper@redhat.com>
6472 * Makefile (CFLAGS-pthread_cancel.c): Define.
6474 2003-06-05 Ulrich Drepper <drepper@redhat.com>
6476 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6477 Change type of __writer element to int.
6478 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6479 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6480 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6481 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6482 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6483 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6484 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6485 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6486 Compare with TID to determine deadlocks.
6487 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6488 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6489 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6490 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6491 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6492 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6494 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6496 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6497 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6498 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6500 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6502 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6503 * Makefile (tests): Add tst-rwlock12.
6504 * tst-rwlock12.c: New file.
6506 2003-06-05 Jakub Jelinek <jakub@redhat.com>
6508 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6509 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6510 Remove bogus hidden_proto.
6511 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6513 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6514 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6515 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6516 ___lll_mutex_timedlock): Likewise.
6518 2003-06-04 Ulrich Drepper <drepper@redhat.com>
6520 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6521 (__pthread_cond_signal): Add some code to eventually handle
6524 2003-06-01 Ulrich Drepper <drepper@redhat.com>
6526 * Makefile (tests): Add tst-exec4.
6527 (tst-exec4-ARGS): Define.
6528 * tst-exec4.c: New file.
6530 2003-05-31 Ulrich Drepper <drepper@redhat.com>
6532 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6533 Also fail if tv_nsec < 0.
6534 (__lll_timedwait_tid): Likewise.
6535 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6536 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6538 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6540 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6542 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6544 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6546 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6549 * Makefile (tests): Add tst-sem8 and tst-sem9.
6550 * tst-sem8.c: New file.
6551 * tst-sem9.c: New file.
6552 * sem_open.c: Fix creation of in_use record if the file exists but
6555 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6558 * sysdeps/pthread/timer_create.c (timer_create): In case
6559 evp==NULL, assign timer ID to sival_ptr.
6561 * descr.h (struct pthread_unwind_buf): Change type of prev element to
6562 struct pthread_unwind_buf *.
6563 (struct pthread): Likewise for cleanup_jmp_buf element.
6565 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6566 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6567 * unwind.c (__pthread_unwind_next): Likewise.
6569 2003-05-30 Ulrich Drepper <drepper@redhat.com>
6571 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6572 (lll_futex_timed_wait): Use int for futex value parameter.
6573 (lll_futex_wake): Likewise.
6574 (lll_futex_requeue): Likewise.
6576 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6577 Replace one memory operation with one register operation.
6579 * tst-join4.c (do_test): Fix error message.
6581 * tst-rwlock6.c (do_test): Use correct format specifier.
6583 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6584 (__lll_mutex_lock_wait): Replace one memory operation with one
6586 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6587 (__lll_mutex_lock_wait): Likewise.
6589 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6590 (__lll_mutex_cond_lock): Add one to value parameter of
6591 __lll_lock_wait to reflect reality in the futex syscall.
6592 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6593 (lll_mutex_cond_lock): Likewise.
6595 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6597 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6599 (lll_mutex_cond_lock): Define.
6601 2003-05-29 Ulrich Drepper <drepper@redhat.com>
6603 * Makefile (tests): Add tst-signal6.
6604 * tst-signal6.c: New file.
6606 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6607 (__lll_mutex_unlock_force): New function
6608 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6610 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6611 (__lll_mutex_unlock_force): New function.
6612 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6614 * tst-rwlock7.c (do_test): Use correct format specifier.
6616 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6617 Find break parameter in correct asm argument.
6619 2003-05-27 Jakub Jelinek <jakub@redhat.com>
6621 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6623 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6625 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6627 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6628 lll_futex_requeue, lll_mutex_unlock_force): Define.
6630 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6632 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6633 (pthread_cond_t): Add __mutex.
6634 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6635 lll_futex_requeue, lll_mutex_unlock_force): Define.
6637 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6639 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6640 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6642 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6644 (lll_futex_wait, lll_futex_wake): Define.
6645 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6646 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6647 FUTEX_REQUEUE instead of FUTEX_WAIT.
6648 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6649 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6650 mutex which was used in condvar structure. Call
6651 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6652 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6654 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6655 include tcb-offsets.h. Read wakeup value in locked region.
6656 Use the value of gbr register as THREAD_ID.
6657 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6658 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6659 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6661 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6664 2003-05-28 Ulrich Drepper <drepper@redhat.com>
6666 * sysdeps/pthread/pthread_cond_broadcast.c
6667 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6669 2003-05-26 Ulrich Drepper <drepper@redhat.com>
6671 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6672 typo in register name.
6673 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6674 correctly. Actually use requeue. Little optimization.
6675 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6676 mutex address early. Handle cancellation state as 32-bit value.
6677 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6678 Remove unnecessary label.
6680 2003-05-25 Ulrich Drepper <drepper@redhat.com>
6682 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6683 instead of FUTEX_WAIT.
6684 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6685 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6686 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6687 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6688 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6689 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6690 used in condvar structure. Call __pthread_mutex_cond_lock instead
6691 of __pthread_mutex_lock_internal.
6692 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6693 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6694 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6695 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6696 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6697 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6698 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6699 Add pthread_mutex_cond_lock.
6700 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6701 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6702 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6703 lll_mutex_cond_lock.
6704 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6705 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6706 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6708 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6709 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6711 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6712 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6714 * pthreadP.h: Declare __pthread_mutex_cond_lock.
6715 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6716 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
6717 macro don't define aliases.
6719 * cancellation.c: Remove __pthread_enable_asynccancel_2.
6720 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6721 * sysdeps/pthread/pthread_cond_timedwait.c: Use
6722 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6723 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6724 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6725 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6726 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6727 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6729 2003-05-17 Ulrich Drepper <drepper@redhat.com>
6731 * sem_open.c: Fix one endless loop. Implement correct semantics
6732 wrt opening the same semaphore more then once.
6733 * sem_close.c: Adjust for sem_open change.
6734 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
6735 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6736 * Makefile (tests): Add tst-sem7.
6737 * tst-sem7.c: New file.
6739 2003-05-16 Roland McGrath <roland@redhat.com>
6741 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6742 uninitialized variable braino.
6744 2003-05-16 Ulrich Drepper <drepper@redhat.com>
6746 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6747 test for syscall availability.
6749 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6750 __no_posix_timers to -1 if the syscalls don't exist.
6752 * pthread_join.c (pthread_join): Set tid field of the joined
6753 thread to -1. This isn't necessary but helps to recognize some
6754 error conditions with almost no cost.
6756 * allocatestack.c (FREE_P): Also negative values indicate an
6759 * unwind.c: Include <unistd.h>.
6761 2003-05-14 Ulrich Drepper <drepper@redhat.com>
6763 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6765 2003-05-14 Jakub Jelinek <jakub@redhat.com>
6767 * Makefile (crti-objs, crtn-objs): New variables.
6768 (omit-deps, extra-objs): Add crtn.
6769 ($(objpfx)libpthread.so): Depend on both crti and crtn
6770 and links to them in multidir.
6771 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6773 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
6775 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6776 (lll_mutex_unlock): Use atomic_exchange_rel.
6778 2003-05-11 Ulrich Drepper <drepper@redhat.com>
6780 * cond-perf.c (cons): Add missing locking around setting of alldone.
6782 2003-05-10 Ulrich Drepper <drepper@redhat.com>
6784 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6786 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6788 2003-05-09 Ulrich Drepper <drepper@redhat.com>
6790 * tst-sem6.c: New file.
6791 * Makefile (tests): Add tst-sem6.
6793 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6794 Use atomic_exchange_rel instead of atomic_exchange.
6795 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6798 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6799 code for lll_futex_wait and lll_futex_wake in static apps. Use
6800 vsyscall is possible.
6802 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6803 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6804 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6805 pthread_setaffinity_np.
6806 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6807 and pthread_setaffinity_np.
6808 * Makefile (libpthread-routines): Add pthread_getaffinity and
6809 pthread_setaffinity.
6811 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6812 use it in case mmap to allocate the stack fails.
6813 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6814 ARCH_MAP_FLAGS here.
6815 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6818 2003-05-08 Ulrich Drepper <drepper@redhat.com>
6820 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6821 handler implementation. It is now lockless in fork().
6822 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6823 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6824 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
6825 declare the __fork_*_lists.
6826 (struct fork_handler): Include pointers to all three functions.
6827 Add next, refcntr and need_signal elements.
6828 (__fork_handlers): New declaration.
6829 (__register_atfork_malloc): Remove declaration.
6830 (HAVE_register_atfork_malloc): Remove definition.
6831 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6832 __pthread_child_handler variable.
6833 (__libc_pthread_init): Use __register_atfork instead of explicitly
6835 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6837 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6839 * unwind.c (unwind_cleanup): Print error message and then abort. This
6840 function must never be reached.
6842 * cond-perf.c: New file.
6844 2003-05-05 Ulrich Drepper <drepper@redhat.com>
6846 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6848 2003-05-04 Roland McGrath <roland@redhat.com>
6850 * Makefile ($(objpfx)../libc.so): New target.
6852 2003-05-02 Ulrich Drepper <drepper@redhat.com>
6854 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6855 (pthread_condattr_t): Size is only an int, don't use long for
6857 (pthread_mutexattr_t): Likewise.
6858 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6859 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6860 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6862 2003-05-01 Ulrich Drepper <drepper@redhat.com>
6864 * sysdeps/i386/tls.h: Define THREAD_ID.
6865 * sysdeps/ia64/tls.h: Likewise.
6866 * sysdeps/powerpc/tls.h: Likewise.
6867 * sysdeps/s390/tls.h: Likewise.
6868 * sysdeps/sh/tls.h: Likewise.
6869 * sysdeps/x86_64/tls.h: Likewise.
6870 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6872 * pthread_mutex_timedlock.c: Likewise.
6873 * pthread_mutex_trylock.c: Likewise.
6874 * pthread_mutex_unlock.c: Likewise.
6875 * pthread_rwlock_trywrlock.c: Likewise.
6876 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6877 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6878 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6879 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6881 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6884 2003-04-29 Jakub Jelinek <jakub@redhat.com>
6886 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6887 (__SIZEOF_PTHREAD_COND_T): Define to 48.
6888 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6889 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6890 Make __align long long instead of long.
6891 (pthread_rwlock_t): Formatting.
6892 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6893 (pthread_rwlock_t): Formatting.
6894 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6895 (pthread_cond_t): Make __align long long instead of long.
6896 (pthread_rwlock_t): Move __flags field to the same position as in
6899 2003-04-30 Ulrich Drepper <drepper@redhat.com>
6901 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6902 * tst-rwlock7.c (do_test): Likewise.
6904 2003-04-26 Roland McGrath <roland@redhat.com>
6906 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6908 2003-04-22 Jakub Jelinek <jakub@redhat.com>
6910 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6911 sizeof (struct pthread).
6912 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
6914 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6916 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
6918 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
6920 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
6922 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
6924 (NO_TLS_OFFSET): Define.
6925 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
6926 add TLS_TCB_SIZE unnecessarily.
6928 2003-04-22 Roland McGrath <roland@redhat.com>
6930 * Makeconfig (shared-thread-library): Reverse link order to work
6933 2003-04-22 Ulrich Drepper <drepper@redhat.com>
6935 * semaphore.h: Fix typo in comment.
6937 2003-04-21 Ulrich Drepper <drepper@redhat.com>
6939 * sysdeps/pthread/sigfillset.c: New file.
6941 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
6942 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
6943 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
6944 * sysdeps/pthread/sigaction.c: Likewise.
6945 * sysdeps/pthread/sigprocmask.c: New file.
6946 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
6948 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6949 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
6952 2003-04-19 Ulrich Drepper <drepper@redhat.com>
6954 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6955 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
6957 * sysdeps/unix/sysv/linux/unregister-atfork.c
6958 (__unregister_atfork): Don't free memory not allocated dynamically.
6960 * semaphore.h: Remove __THROW marker from cancellation points.
6961 * nptl/sysdeps/pthread/pthread.h: Likewise.
6963 2003-04-18 Ulrich Drepper <drepper@redhat.com>
6965 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
6966 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
6969 2003-04-16 Jakub Jelinek <jakub@redhat.com>
6971 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
6973 2003-04-15 Roland McGrath <roland@redhat.com>
6975 * forward.c (__pthread_unwind): Tweak to avoid warning.
6977 2003-04-15 Ulrich Drepper <drepper@redhat.com>
6979 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
6981 2003-04-14 Ulrich Drepper <drepper@redhat.com>
6983 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
6984 overflow CFA advance instructions.
6985 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6987 2003-04-14 Jakub Jelinek <jakub@redhat.com>
6989 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
6990 * sysdeps/i386/pthread_spin_lock.c: Likewise.
6991 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
6994 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
6995 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
6996 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
6997 DW_CFA_advance_loc for .Laddl-.Lsubl.
6999 2003-04-13 Ulrich Drepper <drepper@redhat.com>
7001 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7002 position-independent unwind data for static libraries.
7003 Add missing unwind info. Add comments.
7005 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7006 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7007 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7008 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7010 2003-04-12 Ulrich Drepper <drepper@redhat.com>
7012 * Makefile: Make sure all cancellation points are compiled with
7013 exception and asynchronous unwind tables.
7015 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7016 which mishandles loading of global object addresses in PIC.
7017 (THREAD_SETMEM_NC): Likewise.
7019 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7021 * pthread.h: Define new data structure for cleanup buffer. Declare
7022 new cleanup handler interfaces.
7023 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
7024 (struct pthread): Add cleanup_jmp_buf pointer. Define
7025 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7026 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
7027 it. Declare old cleanup handler installation functions.
7028 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
7030 * cleanup_defer.c: Likewise.
7031 * cleanup_compat.c: New file. Old cleanup code.
7032 * cleanup_def_compat.c: New file. Old cleanup code.
7033 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7034 if own thread descriptor.
7035 * unwind.c: New file.
7036 * forward.c: Add __pthread_unwind.
7037 * init.c (pthread_functions): Add __pthread_unwind.
7038 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7039 Add ptr___pthread_unwind.
7040 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7041 and unwind function.
7042 * Makefile (libpthread-routines): Add cleanup_compat,
7043 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
7044 table generation if necessary.
7045 * version.c: Record whether unwind support is compiled in.
7046 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7047 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7049 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7050 complication to generate unwind information for syscall wrappers.
7051 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7052 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7053 __cleanup_fct_attribute.
7055 * Makefile: Add rules to build and run tst-cleanup0.
7056 * tst-cleanup0.c: New file.
7057 * tst-cleanup0.expect: New file.
7059 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
7060 caller. Optimize to avoid often unecessary local variable.
7062 2003-04-11 Roland McGrath <roland@redhat.com>
7064 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7065 sets variable `multidir'; include that.
7066 (generated): Add it.
7067 ($(objpfx)$(multidir)/crti.o): New target.
7068 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7070 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7072 * tst-attr2.c (do_test): Add cast to avoid warning.
7073 * tst-mutex4.c (do_test): Likewise.
7075 2003-04-10 Ulrich Drepper <drepper@redhat.com>
7077 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7080 2003-04-09 Ulrich Drepper <drepper@redhat.com>
7082 * Makefile (tests): Add tst-detach1.
7083 * tst-detach1.c: New file.
7085 2003-04-08 Ulrich Drepper <drepper@redhat.com>
7087 * sysdeps/pthread/pthread.h: Remove duplicate
7088 pthread_cleanup_{push,pop} definitions.
7090 * tst-barrier2.c: Eliminate warnings.
7091 * tst-cancel4.c: Likewise.
7092 * tst-cond4.c: Likewise.
7093 * tst-cond6.c: Likewise.
7094 * tst-detach1.c: Likewise.
7095 * tst-rwlock4.c: Likewise.
7096 * tst-rwlock6.c: Likewise.
7097 * tst-rwlock7.c: Likewise.
7098 * tst-sem3.c: Likewise.
7099 * tst-spin2.c: Likewise.
7100 * tst-umask1.c: Likewise.
7102 2003-04-07 Ulrich Drepper <drepper@redhat.com>
7104 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7106 2003-04-06 Ulrich Drepper <drepper@redhat.com>
7108 * descr.h (struct pthread): Move cancelhandling member to the front.
7110 2003-04-05 Ulrich Drepper <drepper@redhat.com>
7112 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7113 malloc_parent, and malloc_child statically.
7114 (__register_atfork_malloc): New function.
7115 (free_mem): Don't free any of the malloc_* variables on the list.
7116 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7117 Define HAVE_register_atfork_malloc.
7119 2003-04-04 Ulrich Drepper <drepper@redhat.com>
7121 * sysdeps/pthread/createthread.c (create_thread): Add some more
7122 comments explaining when to set multiple_threads and when not.
7124 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7125 THREAD_ATOMIC_BIT_SET if not already defined.
7126 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7127 THREAD_ATOMIC_BIT_SET:
7128 * sysdeps/x86_64/tls.h: Likewise.
7129 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7130 THREAD_ATOMIC_CMPXCHG_VAL.
7131 (_pthread_cleanup_pop_restore): Likewise.
7132 * cancellation.c (__pthread_enable_asynccancel): Likewise.
7133 (__pthread_enable_asynccancel_2): Likewise.
7134 (__pthread_disable_asynccancel): Likewise.
7135 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7136 (__libc_disable_asynccancel): Likewise.
7137 * init.c (sigcancel_handler): Likewise.
7138 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7139 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7141 2003-04-03 Ulrich Drepper <drepper@redhat.com>
7143 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7144 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7145 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7146 * Makefile (tests): Add tst-cancel11.
7147 * tst-cancel11.c: New file.
7149 2003-04-01 Ulrich Drepper <drepper@redhat.com>
7151 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7152 round, not the first. Use specific_used flag instead of local
7153 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
7154 (__free_tcb): Don't call deallocate_tsd here.
7155 (start_thread): Call deallocate_tsd here.
7156 * pthread_setspecific.c: Set specific_used flag really only when
7158 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7159 * tst-tsd3.c: New file.
7160 * tst-tsd4.c: New file.
7162 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7164 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7165 Use atomic_exchange_and_add instead of __lll_add.
7166 (__lll_mutex_timedlock): Likewise.
7167 Patch by Ian Wienand.
7169 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
7171 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7172 (SINGLE_THREAD_P): Fix typo.
7173 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7175 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7177 * Makefile (tests): Add tst-align.
7178 * tst-align.c: New file.
7179 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7181 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7184 * tst-tsd2.c: Add casts to avoid warnings.
7186 2003-03-30 Ulrich Drepper <drepper@redhat.com>
7188 * descr.h (struct pthread): Move most often used elements to the front.
7190 2003-03-29 Ulrich Drepper <drepper@redhat.com>
7192 * Makefile (libpthread-routines): Add pthread_atfork.
7193 (libpthread-static-only-routines): Add pthread_atfork.
7195 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7197 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7199 (INSTALL_DTV): Add parens.
7200 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7201 Use passed descr instead of THREAD_SELF.
7202 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7203 (__lll_mutex_timedlock_wait): Correct expected value after
7205 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7206 Release lock before waking up the waiters.
7207 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7208 criteria. Reorderstruct passed to cleanup handler. Fix
7209 handling of cancellation and failung pthread_mutex_unlock call.
7210 Use __pthread_enable_asynccancel_2 instead of
7211 __pthread_enable_asynccancel.
7212 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7213 Return result of lock re-get if it fails.
7214 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7215 for __pthread_cleanup_push.
7216 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7217 completely broken rwlock implementation.
7218 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7219 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7220 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7221 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7222 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7223 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
7224 versioned_symbol macro.
7225 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7226 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7228 2003-03-27 Ulrich Drepper <drepper@redhat.com>
7230 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7231 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
7233 (struct timer): Remove th and bar field.
7234 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7235 debugging code. Create only one helper thread.
7236 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7238 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7239 Renamed. Define statically. Use thread info from siginfo.
7240 (__helper_once): New variable.
7241 (__helper_tid): New variable.
7242 (__reset_helper_control): New function.
7243 (__start_helper_thread): New function.
7245 * pthread_create.c (start_thread): Don't use setjmp inside
7246 __builtin_expect to work around gcc bug.
7248 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7249 timer_delete syscall fails, but not with ENOSYS, set
7252 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7253 (timer_settime): Fix typo.
7254 * sysdeps/unix/sysv/linux/timer_getoverr.c
7255 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7257 2003-03-27 Jakub Jelinek <jakub@redhat.com>
7259 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7260 offset of cleanupbuf.__prev.
7262 2003-03-26 Jakub Jelinek <jakub@redhat.com>
7264 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7267 2003-03-26 Ulrich Drepper <drepper@redhat.com>
7269 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7270 NULL provide default definition to syscall.
7272 2003-03-25 Roland McGrath <roland@redhat.com>
7274 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7275 (timer_id2ptr): Fix typo.
7277 2003-03-25 Ulrich Drepper <drepper@redhat.com>
7279 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7280 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7281 * sysdeps/ia64/pthreaddef.h: Likewise.
7282 * sysdeps/powerpc/pthreaddef.h: Likewise.
7283 * sysdeps/s390/pthreaddef.h: Likewise.
7284 * sysdeps/sh/pthreaddef.h: Likewise.
7285 * sysdeps/x86_64/pthreaddef.h: Likewise.
7286 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7287 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7289 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7290 SIGTIMER is not unblocked.
7291 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7293 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7295 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7296 pass pointer through as ID.
7297 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7298 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7299 * sysdeps/unix/sysv/linux/timer_create.c: New file.
7300 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7301 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7302 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7303 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7304 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7305 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7306 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7307 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7308 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7309 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7310 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7311 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7312 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7313 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7314 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7315 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7316 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7317 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7318 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7319 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7320 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7321 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7322 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7323 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7324 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7325 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7326 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7327 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7328 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7329 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7331 * pthreadP.h: Remove FRAME_LEFT definition.
7332 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7333 already left frame. Programs which have this problem are not POSIX
7335 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7337 2003-03-24 Ulrich Drepper <drepper@redhat.com>
7339 * sysdeps/pthread/tst-timer.c: Check return values of the
7342 2003-03-23 Roland McGrath <roland@redhat.com>
7344 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7345 * tst-tls3mod.c: Likewise.
7346 * tst-tls1.c: Likewise.
7347 * tst-tls2.c: Likewise.
7349 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7352 * tst-join5.c (tf1, tf2): Add a cast.
7354 * Makeconfig (includes): Append -I$(..)nptl to this variable.
7356 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7357 Don't test anything.
7358 * tst-cond4.c: Likewise.
7359 * tst-cond6.c: Likewise.
7360 * tst-flock2.c: Likewise.
7361 * tst-mutex4.c: Likewise.
7362 * tst-rwlock4.c: Likewise.
7363 * tst-signal1.c: Likewise.
7364 * tst-spin2.c: Likewise.
7365 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7367 * tst-mutex4.c: Use test-skeleton.c.
7368 * tst-spin2.c: Likewise.
7369 * tst-sysconf.c: Likewise.
7370 * tst-barrier2.c: Likewise.
7371 * tst-cond4.c: Likewise.
7372 * tst-cond6.c: Likewise.
7373 * tst-rwlock4.c: Likewise.
7374 * tst-unload.c: Likewise.
7375 * tst-flock2.c (do_test): Use return instead of exit.
7377 2003-03-22 Jakub Jelinek <jakub@redhat.com>
7379 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7381 2003-03-21 Ulrich Drepper <drepper@redhat.com>
7383 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7384 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7385 instead of __lll_compare_and_swap.
7386 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7388 Removed definition if __lll_compare_and_swap.
7390 * cancellation.c: Adjust for new form of compare&exchange macros.
7391 * cleanup_defer.c: Likewise.
7393 * libc-cancellation.c: Likewise.
7394 * old_pthread_cond_broadcast.c: Likewise.
7395 * old_pthread_cond_signal.c: Likewise.
7396 * old_pthread_cond_timedwait.c: Likewise.
7397 * old_pthread_cond_wait.c: Likewise.
7398 * pthread_cancel.c: Likewise.
7399 * pthread_create.c: Likewise.
7400 * pthread_detach.c: Likewise.
7401 * pthread_join.c: Likewise.
7402 * pthread_key_delete.c: Likewise.
7403 * pthread_setcancelstate.c: Likewise.
7404 * pthread_setcanceltype.c: Likewise.
7405 * pthread_timedjoin.c: Likewise.
7406 * pthread_tryjoin.c: Likewise.
7407 * sysdeps/pthread/createthread.c: Likewise.
7409 2003-03-20 Ulrich Drepper <drepper@redhat.com>
7411 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7412 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7413 definitions. Replace uses with calls to atomic_* functions.
7414 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7415 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7416 __lll_test_and_set calls with atomic_exchange_and_add and
7417 atomic_exchange calls respectively.
7418 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7419 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7420 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7421 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7422 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7423 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7424 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7426 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7427 returns the old value.
7429 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
7431 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7432 int for variable OLDVAL and correct inline assembler contraint.
7433 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7434 type int for variable OLD.
7436 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7438 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7439 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7440 instead of multiple_threads field in the TCB.
7442 2003-03-19 Ulrich Drepper <drepper@redhat.com>
7444 * sysdeps/i386/i686/bits/atomic.h: Removed.
7445 * sysdeps/i386/i586/bits/atomic.h: Removed.
7446 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
7447 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
7448 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
7449 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
7450 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
7451 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
7452 * atomic.h: Removed. Moved to glibc.
7454 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7455 support for clock selection.
7457 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7460 2003-03-18 Roland McGrath <roland@redhat.com>
7462 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7463 Add __lll_rel_instr first. Add memory clobber.
7464 (lll_mutex_unlock): Use __lll_test_and_set.
7465 From Paul Mackerras <paulus@samba.org>.
7467 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7469 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7470 (SINGLE_THREAD_P): Add `header.' prefix.
7471 From Paul Mackerras <paulus@samba.org>.
7473 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7474 pthread_timedjoin_np to ...
7475 (libpthread: GLIBC_2.3.3): ... here.
7476 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7478 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7479 Avoid shadowing VAL variable.
7481 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7484 2003-03-18 Ulrich Drepper <drepper@redhat.com>
7486 * Makefile (tests): Add tst-cond11.
7487 * tst-cond11.c: New file.
7489 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7490 struct passed to cleanup handler to eliminate one more
7492 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7494 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7495 (pthrad_cond_t): Replace __unused field with __clock.
7497 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7498 waken all waiters in cleanup handler.
7499 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7500 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7502 * pthread_condattr_getclock.c: New file.
7503 * pthread_condattr_setclock.c: New file.
7504 * sysdeps/pthread/pthread.h: Declare these new functions.
7505 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7506 * Makefile (libpthread-routines): Add the new functions.
7507 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7508 Renamed field to value. Document use of the bits.
7509 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7511 * pthread_condattr_setpshared.c: Likewise.
7512 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7513 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7514 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7516 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7517 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7518 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7519 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7520 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7521 Implement clock selection.
7522 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7523 * pthread-errnos.sym: Add ENOSYS.
7524 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7525 _POSIX_CLOCK_SELECTION.
7526 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7528 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7529 invalid .size directive.
7531 2003-03-17 Roland McGrath <roland@redhat.com>
7533 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7536 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7538 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7539 Use __lll_add instead of spelling it out. Use protected symbol names.
7540 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7542 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7543 Renamed from lll_compare_and_swap. Use new name where necessary.
7544 (__lll_add): Defined.
7545 (__lll_dec_if_positive): Defined.
7546 (__lll_test_and_set): Defined.
7547 * sysdeps/ia64/pthread_spin_init.c: Removed.
7548 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7549 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7550 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7551 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7552 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7553 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7554 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7555 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7556 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7557 __sync_lock_release_si.
7558 Patch by Jakub Jelinek.
7560 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7561 Fix timeout handling.
7562 (__lll_timedwait_tid): Likewise.
7563 (lll_unlock_wake_cb): Wake up other waiters if necessary.
7564 Patch by Jakub Jelinek.
7566 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7568 2003-03-17 Roland McGrath <roland@redhat.com>
7570 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7571 * sysdeps/pthread/pthread_spin_init.c: New file.
7572 * sysdeps/pthread/pthread_spin_unlock.c: New file.
7573 * sysdeps/powerpc/Makefile: New file.
7574 * sysdeps/powerpc/pthread_spin_lock.c: New file.
7575 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7576 * sysdeps/powerpc/pthreaddef.h: New file.
7577 * sysdeps/powerpc/tcb-offsets.sym: New file.
7578 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7579 * sysdeps/powerpc/tls.h: New file.
7580 * sysdeps/powerpc/bits/atomic.h: New file.
7581 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7582 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7583 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7585 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7586 * sysdeps/unix/sysv/linux/sem_post.c: New file.
7587 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7588 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7589 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7590 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7591 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7592 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7593 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7594 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7595 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7596 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7597 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7598 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7599 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7601 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7603 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7604 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7605 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7606 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7607 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7609 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7611 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7612 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7613 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7614 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7615 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7617 2003-03-16 Roland McGrath <roland@redhat.com>
7619 * tst-fork4.c: Include <string.h>.
7620 * tst-signal2.c: Likewise.
7621 * tst-mutex5.c (do_test): exit -> return.
7622 * tst-mutex2.c: Include <stdlib.h>.
7624 2003-03-16 Ulrich Drepper <drepper@redhat.com>
7626 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7627 (__lll_mutex_timedlock_wait): Correct expected value after
7628 spurious wakeup. Otherwise we would never wait again.
7630 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7631 zone versus inline asm stupidity. Use correct instructions.
7633 * tst-rwlock6.c: Add some more status output.
7635 2003-03-15 Roland McGrath <roland@redhat.com>
7637 * sysdeps/pthread/configure.in: New file.
7638 * sysdeps/pthread/configure: New file (generated).
7640 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7642 * allocatestack.c (allocate_stack): Store the exact stack size of
7643 user allocated stacks.
7645 2003-03-15 Jakub Jelinek <jakub@redhat.com>
7647 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7648 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7649 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7650 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7651 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7652 Use `header.' prefix.
7653 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7655 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7657 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7658 __builtin_frame_address, use stack pointer.
7660 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7661 instead of __builtin_frame_pointer.
7663 2003-03-14 Ulrich Drepper <drepper@redhat.com>
7665 * tst-basic1.c (do_test): Add cast to avoid warning.
7666 * tst-basic2.c (do_test): Likewise.
7668 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7669 amount of stack correction.
7671 * tst-fork4.c: Use test-skeleton.c.
7673 2003-03-14 Roland McGrath <roland@redhat.com>
7675 * init.c: Fix typo "#eli" for "#else".
7677 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
7679 * allocatestack.c (__stack_user): Use hidden_data_def.
7680 * pthread_create.c (__pthread_keys): Likewise.
7682 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7684 2003-03-14 Roland McGrath <roland@redhat.com>
7686 * tst-fork4.c: New file.
7687 * Makefile (tests): Add it.
7689 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7690 we always define the padding space.
7691 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7692 stopped supporting its own extensions fully.
7693 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7694 struct also called `header', so `header.multiple_threads' is the field
7695 name to use on all machines.
7696 * allocatestack.c (allocate_stack): Use `header.' prefix.
7697 * sysdeps/pthread/createthread.c (create_thread): Likewise.
7698 * pthread_create.c (__pthread_create_2_1): Likewise.
7699 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7700 (THREAD_SELF): Likewise.
7701 * sysdeps/x86_64/tls.h: Likewise.
7702 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7703 (SINGLE_THREAD_P): Likewise.
7704 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7705 (SINGLE_THREAD_P): Likewise.
7706 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7707 (SINGLE_THREAD_P): Likewise.
7709 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7712 2003-03-14 Ulrich Drepper <drepper@redhat.com>
7714 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7715 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7717 * pthread_create.c (start_thread): setjmp is expected to return 0.
7719 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7720 (THREAD_GETMEM_NC): Likewise.
7722 2003-03-13 Ulrich Drepper <drepper@redhat.com>
7724 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7725 and the size of the stack which must be allocated is a multiple,
7726 allocate one more page.
7727 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7728 MULTI_PAGE_ALIASING.
7730 2003-03-13 Roland McGrath <roland@redhat.com>
7732 * pthread_create.c (start_thread): Set EXITING_BIT after the
7733 event-reporting (and destructors), not before.
7735 2003-03-13 Jakub Jelinek <jakub@redhat.com>
7737 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7738 lll_futex_wake): Declare register variables as long int instead of
7739 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7740 Make syscall arguments clobbered by the syscall.
7741 (lll_futex_wait): Define using lll_futex_timed_wait.
7743 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7746 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7749 * allocatestack.c (nptl_ncreated): Only declare if
7750 COLORING_INCREMENT != 0.
7752 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7753 (__libc_enable_asynccancel_2): Remove prototype.
7755 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7756 ctid to match kernel.
7758 2003-03-12 Ulrich Drepper <drepper@redhat.com>
7760 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7761 libc_multiple_threads.
7762 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7763 __libc_multiple_threads to...
7764 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
7766 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7768 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7769 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7771 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7772 (__pthread_once_internal): Define.
7774 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7775 macros instead of .symver directly.
7776 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7777 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7779 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7780 * sysdeps/x86_64/tcb-offsets.sym: New file.
7781 * sysdeps/x86_64/Makefile: New file.
7783 * sysdeps/i386/tcb-offsets.sym: Add SELF.
7784 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7785 to access own pthread_t in TCB.
7786 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7788 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7790 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7792 2003-03-12 Roland McGrath <roland@redhat.com>
7794 * pthread-errnos.sym: New file.
7795 * Makefile (gen-as-const-headers): New variable, list that file.
7796 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7797 header <pthread-errnos.h> instead of defining errno values here.
7798 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7799 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7800 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7801 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7802 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7804 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7806 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7807 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7808 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7809 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7810 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7811 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7812 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7813 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7814 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7815 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7816 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7817 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7818 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7819 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7820 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7821 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7822 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7823 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7824 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7825 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7826 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7827 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7828 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7829 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7830 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7831 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7832 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7834 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7835 CLONE_CHILD_SETTID worked.
7837 2003-03-12 Ulrich Drepper <drepper@redhat.com>
7839 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7841 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7844 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7845 (pthread_cond_t): Add padding.
7847 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7848 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7849 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7851 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7852 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7853 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7854 (__pthread_rwlock_timedrdlock): Likewise.
7855 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7856 (__pthread_rwlock_wrlock): Likewise.
7857 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7858 (__pthread_rwlock_rdlock): Likewise.
7860 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7862 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7863 result of lock re-get if it fails.
7865 2003-03-11 Ulrich Drepper <drepper@redhat.com>
7867 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7868 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7869 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7870 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7871 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7872 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7873 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7874 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7875 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7876 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7878 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7879 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7881 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7882 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7883 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7884 (create_thread): Likewise.
7885 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7886 * init.c (__pthread_initialize_minimal_internal): Initialize
7887 __libc_multiple_threads_ptr if necessary.
7888 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
7889 __pthread_multiple_threads and __libc_multiple_threads_ptr.
7890 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7891 __libc_multiple_threads.
7892 (__libc_pthread_init): Return pointer to __libc_pthread_init if
7895 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7896 (THREAD_SETMEM_NC): Likewise.
7898 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7899 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7900 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7901 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7903 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7904 Eliminate one entire instruction.
7906 * cancellation.c (__pthread_enable_asynccancel_2): New function.
7907 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7908 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7909 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7910 instead of __pthread_enable_asynccancel.
7911 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7912 (__pthread_cond_wait): Likewise.
7913 * sysdeps/pthread/pthread_cond_timedwait.c
7914 (__pthread_cond_timedwait): Likewise.
7915 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7917 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7918 (__condvar_cleanup): Wake up all waiters in case we got signaled
7919 after being woken up but before disabling asynchronous
7921 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7922 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7923 (__condvar_cleanup): Likewise.
7925 * init.c (__NR_set_tid_address): If already defined, don't redefine.
7926 Make it an error if architecture has no #if case. Add x86-64.
7928 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
7929 pt-initfini.s generation.
7931 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
7932 (TLS_INIT_TP): Fix typo.
7934 2003-03-11 Jakub Jelinek <jakub@redhat.com>
7936 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
7937 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
7939 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
7940 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7941 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
7942 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
7943 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
7944 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7945 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7946 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7948 2003-03-11 Ulrich Drepper <drepper@redhat.com>
7950 * sysdeps/pthread/pthread_cond_timedwait.c
7951 (__pthread_cond_timedwait): Return the result of the final
7952 locking. If it succeeds, the regular function return value.
7954 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
7955 Return result of the final locking.
7956 * version.c (__nptl_main): Work around problems with the strange
7957 INTERNAL_SYSCALL macro on ppc32.
7958 * init.c (__pthread_initialize_minimal_internal): Unblock
7959 SIGCANCEL in case the parent blocked it.
7960 Reported by Paul Mackerras <paulus@samba.org>.
7962 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
7963 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
7964 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
7966 2003-03-11 Jakub Jelinek <jakub@redhat.com>
7968 * sysdeps/pthread/pthread_cond_timedwait.c
7969 (__pthread_cond_timedwait): Unlock and fail if
7970 __pthread_mutex_unlock_internal failed.
7972 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
7973 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
7975 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
7976 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
7977 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
7978 ALLOCATE_STACK): New macros.
7979 (TLS_TPADJ): New macro.
7980 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
7981 (allocate_stack): Handle TLS_DTV_AT_TP and
7982 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
7983 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
7985 * init.c [__ia64__] (__NR_set_tid_address): Define.
7987 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
7988 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
7989 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
7990 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
7991 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
7992 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
7993 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
7994 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
7995 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
7996 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
7997 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
7998 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
7999 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8000 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8001 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8002 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8003 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8004 * sysdeps/ia64/bits/atomic.h: New file.
8005 * sysdeps/ia64/Makefile: New file.
8006 * sysdeps/ia64/pthread_spin_init.c: New file.
8007 * sysdeps/ia64/pthread_spin_lock.c: New file.
8008 * sysdeps/ia64/pthread_spin_trylock.c: New file.
8009 * sysdeps/ia64/pthread_spin_unlock.c: New file.
8010 * sysdeps/ia64/pthreaddef.h: New file.
8011 * sysdeps/ia64/tcb-offsets.sym: New file.
8012 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8013 * sysdeps/ia64/tls.h: New file.
8015 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8016 to syscall instead of no arguments.
8018 2003-03-10 Ulrich Drepper <drepper@redhat.com>
8020 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8021 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8022 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8023 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8025 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8028 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8030 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8031 lowlevelbarrier.sym.
8032 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8033 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8034 Include lowlevelbarrier.h and don't define offsets locally.
8035 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8037 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8038 (__lll_mutex_lock_wait): Reverse order of first two parameters.
8039 (__lll_mutex_timedlock_wait): Likewise.
8040 (lll_mutex_lock): Adjust asm for that.
8041 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
8042 (lll_lock): Adjust asm for operand order change.
8043 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8044 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8046 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8047 Reverse order of parameters.
8048 (__lll_timedwait_tid): Remove regparms attribute.
8049 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8050 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8052 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8053 (__lll_timedwait_tid): Remove one unnecessary instruction.
8055 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8056 __lll_mutex_timedlock_wait only for NOT_IN_libc.
8057 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8060 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8061 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8063 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8066 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8067 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
8069 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8070 define LOCK here (if UP is not defined). The actual code is in
8073 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8074 LOCK is already defined. Don't define lll_unlock_wake_cb and
8075 __lll_timedwait_tid for libc.so.
8076 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8077 define LOCK here (if UP is not defined). The actual code is in
8080 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8081 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8082 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8083 instead of lowlevelsem.h.
8084 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8085 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8086 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8088 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8090 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8091 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8092 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8094 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8096 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8099 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8101 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8102 of __libc_locking_needed.
8103 (lll_trylock): Initialize %eax to zero.
8105 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8106 pthread_cond_t definition.
8108 2003-03-10 Roland McGrath <roland@redhat.com>
8110 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8111 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8112 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8113 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8114 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8116 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8117 Instead of setting PD->multiple_threads, set globals
8118 __pthread_multiple_threads and __libc_multiple_threads.
8119 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8120 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8121 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8123 * descr.h (struct pthread): Conditionalize first member on
8124 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
8125 containing an anonymous tcbhead_t. Move `list' member out.
8126 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8127 * allocatestack.c: Remove use of `header.data.' prefix.
8128 * pthread_create.c: Likewise.
8129 * init.c (__pthread_initialize_minimal_internal): Likewise.
8130 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8131 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8132 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8133 * sysdeps/x86_64/tls.h: Likewise.
8134 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8135 (SINGLE_THREAD_P): Likewise.
8136 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8137 (SINGLE_THREAD_P): Likewise.
8138 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8139 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8141 2003-03-09 Ulrich Drepper <drepper@redhat.com>
8143 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8145 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8146 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8148 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8149 leftovers from the ia32 code.
8151 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8153 (clear_once_control): Don't load %esi.
8155 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8158 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8160 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8161 * sysdeps/unix/sysv/linux/createthread.c: ...here.
8163 * Makefile (tests): Add tst-cond10.
8164 * tst-cond10.c: New file.
8166 2003-03-08 Ulrich Drepper <drepper@redhat.com>
8168 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8169 * tst-signal3.c (do_test): Likewise.
8170 * tst-sem5.c (do_test): Likewise.
8171 * tst-kill6.c (do_test): Likewise.
8172 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
8174 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8176 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8177 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8178 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8179 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8180 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8181 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8182 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8184 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8186 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8187 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8188 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8189 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8190 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8191 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8192 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8193 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8195 * allocatestack.c (allocate_stack): If mprotect() fails free the
8198 2003-03-07 Ulrich Drepper <drepper@redhat.com>
8200 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8202 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8203 lll_wake_tid. This was used only to work around kernel limits in
8205 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8206 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8207 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8208 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8210 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8211 (__pthread_initialize_minimal_internal): Change initialization of
8212 __static_tls_align_m1 appropriately.
8213 * pthreadP.h (__static_tls_align_m1): Renamed from
8215 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8216 instead of __static_tls_align-1.
8218 2003-03-04 Ulrich Drepper <drepper@redhat.com>
8220 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8222 * pthread_create.c: Define __pthread_keys using nocommon
8223 attribute, not by placing it explicitly in bss.
8224 Remove DEFINE_DEALLOC definition. Not needed anymore.
8226 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8227 Use it in mmap call to allocate stacks.
8229 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8231 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8232 result of the thread function.
8234 2003-03-03 Ulrich Drepper <drepper@redhat.com>
8236 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
8237 version is just fine.
8239 * sysdeps/unix/sysv/linux/libc_pthread_init.c
8240 (__pthread_child_handler): Renamed from pthread_child_handler,
8241 exported, and marked hidden. Change all users.
8242 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8243 free __pthread_child_handler from child list.
8245 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
8247 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8249 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8250 Fix handling of cancellation and failing pthread_mutex_unlock call.
8251 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8252 (__pthread_cond_wait): Likewise.
8254 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8255 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8256 lll_futex_timed_wait call.
8257 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8258 (pthread_rwlock_timedwrlock): Likewise.
8260 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8261 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8262 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8264 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8265 check of lll_futex_wake return value.
8267 2003-03-03 Roland McGrath <roland@redhat.com>
8269 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8271 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8272 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8273 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8275 2003-03-02 Ulrich Drepper <drepper@redhat.com>
8277 * sysdeps/pthread/timer_create.c (timer_create): Return correct
8278 error for CPU clocks.
8280 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8281 _POSIX_MONOTONIC_CLOCK.
8282 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8284 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8287 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8289 * descr.h (struct pthread): Move cleanup field to the front.
8291 2003-03-01 Roland McGrath <roland@redhat.com>
8293 * sem_open.c (sem_open): Braino fix.
8295 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8297 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8298 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8299 __pthread_cleanup_pop functionality.
8300 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8302 * descr.h (struct pthread): Move tid field to the front now that
8305 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8306 (__lll_mutex_timedlock_wait): Remove.
8307 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8308 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8309 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8310 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8311 (lll_unlock_wake_cb): Don't save and restore %esi.
8312 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8314 (__lll_timedwait_tid): Add alignment.
8315 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8316 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8318 (__lll_timedwait_tid): Removed.
8319 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8320 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8321 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8322 (pthread_barrier_wait): Don't save, load, and restore %esi for
8324 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8325 (__pthread_cond_signal): Don't save, load, and restore %esi.
8326 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8327 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8328 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8329 Don't save, load, and restore %esi.
8331 2003-02-27 Ulrich Drepper <drepper@redhat.com>
8333 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8334 Release lock before waking up the waiters.
8336 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8338 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8339 (reader_thread): Likewise.
8341 * sysdeps/pthread/pthread_rwlock_unlock.c
8342 (__pthread_rwlock_unlock): Release internal lock early. Don't try
8343 to wake up readers if there are none.
8345 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8346 Release internal lock before wake threads.
8348 2003-02-26 Ulrich Drepper <drepper@redhat.com>
8350 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8351 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
8353 * tst-rwlock9.c: Likewise.
8354 * tst-rwlock10.c: New file.
8355 * tst-rwlock11.c: New file.
8357 * Makefile (tests): Add tst-dlsym1.
8358 * tst-dlsym1.c: New file.
8360 * init.c (__pthread_initialize_minimal_internal): Set
8361 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8362 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8364 2003-02-24 Ulrich Drepper <drepper@redhat.com>
8366 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8368 * tst-cond2.c: Fix sychronization with child.
8370 * tst-rwlock8.c (reader_thread): Remove unused variable.
8372 * Makefile: Add rules to build and run tst-tls3.
8373 * tst-tls3.c: New file.
8374 * tst-tls3mod.c: New file.
8376 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8377 * tst-rwlock8.c: New file.
8378 * tst-rwlock9.c: New file.
8379 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8380 complete broken rwlock implementation.
8381 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8383 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8385 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8386 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8387 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8388 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8389 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8390 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8391 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8393 2003-02-23 Roland McGrath <roland@redhat.com>
8395 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8397 2003-02-23 Ulrich Drepper <drepper@redhat.com>
8399 * Makefile (tests): Add tst-context1.
8400 * tst-context1.c: New file.
8402 * Makefile (tests): Add tst-tls1 and tst-tls2.
8403 * tst-tls1.c: New file.
8404 * tst-tls2.c: New file.
8406 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8409 * pthread_create.c (start_thread): Set EXITING_BIT early.
8411 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8412 (THREAD_GETMEM_NC): Likewise.
8414 2003-02-22 Ulrich Drepper <drepper@redhat.com>
8416 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8417 off 3 more bytes by using offset-less instructions when possible.
8419 * Makefile: Add dependency for $(objpfx)version.d.
8421 * eintr.c (eintr_source): Add unnecessary return but the compiler
8424 * tst-kill3.c: Include <unistd.h>.
8426 2003-02-21 Roland McGrath <roland@redhat.com>
8428 * pthread_create.c (start_thread): Call __libc_thread_freeres.
8430 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8432 * Makefile (tests): Add tst-eintr1.
8433 (distribute): Add eintr.c.
8434 * tst-eintr1.c: New file.
8435 * eintr.c: New file.
8437 * pthread_cancel.c (pthread_cancel): Use tkill directly.
8439 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8440 Disallow sending SIGCANCEL.
8442 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
8443 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8444 * tst-kill1.c: New file.
8445 * tst-kill2.c: New file.
8446 * tst-kill3.c: New file.
8447 * tst-kill5.c: New file.
8448 * tst-kill6.c: New file.
8449 * tst-basic7.c: Renamed to...
8450 * tst-kill4.c: ...this.
8452 2003-02-21 Roland McGrath <roland@redhat.com>
8454 * Makefile (install-lib-ldscripts): New variable.
8456 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8458 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8459 * pthread_cancel.c: Use INVALID_TD_P.
8460 * pthread_detach.c: Likewise.
8461 * pthread_getschedparam.c: Likewise.
8462 * pthread_setschedparam.c: Likewise.
8463 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8464 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8465 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8466 * pthread_timedjoin.c: Likewise.
8468 * tst-basic7.c: Include <signal.h>.
8470 * pthread_join.c (pthread_join): Limited checking for invalid
8472 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8474 2003-02-20 Ulrich Drepper <drepper@redhat.com>
8476 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8477 beginning of the loop. Clear the entire first block of TSD.
8478 * Makefile (tests): Add tst-key4.
8479 * tst-key4.c: New file.
8481 2003-02-18 Ulrich Drepper <drepper@redhat.com>
8483 * Makefile (tests): Add tst-basic7.
8484 * tst-basic7.c: New file.
8486 * pthread_create.c (deallocate_tsd): Mark as internal_function.
8487 Add some more __builtin_expect.
8489 * pthreadP.h: Define dummy version of DEBUGGING_P.
8491 2003-02-17 Ulrich Drepper <drepper@redhat.com>
8493 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8494 _POSIX_THREAD_PRIORITY_SCHEDULING.
8495 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8496 _XOPEN_REALTIME_THREADS.
8497 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8499 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8500 kernel returns EINVAL for PID <= 0, work around it.
8502 * Makefile (tests): Add tst-signal5.
8503 * tst-signal5.c: New file.
8505 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8508 * tst-cancel1.c (tf): Block all signals.
8510 * Makefile (tests): Add tst-basic6.
8511 * tst-basic6.c: New file.
8513 * tst-basic1.c: Add test for process ID.
8515 * Makefile (tests): Add tst-cancel10.
8516 * tst-cancel10.c: New file.
8518 * Makefile (tests): Add tst-signal4.
8519 * tst-signal4.c: New file.
8521 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8522 __sigismember instead of sigismember. Add __builtin_expect.
8524 2003-02-16 Ulrich Drepper <drepper@redhat.com>
8526 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8527 pthread_setcancelstate, and pthread_rwlock_setpshared.
8529 * tst-cancel7.c (do_test): Make sure the pid file exists before
8530 canceling the thread.
8532 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8533 pthread_rwlock_timedrdlock tests.
8534 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8535 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8536 Check for invalid tv_nsec field.
8537 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8540 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8541 recursive mutex of overflow.
8543 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8545 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8546 going into an endless loop.
8547 * Makefile (tests): Add tst-cancel9.
8548 * tst-cancel9.c: New file.
8550 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8552 2003-02-15 Ulrich Drepper <drepper@redhat.com>
8554 * tst-mutex5.c (do_test): Add more timedlock tests.
8556 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8557 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8559 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8560 use INLINE_SYSCALL. Error number is returned, not -1.
8562 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8563 and __deallocate_stack with internal_function.
8564 * pthread_create.c: Adjust definitions appropriately.
8565 * allocatestack.c: Likewise.
8567 * pthread_join.c: Add one more __builtin_expect.
8568 * pthread_timedjoin.c: Likewise.
8570 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8571 not data of sequence number does not match.
8572 Add one __builtin_expect.
8574 * Makefile (tests): Add tst-clock1.
8575 * tst-clock1.c: New file.
8577 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8579 * Makefile (tests): Add tst-basic5.
8580 * tst-basic5.c: New file.
8582 2003-02-14 Ulrich Drepper <drepper@redhat.com>
8584 * Makefile (tests): Add tst-basic4.
8585 * tst-basic4.c: New file.
8587 * pthreadP.h: Add declaraction for __nptl_nthreads.
8588 * pthread_create.c: Define __nptl_nthreads
8589 (start_thread): Increment __nptl_nthreads at beginning. Decrement
8590 after thread is done. If then zero, call exit(0).
8591 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8592 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
8593 * init.c (pthread_functions): Initialize ptr_nthreads.
8594 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8595 (__reclaim_stacks): Decrement __nptl_nthreads.
8596 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8598 * Makefile (tests): Add tst-basic3.
8599 * tst-basic3.c: New file.
8601 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
8602 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
8603 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8604 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
8605 if asynchronous canceling is enabled.
8606 * pthread_join.c (pthread_join): When recognizing circular joins,
8607 take into account the other thread might be already canceled.
8608 * Makefile (tests): Add tst-join5.
8609 * tst-join5.c: New file.
8611 * Makefile (tests): Add tst-join4.
8612 * tst-join4.c: New file.
8614 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8616 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8618 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
8620 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8621 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8622 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8624 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8626 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8627 error if lll_futex_wake failed.
8629 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8631 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8632 handling of cancellation and failung pthread_mutex_unlock call.
8633 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8634 * Makefile (tests): Add tst-cond8 and tst-cond9.
8635 * tst-cond8.c: New file.
8636 * tst-cond9.c: New file.
8638 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8640 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
8641 non-standard initializers with __USE_GNU.
8643 * Makefile (tests): Add tst-cleanup3.
8644 * tst-cleanup3.c: New file.
8646 2003-02-12 Ulrich Drepper <drepper@redhat.com>
8648 * Makefile (tests): Add tst-attr1 and tst-attr2.
8649 * tst-attr1.c: New file.
8650 * tst-attr2.c: New file.
8652 * Makefile: Add rules to build and run tst-atfork2 test.
8653 * tst-atfork2.c: New file.
8654 * tst-atfork2mod.c: New file.
8656 * sysdeps/unix/sysv/linux/unregister-atfork.c
8657 (__unregister_atfork): Free the memory allocated for the handlers
8658 after removing them from the lists.
8660 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8663 * tst-atfork1.c (do_test): Wait for the child we forked.
8664 Report error in child.
8666 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8668 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8670 2003-02-10 Ulrich Drepper <drepper@redhat.com>
8672 * Makefile (tests): Add tst-cancel8.
8673 * tst-cancel8.c: New file.
8675 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8676 clearing of control variable.
8677 * Makefile (tests): Add tst-once3 and tst-once4.
8678 * tst-once3.c: New file.
8679 * tst-once4.c: New file.
8681 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
8683 * sysdeps/sh/Makefile: New file.
8684 * sysdeps/sh/bits/atomic.h: New file.
8685 * sysdeps/sh/pthread_spin_init.c: New file.
8686 * sysdeps/sh/pthread_spin_lock.c: New file.
8687 * sysdeps/sh/pthread_spin_trylock.S: New file.
8688 * sysdeps/sh/pthread_spin_unlock.S: New file.
8689 * sysdeps/sh/pthreaddef.h: New file.
8690 * sysdeps/sh/tcb-offsets.sym: New file.
8691 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8692 * sysdeps/sh/tls.h: New file.
8693 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8694 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8695 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8696 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8697 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8698 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8699 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8700 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8701 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8702 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8703 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8704 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8705 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8706 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8707 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8708 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8709 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8710 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8711 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8712 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8713 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8714 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8715 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8716 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8717 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8718 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8719 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8720 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8721 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8722 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8724 2003-02-08 Ulrich Drepper <drepper@redhat.com>
8726 * tst-cond2.c: Rearrange code to not rely on behavior undefined
8729 * tst-basic2.c (do_test): Lock mutex before creating the thread.
8731 2003-02-07 Ulrich Drepper <drepper@redhat.com>
8733 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8734 (TLS_GET_FS): New #define.
8735 (TLS_SET_FS): New #define.
8736 Correct value of __NR_set_thread_area.
8738 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8740 2003-02-06 Ulrich Drepper <drepper@redhat.com>
8742 * Makefile (tests): Add tst-popen1.
8743 * tst-popen1.c: New file.
8745 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8746 but inactive generalization.
8747 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8748 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8749 Minor optimization, remove one instruction.
8750 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8752 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
8754 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8756 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
8758 * init.c (__NR_set_tid_address): Add #ifdef for s390.
8759 * sysdeps/pthread/pthread_barrier_wait.c: New file.
8760 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8761 * sysdeps/pthread/pthread_cond_signal.c: New file.
8762 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8763 * sysdeps/pthread/pthread_cond_wait.c: New file.
8764 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8765 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8766 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8767 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8768 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8769 * sysdeps/s390/Makefile: New file.
8770 * sysdeps/s390/bits/atomic.h: New file.
8771 * sysdeps/s390/pthread_spin_init.c: New file.
8772 * sysdeps/s390/pthread_spin_lock.c: New file.
8773 * sysdeps/s390/pthread_spin_trylock.c: New file.
8774 * sysdeps/s390/pthread_spin_unlock.c: New file.
8775 * sysdeps/s390/pthreaddef.h: New file.
8776 * sysdeps/s390/tcb-offsets.sym: New file.
8777 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8778 * sysdeps/s390/tls.h: New file.
8779 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8780 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8781 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8782 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8783 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8784 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8785 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8786 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8787 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8788 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8789 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8790 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8791 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8792 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8793 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8794 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8795 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8796 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8797 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8798 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8799 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8800 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8801 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8803 2003-02-04 Ulrich Drepper <drepper@redhat.com>
8805 * atomic.h: Add a couple more default implementations.
8806 (atomic_compare_and_exchange_acq): Use
8807 __arch_compare_and_exchange_32_acq in return value definition. It
8809 (atomic_bit_set): Renamed from atomic_set_bit.
8810 Add missing atomic_ prefixes.
8812 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8813 thread library is available, use correct value to mark initialized
8816 2003-02-03 Ulrich Drepper <drepper@redhat.com>
8818 * allocatestack.c (allocate_stack): Use __getpagesize instead of
8819 __sysconf to determine pagesize.
8821 * pthread_create.c: Include <atomic.h>.
8822 * allocatestack.c (allocate_stack): Implement coloring of the
8823 allocated stack memory. Rename pagesize to pagesize_m1. It's the
8824 size minus one. Adjust users.
8825 * sysdeps/i386/i686/Makefile: New file.
8827 2003-02-02 Ulrich Drepper <drepper@redhat.com>
8829 * allocatestack.c: Improve comment throughout the file.
8831 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8832 (__lll_lock_wait): Add branch prediction.
8833 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8834 (__lll_lock_wait): Likewise.
8835 (lll_unlock_wake_cb): Removed.
8837 2003-01-31 Ulrich Drepper <drepper@redhat.com>
8839 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8840 _POSIX_THREAD_PRIORITY_SCHEDULING.
8842 2003-01-30 Jakub Jelinek <jakub@redhat.com>
8844 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8845 Fix return type of ptr___pthread_getspecific.
8847 2003-01-29 Ulrich Drepper <drepper@redhat.com>
8849 * Makefile (tests): Add tst-umask1.
8850 (tst-umask1-ARGS): Define.
8851 * tst-umask1.c: New file.
8853 2003-01-28 Ulrich Drepper <drepper@redhat.com>
8855 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
8856 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8857 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8858 pthread_rwlock_unlock.
8859 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8860 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8861 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8862 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8863 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8865 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8866 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8868 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8869 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8870 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8872 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8873 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8875 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8876 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8877 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8879 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8880 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8882 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8884 * Makefile (libpthread-routines): Remove lowlevelcond and
8885 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8886 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8887 and pthread_cond_broadcast.
8888 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8889 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8890 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8891 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8892 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8893 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8894 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8895 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8896 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8897 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8898 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8899 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8900 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8901 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8902 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8903 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8904 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8905 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8906 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8907 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8908 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8909 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8910 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8911 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8912 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8913 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8914 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8915 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8916 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
8917 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
8918 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
8920 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
8921 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
8922 of the code is moved to ...
8923 * sysdeps/pthread/createthread.c: ...here. New file.
8925 2003-01-27 Ulrich Drepper <drepper@redhat.com>
8927 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
8928 (__new_sem_post): Clear %eax before returning.
8929 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
8931 * Makefile (tests): Add tst-cleanup2.
8932 * tst-cleanup2.c: New file.
8934 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8935 Interpret first parameter correctly.
8937 2003-01-17 Ulrich Drepper <drepper@redhat.com>
8939 * Makefile (headers): Add bits/semaphore.h.
8941 2003-01-16 Jakub Jelinek <jakub@redhat.com>
8943 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
8946 2003-01-14 Ulrich Drepper <drepper@redhat.com>
8948 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
8949 must be used and mapping failed.
8950 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
8952 * Makefile (CFLAGS-pthread_self.os): Define this, not
8953 CFLAGS-pthread_self.c.
8955 2003-01-13 Ulrich Drepper <drepper@redhat.com>
8957 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
8960 * Makefile (libpthread-routines): Add version. Add rules to build
8961 version.os and banner.h.
8962 * version.c: New file.
8964 2003-01-13 Jakub Jelinek <jakub@redhat.com>
8966 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
8967 the alias unconditional.
8968 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
8970 2003-01-13 Ulrich Drepper <drepper@redhat.com>
8972 * Makefile (CFLAGS-pthread_self.c): New definition.
8974 2003-01-06 Jakub Jelinek <jakub@redhat.com>
8976 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
8977 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
8978 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
8979 * init.c (__pthread_initialize_minimal_internal): Likewise.
8981 2003-01-07 Jakub Jelinek <jakub@redhat.com>
8983 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
8985 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8986 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8987 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8988 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8989 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8990 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8992 2003-01-06 Jakub Jelinek <jakub@redhat.com>
8994 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
8995 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
8996 * tst-cancel-wrappers.sh: Remove all exceptions.
8998 2003-01-05 Ulrich Drepper <drepper@redhat.com>
9000 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9001 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
9003 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9004 Use __libc_pthread_functions array if SHARED.
9006 * pthreadP.h: Move pthread_cond_2_0_t definition to...
9007 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9009 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9010 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9011 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9012 __libc_ptf_call instead of __libc_maybe_call.
9014 (__libc_cleanup_region_start): Wrap function name with PTF call.
9015 (__libc_cleanup_region_end): Likewise.
9016 (__libc_cleanup_end): Likewise.
9018 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9019 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9020 * pthread_key_create.c: Add __pthread_key_create_internal alias.
9021 * pthreadP.h: Add prototypes.
9023 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9024 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9025 __pthread_rwlock_unlock aliases.
9026 * pthreadP.h: Add prototypes for new aliases.
9028 * pthreadP.h (struct pthead_functions): Moved to...
9029 * sysdeps/pthread/pthread-functions.h: ...here. New file.
9030 * init.c (pthread_functions): Add initializers for new elements.
9032 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9033 __pthread_cleanup_pop_restore aliases.
9034 * pthreadP.h: Add prototypes.
9036 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9037 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9038 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9039 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9040 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9041 * pthreadP.h: Adjust prototypes and callers.
9043 2003-01-04 Ulrich Drepper <drepper@redhat.com>
9045 * Makefile (tests): Add tst-cancel7.
9046 (tst-cancel7-ARGS): New variable.
9047 * tst-cancel7.c: New file.
9049 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9050 around gcc defficiencies.
9051 * old_pthread_cond_signal.c: Likewise.
9052 * old_pthread_cond_timedwait.c: Likewise.
9053 * old_pthread_cond_wait.c: Likewise.
9055 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9057 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9059 * Makefile (tests): Add tst-cond7.
9060 * tst-cond7.c: New file.
9062 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9063 (condvar_cleanup): Get condvar address from the right place.
9065 * atomic.h: Correct definitions of atomic_full_barrier,
9066 atomic_read_barrier, atomic_write_barrier.
9068 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9070 * old_pthread_cond_signal.c: Likewise.
9071 * old_pthread_cond_timedwait.c: Likewise.
9072 * old_pthread_cond_wait.c: Likewise.
9074 2003-01-03 Jakub Jelinek <jakub@redhat.com>
9076 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9078 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9080 * pthreadP.h (pthread_cond_2_0_t): New type.
9081 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9082 Use new type for the 2.0 condvar function prototypes.
9083 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9084 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9086 * old_pthread_cond_destroy.c: Likewise.
9087 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
9088 * old_pthread_cond_signal.c: Likewise.
9089 * old_pthread_cond_timedwait.c: Likewise.
9090 * old_pthread_cond_wait.c: Likewise.
9092 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9093 (__pthread_cond_wait): Don't save cancellation mode and seq value
9096 * herrno.c (__h_errno_location): Don't define as weak.
9098 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9100 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9101 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9102 and pthread_cond_wait.
9103 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9105 (__pthread_cond_broadcast_2_0): ... this.
9106 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9108 (__pthread_cond_destroy_2_0): ... this.
9109 * old_pthread_cond_init.c (__old_pthread_cond_init):
9111 (__pthread_cond_init_2_0): ... this.
9112 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9114 (__pthread_cond_signal_2_0): ... this.
9115 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9117 (__pthread_cond_wait_2_0): ... this.
9118 * pthread_cond_destroy.c: Include shlib-compat.h.
9119 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9120 * pthread_cond_init.c: Include shlib-compat.h.
9121 (pthread_cond_init): Change strong_alias into versioned_symbol.
9122 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9123 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9125 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9126 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9127 __pthread_cond_wait_2_0): New prototypes.
9128 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9129 __old_pthread_cond_init, __old_pthread_cond_signal,
9130 __old_pthread_cond_wait): Removed.
9131 * init.c: Include shlib-compat.h.
9132 (pthread_functions): Guard ptr___pthread_attr_init_2_0
9133 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9134 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9135 ptr___pthread_cond_*_2_0 fields.
9136 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9137 pthread_cond_*@GLIBC_2.0 compatibility symbols.
9139 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9140 LIBC_SIGACTION was not yet defined.
9141 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9142 [!defined LIBC_SIGACTION] (__sigaction): New function and
9144 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9145 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9147 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9149 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9151 2003-01-02 Ulrich Drepper <drepper@redhat.com>
9153 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9154 New, larger type definition.
9155 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9157 * Versions [libpthread]: Add definitions for new pthread_cond_*
9158 interfaces for version GLIBC_2.3.2.
9159 * pthread_cond_init.c: Update initialization for new type definition.
9160 * Makefile (libpthread-routines): Remove pthread_cond_wait,
9161 pthread_cond_timedwait, pthread_cond_signal, and
9162 pthread_cond_broadcast. Add old_pthread_cond_init,
9163 old_pthread_cond_destroy, old_pthread_cond_wait,
9164 old_pthread_cond_timedwait, old_pthread_cond_signal, and
9165 old_pthread_cond_broadcast.
9166 * old_pthread_cond_broadcast.c: New file.
9167 * old_pthread_cond_destroy.c: New file.
9168 * old_pthread_cond_init.c: New file.
9169 * old_pthread_cond_signal.c: New file.
9170 * old_pthread_cond_timedwait.c: New file.
9171 * old_pthread_cond_wait.c: New file.
9172 * pthreadP.h: Add prototypes for the compatibility interfaces.
9174 * pthread_cond_destroy.c: Don't include <errno.h>.
9176 2003-01-01 Ulrich Drepper <drepper@redhat.com>
9178 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9179 unnecessary zero offset when addressing MUTEX.
9181 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9183 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9185 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9186 for __register_atfork.
9188 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9190 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9191 instead of ASSEMBLER test macro.
9193 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9194 __libc_current_sigrtmax): Add libc_hidden_def.
9196 * sysdeps/pthread/list.h: Remove assert.h include.
9198 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9200 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9201 __pthread_initialize_minimal_internal not
9202 __pthread_initialize_minimal.
9204 2002-12-30 Ulrich Drepper <drepper@redhat.com>
9206 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9207 __pthread_initialize_minimal as hidden.
9209 * init.c (__pthread_initialize_minimal_internal): Don't mark as
9212 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9214 * Makefile ($(inst_libdir)/libpthread.so): Depend on
9215 $(common-objpfx)format.lds, include that into the output script.
9217 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9219 2002-12-28 Andreas Jaeger <aj@suse.de>
9221 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9222 nsec resolution changes.
9223 (xstat64_conv): Likewise.
9224 (xstat32_conv): Likewise.
9225 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9227 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9228 structs stat and stat64.
9229 * time/time.h (__timespec_defined): Define for __USE_MISC.
9230 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9232 2002-12-30 Jakub Jelinek <jakub@redhat.com>
9234 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
9236 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9237 (pthread_exit): Use strong_alias to avoid warnings.
9238 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9239 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9240 ptr___pthread_attr_init_2_*.
9241 * init.c (pthread_functions): Adjust.
9243 2002-12-29 Ulrich Drepper <drepper@redhat.com>
9245 * forward.c: Make all functions available by default again. It
9246 caused too much trouble.
9248 * pt-siglongjmp.c: Removed.
9250 2002-12-28 Jakub Jelinek <jakub@redhat.com>
9252 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9253 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9254 * sysdeps/i386/Makefile: New file.
9255 * sysdeps/i386/tcb-offsets.sym: New file.
9256 * sysdeps/pthread/tcb-offsets.h: New file.
9257 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9258 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9260 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9261 __register_atfork...
9262 (GLIBC_2.3.2): ...here.
9264 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9266 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9267 pthread_attr_setstackaddr with __attribute_deprecated__.
9269 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9271 * pt-system.c (system): Remove cancellation handling.
9272 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9273 cancellation routines.
9275 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9277 * descr.h: Include <dl-sysdep.h>.
9278 (struct pthread): Move header.data.list to the back of the struct.
9279 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9280 (MULTIPLE_THREADS_OFFSET): Adjust offset.
9281 (SYSINFO_OFFSEET): Likewise.
9283 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9285 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9287 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9288 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9289 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9290 (USE_DL_SYSINFO): Undef.
9292 2002-12-22 Jakub Jelinek <jakub@redhat.com>
9294 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9295 $(common-objpfx)libc.so.
9296 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9297 it is bigger than pipe buffer size even on arches with bigger
9299 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9301 2002-12-25 Ulrich Drepper <drepper@redhat.com>
9303 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9304 correct errno access for case that USE___THREAD is not defined.
9306 2002-12-24 Ulrich Drepper <drepper@redhat.com>
9308 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9309 Patch by Marijn Ros <marijn@mad.scientist.com>.
9311 2002-12-22 Roland McGrath <roland@redhat.com>
9313 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9315 2002-12-20 Ulrich Drepper <drepper@redhat.com>
9317 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9319 2002-12-19 Ulrich Drepper <drepper@redhat.com>
9321 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9322 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9323 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9325 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9327 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9328 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9329 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9330 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9331 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9332 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9333 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9334 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9336 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9338 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9340 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9342 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9344 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9345 that sysinfo is properly initialized.
9346 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9347 to 1 only for ld.so.
9349 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9350 RTLD_CORRECT_DYNAMIC_WEAK.
9352 2002-12-19 Jakub Jelinek <jakub@redhat.com>
9354 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9355 Use return 0 as 6th argument to FORWARD4.
9356 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9358 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9360 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9361 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9362 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9363 (INIT_SYSINFO): New #define.
9364 (TLS_TP_INIT): Use INIT_SYSINFO.
9365 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9366 At test to make sure SYSINFO_OFFSET value is correct.
9367 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9369 2002-12-18 Jakub Jelinek <jakub@redhat.com>
9371 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9372 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9373 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9374 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9375 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9376 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9377 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9379 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9381 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9382 macro instead of using int $0x80 directly.
9384 * sysdeps/pthread/bits/stdio-lock.h: New file.
9385 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9386 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9387 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9388 * Makefile (routines): Add libc-lowlevelmutex.
9390 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9391 __i686.get_pc_thunk.dx.
9393 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9395 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9396 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9397 ($(objpfx)tst-cancel-wrappers.out): New rule.
9398 * tst-cancel-wrappers.sh: New test.
9399 * tst-locale1.c: Include signal.h.
9400 (uselocale): Test static linking of __libc_current_sigrt*.
9402 2002-12-17 Ulrich Drepper <drepper@redhat.com>
9404 * Makefile (tests): Add tst-cancel6.
9405 * tst-cancel6.c: New file
9407 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9409 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9410 Define meaningfully for assembler as well.
9411 * pthreadP.h (struct pthread_functions): Remove
9412 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
9413 and ptr_pthread_attr_init_2_1 fields.
9414 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9415 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9416 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9417 (FORWARD3): Define using FORWARD4.
9418 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9420 * pt-system.c: Remove duplicate stdlib.h include.
9422 2002-12-16 Ulrich Drepper <drepper@redhat.com>
9424 * sem_init.c: Define sem_init@GLIBC_2.0.
9425 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9426 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9428 * flockfile.c: Moved to...
9429 * sysdeps/pthread/flockfile.c: ...here. New file.
9430 * funlockfile.c: Moved to...
9431 * sysdeps/pthread/funlockfile.c: ...here. New file.
9432 * ftrylockfile.c: Moved to...
9433 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
9435 2002-12-16 Jakub Jelinek <jakub@redhat.com>
9437 * libc-cancellation.c: Guard both function with
9438 #if !defined NOT_IN_libc.
9439 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9440 automatically provided pthread wrappers.
9441 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9442 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9444 * pt-open.c: Removed.
9445 * pt-fcntl.c: Removed.
9446 * pt-fsync.c: Removed.
9447 * pt-lseek.c: Removed.
9448 * pt-msgrcv.c: Removed.
9449 * pt-msgsnd.c: Removed.
9450 * pt-msync.c: Removed.
9451 * pt-nanosleep.c: Removed.
9452 * pt-open64.c: Removed.
9453 * pt-pause.c: Removed.
9454 * pt-pread.c: Removed.
9455 * pt-pread64.c: Removed.
9456 * pt-pwrite.c: Removed.
9457 * pt-pwrite64.c: Removed.
9458 * pt-read.c: Removed.
9459 * pt-recv.c: Removed.
9460 * pt-recvfrom.c: Removed.
9461 * pt-recvmsg.c: Removed.
9462 * pt-send.c: Removed.
9463 * pt-sendto.c: Removed.
9464 * pt-sigtimedwait.c: Removed.
9465 * pt-sigwait.c: Removed.
9466 * pt-wait.c: Removed.
9467 * pt-waitpid.c: Removed.
9468 * pt-write.c: Removed.
9469 * pt-accept.c: Removed.
9470 * pt-close.c: Removed.
9471 * pt-connect.c: Removed.
9472 * pt-lseek64.c: Removed.
9473 * pt-sendmsg.c: Removed.
9474 * pt-tcdrain.c: Removed.
9476 2002-12-15 Ulrich Drepper <drepper@redhat.com>
9478 * init.c (__pthread_initialize_minimal_internal): Renamed from
9479 __pthread_initialize_minimal. Make old name an alias. This
9480 converts a normal relocation into a relative relocation.
9482 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9484 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9485 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9486 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9487 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9488 pt-sigwaitinfo, pt-waitid, and pt-writev.
9489 * pt-creat.c: Removed.
9490 * pt-poll.c: Removed.
9491 * pt-pselect.c: Removed.
9492 * pt-readv.c: Removed.
9493 * pt-select.c: Removed.
9494 * pt-sigpause.c: Removed.
9495 * pt-sigsuspend.c: Removed.
9496 * pt-sigwaitinfo.c: Removed.
9497 * pt-waitid.c: Removed.
9498 * pt-writev.c: Removed.
9500 * init.c (pthread_functions): New variable.
9501 (__pthread_initialize_minimal): Pass pointer to pthread_functions
9502 (or NULL) to __libc_pthread_init.
9503 * forward.c: Rewrite to use __libc:pthread_functions array to get
9505 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9507 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9508 Take new parameter. Copy content of variable pointed to by it
9509 to __libc_pthread_init.
9511 * pthreadP.h (struct pthread_functions): New type.
9512 (__libc_pthread_init): Declare.
9514 * pthread_attr_destroy.c: Add namespace protected alias.
9515 * pthread_attr_getdetachstate.c: Likewise.
9516 * pthread_attr_getinheritsched.c: Likewise.
9517 * pthread_attr_getschedparam.c: Likewise.
9518 * pthread_attr_getschedpolicy.c: Likewise.
9519 * pthread_attr_getscope.c: Likewise.
9520 * pthread_attr_setdetachstate.c: Likewise.
9521 * pthread_attr_setinheritsched.c: Likewise.
9522 * pthread_attr_setschedparam.c: Likewise.
9523 * pthread_attr_setschedpolicy.c: Likewise.
9524 * pthread_attr_setscope.c: Likewise.
9525 * pthread_cond_broadcast.c: Likewise.
9526 * pthread_cond_destroy.c: Likewise.
9527 * pthread_cond_init.c: Likewise.
9528 * pthread_cond_signal.c: Likewise.
9529 * pthread_cond_wait.c: Likewise.
9530 * pthread_condattr_destroy.c: Likewise.
9531 * pthread_condattr_init.c: Likewise.
9532 * pthread_equal.c: Likewise.
9533 * pthread_exit.c: Likewise.
9534 * pthread_getschedparam.c: Likewise.
9535 * pthread_self.c: Likewise.
9536 * pthread_setcancelstate.c: Likewise.
9537 * pthread_setschedparam.c: Likewise.
9538 * pthread_mutex_destroy.c: Likewise.
9539 * pthread_mutex_init.c: Likewise.
9540 * pthreadP.h: Add prototypes for the aliases.
9542 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9543 multiple_threads member in correct TCB to 1.
9545 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9546 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
9547 member of thread decriptor, otherwise return unconditionally 1.
9549 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9551 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9552 regular Linux version. Remove file.
9553 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
9554 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
9555 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
9556 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
9557 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
9558 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
9559 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
9560 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
9561 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
9562 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
9563 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
9564 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
9565 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
9566 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
9567 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
9568 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
9569 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
9570 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
9571 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
9572 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
9573 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
9574 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
9575 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
9576 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
9577 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
9578 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
9579 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
9580 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
9581 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
9582 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
9584 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9586 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9587 * sysdeps/unix/sysv/linux/open.c: Removed.
9588 * sysdeps/unix/sysv/linux/fsync.c: Removed.
9589 * sysdeps/unix/sysv/linux/lseek.c: Removed.
9590 * sysdeps/unix/sysv/linux/msync.c: Removed.
9591 * sysdeps/unix/sysv/linux/read.c: Removed.
9592 * sysdeps/unix/sysv/linux/close.c: Removed.
9593 * sysdeps/unix/sysv/linux/creat.c: Removed.
9594 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9595 * sysdeps/unix/sysv/linux/pause.c: Removed.
9596 * sysdeps/unix/sysv/linux/select.c: Removed.
9597 * sysdeps/unix/sysv/linux/write.c: Removed.
9599 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9601 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9602 element in TCB to see whether locking is needed.
9604 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9605 MULTIPLE_THREADS_OFFSET value is correct.
9607 * sysdeps/unix/sysv/linux/close.c: New file.
9608 * sysdeps/unix/sysv/linux/connect.S: New file.
9609 * sysdeps/unix/sysv/linux/creat.c: New file.
9610 * sysdeps/unix/sysv/linux/fsync.c: New file.
9611 * sysdeps/unix/sysv/linux/llseek.c: New file.
9612 * sysdeps/unix/sysv/linux/lseek.c: New file.
9613 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9614 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9615 * sysdeps/unix/sysv/linux/msync.c: New file.
9616 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9617 * sysdeps/unix/sysv/linux/open.c: New file.
9618 * sysdeps/unix/sysv/linux/open64.c: New file.
9619 * sysdeps/unix/sysv/linux/pause.c: New file.
9620 * sysdeps/unix/sysv/linux/poll.c: New file.
9621 * sysdeps/unix/sysv/linux/pread.c: New file.
9622 * sysdeps/unix/sysv/linux/pread64.c: New file.
9623 * sysdeps/unix/sysv/linux/pselect.c: New file.
9624 * sysdeps/unix/sysv/linux/pwrite.c: New file.
9625 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9626 * sysdeps/unix/sysv/linux/readv.c: New file.
9627 * sysdeps/unix/sysv/linux/recv.S: New file.
9628 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9629 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9630 * sysdeps/unix/sysv/linux/select.c: New file.
9631 * sysdeps/unix/sysv/linux/send.S: New file.
9632 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9633 * sysdeps/unix/sysv/linux/sendto.S: New file.
9634 * sysdeps/unix/sysv/linux/sigpause.c: New file.
9635 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9636 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9637 * sysdeps/unix/sysv/linux/sigwait.c: New file.
9638 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9639 * sysdeps/unix/sysv/linux/system.c: New file.
9640 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9641 * sysdeps/unix/sysv/linux/wait.c: New file.
9642 * sysdeps/unix/sysv/linux/waitid.c: New file.
9643 * sysdeps/unix/sysv/linux/waitpid.c: New file.
9644 * sysdeps/unix/sysv/linux/writev.c: New file.
9645 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9647 * pt-readv.c: Fix comment.
9649 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9651 * tst-cleanup1.c: Include stdlib.h.
9653 * tst-cancel5.c: New test.
9654 * Makefile (tests): Add tst-cancel5.
9655 (tst-cancel5): Link against libc.so libpthread.so in that order.
9657 2002-12-13 Ulrich Drepper <drepper@redhat.com>
9659 * forward.c (test_loaded): Prevent recursive calls.
9661 * Makefile (routines): Add libc-cancellation.
9662 * libc-cancellation.c: New file.
9663 * descr.h (struct pthread): Add multiple_threads field.
9664 * allocatestack.c (allocate_stack): Initialize multiple_header field of
9665 new thread descriptor to 1.
9666 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9667 Initialize multiple_thread field after successful thread creation.
9668 * cancellation.c (__do_cancel): Move to pthreadP.h.
9669 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9670 (__pthread_disable_asynccancel): Add internal_function attribute.
9671 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9672 * pthread_setcancelstate.c: Likewise.
9673 * pthread_setcanceltype.c: Likewise.
9674 * pthread_exit.c: Likewise.
9675 * pthreadP.h (CANCELLATION_P): Likewise.
9676 (__do_cancel): Define as static inline.
9677 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9678 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9680 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9681 fields. Define MULTIPLE_THREADS_OFFSET.
9682 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9684 * sysdeps/unix/sysv/linux/accept.S: New file.
9685 * sysdeps/unix/sysv/linux/read.c: New file.
9686 * sysdeps/unix/sysv/linux/write.c: New file.
9687 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9688 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9689 initialization of __libc_locking_needed.
9690 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9691 __libc_locking_needed, use multiple_threads field in TCB.
9692 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9694 2002-12-12 Ulrich Drepper <drepper@redhat.com>
9696 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9698 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9700 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9701 access to __libc_locking_needed for PIC.
9703 2002-12-12 Jakub Jelinek <jakub@redhat.com>
9705 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9706 declare for libc.so.
9707 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9709 (__libc_lock_lock): Put into statement expression.
9710 (__libc_lock_unlock): Remove trailing semicolon.
9711 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9713 2002-12-12 Roland McGrath <roland@redhat.com>
9715 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9716 "m" constraint to refer to __libc_locking_needed. Declare it here.
9718 2002-12-12 Ulrich Drepper <drepper@redhat.com>
9720 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9721 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9722 Initialize __libc_locking_needed.
9723 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9724 instead of __register_pthread_fork_handler.
9725 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9726 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9727 fork-gen with libc_pthread_init.
9728 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9729 of __register_pthread_fork_handler.
9730 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9731 of __register_pthread_fork_handler.
9732 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9733 __libc_locking_needed to determine whether lock prefix can be avoided.
9734 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9736 2002-12-11 Ulrich Drepper <drepper@redhat.com>
9738 * Makefile (tests): Add tst-cleanup1.
9739 * tst-cleanup1.c: New file.
9740 * cancellation.c (__cleanup_thread): Removed.
9741 (__do_cancel): Remove call to __cleanup_thread.
9742 * pthreadP.h: Remove __cleanup_thread prorotype.
9744 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9745 Remember function and argument even if cancellation handler
9746 function is not available.
9747 (__libc_cleanup_region_end): Execute registered function directly if
9748 pthread functions are not available.
9749 (__libc_cleanup_end): Likewise.
9751 * init.c (__pthread_initialize_minimal): Fix initialization in
9752 static lib by preventing gcc from being too clever.
9754 2002-12-10 Ulrich Drepper <drepper@redhat.com>
9756 * init.c (__pthread_initialize_minimal): Remove unneccesary
9759 * Makefile (tests): We can run tst-locale2 now.
9761 2002-12-09 Ulrich Drepper <drepper@redhat.com>
9763 * Versions: Remove duplicated sigwait entry.
9765 2002-12-08 Ulrich Drepper <drepper@redhat.com>
9767 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9770 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9772 * pthreadP.h: Declare __pthread_enable_asynccancel and
9773 __pthread_disable_asynccancel.
9774 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9775 (CANCEL_RESET): Use __pthread_disable_asynccancel.
9776 * cancellation.c (__pthread_enable_asynccancel): New function.
9777 (__pthread_disable_asynccancel): New function.
9778 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9779 * pt-close.c: Likewise.
9780 * pt-connect.c: Likewise.
9781 * pt-creat.c: Likewise.
9782 * pt-fcntl.c: Likewise.
9783 * pt-fsync.c: Likewise.
9784 * pt-lseek.c: Likewise.
9785 * pt-lseek64.c: Likewise.
9786 * pt-msgrcv.c: Likewise.
9787 * pt-msgsnd.c: Likewise.
9788 * pt-msync.c: Likewise.
9789 * pt-nanosleep.c: Likewise.
9790 * pt-open.c: Likewise.
9791 * pt-open64.c: Likewise.
9792 * pt-pause.c: Likewise.
9793 * pt-poll.c: Likewise.
9794 * pt-pread.c: Likewise.
9795 * pt-pread64.c: Likewise.
9796 * pt-pselect.c: Likewise.
9797 * pt-pwrite.c: Likewise.
9798 * pt-pwrite64.c: Likewise.
9799 * pt-read.c: Likewise.
9800 * pt-readv.c: Likewise.
9801 * pt-recv.c: Likewise.
9802 * pt-recvfrom.c: Likewise.
9803 * pt-recvmsg.c: Likewise.
9804 * pt-select.c: Likewise.
9805 * pt-send.c: Likewise.
9806 * pt-sendmsg.c: Likewise.
9807 * pt-sendto.c: Likewise.
9808 * pt-sigpause.c: Likewise.
9809 * pt-sigsuspend.c: Likewise.
9810 * pt-sigtimedwait.c: Likewise.
9811 * pt-sigwait.c: Likewise.
9812 * pt-sigwaitinfo.c: Likewise.
9813 * pt-system.c: Likewise.
9814 * pt-tcdrain.c: Likewise.
9815 * pt-wait.c: Likewise.
9816 * pt-waitid.c: Likewise.
9817 * pt-waitpid.c: Likewise.
9818 * pt-write.c: Likewise.
9819 * pt-writev.c: Likewise.
9820 * pthread_join.c: Likewise.
9821 * pthread_timedjoin.c: Likewise.
9823 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9824 (__xpg_sigpause): New function.
9825 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9827 2002-12-07 Ulrich Drepper <drepper@redhat.com>
9829 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9831 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9832 _GI_pthread_cleanup_pop to pthreadP.h.
9834 * ftrylockfile.c: Use _IO_lock_trylock instead of
9835 pthread_mutex_trylock.
9837 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9838 (CANCEL_RESET): Likewise.
9839 (__pthread_setcanceltype_): Declare.
9840 (__pthread_mutex_lock_internal): Declare.
9841 (__pthread_mutex_unlock_internal): Declare.
9842 (__pthread_once_internal): Declare.
9843 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9844 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9846 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9847 and pthread_mutex_unlock.
9848 * pthread_cond_wait.c: Likewise.
9849 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9850 * pthread_mutex_unlock.c: Likewise.
9852 * pthread_setcanceltype.c: Add additional alias
9853 __pthread_setcanceltype.
9855 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9856 * sem_open.c (sem_open): Likewise.
9857 Use __libc_open, __libc_write, and __libc_close instead of
9858 open, write, and close respectively.
9860 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9861 Rewrite as statement expression since it must return a value.
9863 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9864 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9867 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9868 alias __pthread_once_internal.
9870 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9872 2002-12-06 Ulrich Drepper <drepper@redhat.com>
9874 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9875 * tst-stdio1.c: New file.
9876 * tst-stdio2.c: New file.
9878 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9880 * Makefile (tests): Comment out tst-locale2 for now.
9881 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9883 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9885 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9886 Use _IO_lock_init instead of explicit assignment.
9888 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9889 Define __libc_lock_* and __libc_lock_recursive macros with
9890 lowlevellock macros, not pthread mutexes.
9892 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
9893 of pthread_mutex_lock.
9894 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
9895 instead of pthread_mutex_unlock.
9897 2002-12-06 Roland McGrath <roland@redhat.com>
9899 * allocatestack.c (__stack_user): Use uninitialized defn.
9900 * init.c (__pthread_initialize_minimal): Initialize it here.
9902 2002-12-05 Roland McGrath <roland@redhat.com>
9904 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9906 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9908 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9911 2002-12-05 Ulrich Drepper <drepper@redhat.com>
9913 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9915 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9916 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
9917 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
9918 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
9919 for __libc_lock_* macros.
9920 * Makefile (routines): Add libc-lowlevellock.
9922 2002-10-09 Roland McGrath <roland@redhat.com>
9924 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
9925 Under [__PIC__], call the function via the pointer fetched for
9926 comparison rather than a call by name that uses the PLT.
9927 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
9928 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
9929 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
9930 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
9931 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
9933 2002-12-04 Roland McGrath <roland@redhat.com>
9935 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
9937 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
9938 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
9940 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
9942 2002-12-04 Ulrich Drepper <drepper@redhat.com>
9944 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
9945 a completely opaque, non-integer type.
9946 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9948 2002-12-05 Jakub Jelinek <jakub@redhat.com>
9950 * sysdeps/i386/tls.h: Include stdlib.h.
9951 * sysdeps/x86_64/tls.h: Likewise.
9953 2002-12-04 Ulrich Drepper <drepper@redhat.com>
9955 * Makefile (tests): Add tst-locale2.
9956 (tests-static): Likewise.
9957 * tst-locale2.c: New file.
9959 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
9960 volatile and add memory clobbers to lock operations.
9962 2002-12-03 Ulrich Drepper <drepper@redhat.com>
9964 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
9965 * sysdeps/i386/i486/bits/atomic.h: New file.
9966 * sysdeps/i386/i586/bits/atomic.h: New file.
9967 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
9968 include i486 version.
9969 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
9970 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
9971 Patch by Marijn Ros <marijn@mad.scientist.com>.
9973 * allocatestack.c (get_cached_stack): Don't crash if we first
9974 found a stack with a larger size then needed.
9975 Reported by Hui Huang <hui.huang@sun.com>.
9977 * Makefile (tests): Add tst-sysconf.
9978 * tst-sysconf.c: New file.
9980 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
9981 PTHREAD_THREADS_MAX.
9983 2002-12-02 Roland McGrath <roland@redhat.com>
9985 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
9986 Declare using hidden_proto instead of attribute_hidden, so there are
9987 non-.hidden static symbols for gdb to find.
9988 (__pthread_keys): Likewise.
9989 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
9990 * allocatestack.c (__stack_user): Likewise.
9991 * pthread_create.c (__pthread_keys): Likewise.
9992 (__nptl_threads_events, __nptl_last_event): Make these static instead
9994 * pthread_key_create.c (__pthread_pthread_keys_max,
9995 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
9997 2002-12-02 Ulrich Drepper <drepper@redhat.com>
9999 * Makefile (tests): Add tst-locale1. If buid-static is yes link
10001 * tst-locale1.c: New file.
10003 * pthread_cond_timedwait.c: Include <stdlib.h>.
10005 * Makefile (tests): Add tst-fork2 and tst-fork3.
10006 * tst-fork2.c: New file.
10007 * tst-fork3.c: New file.
10009 2002-11-28 Ulrich Drepper <drepper@redhat.com>
10011 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10013 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10014 require it to 200112L.
10016 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10017 instruction only if HAVE_CMOV is defined.
10018 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10020 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10022 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10024 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10026 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10028 2002-11-27 Ulrich Drepper <drepper@redhat.com>
10030 * sysdeps/x86_64/bits/atomic.h: New file.
10032 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10035 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10036 possible since gettid cannot fail.
10038 * sysdeps/x86_64/pthreaddef.h: New file.
10040 * sysdeps/i386/pthreaddef.h (gettid): Removed.
10042 * sysdeps/x86_64/pthread_spin_init.c: New file.
10043 * sysdeps/x86_64/pthread_spin_lock.c: New file.
10044 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10045 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10047 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10048 Add missing lock prefix. Minute optimization.
10050 * tst-spin2.c (main): Also check successful trylock call.
10052 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10053 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
10055 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10056 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
10058 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
10059 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10060 value in case of an error. Add support for INTERNAL_SYSCALL.
10062 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10063 value in case of an error.
10065 * sysdeps/x86_64/tls.h: New file.
10067 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10069 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
10070 takes the array member name and the index as parameters.
10071 (THREAD_SETMEM_NC): Likewise.
10072 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10073 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10076 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10077 to decide which code to use.
10078 (THREAD_SETMEM_NC): Likewise.
10080 * allocatestack.c (queue_stack): Don't remove stack from list here.
10081 Do it in the caller. Correct condition to prematurely terminate
10082 loop to free stacks.
10083 (__deallocate_stack): Remove stack from list here.
10085 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10087 * Makefile (tests): Add tst-stack1.
10088 * tst-stack1.c: New file.
10090 * allocatestack.c (allocate_stack): Initialize the TCB on a user
10093 * pthread_attr_getstack.c: Return bottom of the thread area.
10095 2002-11-25 Ulrich Drepper <drepper@redhat.com>
10097 * Makefile (libpthread-routines): Add pt-allocrtsig and
10098 pthread_kill_other_threads.
10099 * pt-allocrtsig.c: New file.
10100 * pthread_kill_other_threads.c: New file.
10101 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10102 all three functions.
10103 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10105 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10106 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10107 and __libc_allocate_rtsig_private.
10108 * Versions (libpthread): Export pthread_kill_other_threads_np,
10109 __libc_current_sigrtmin, and __libc_current_sigrtmax.
10111 2002-11-24 Ulrich Drepper <drepper@redhat.com>
10113 * allocatestack.c (allocate_stack): stackaddr in attribute points to
10114 the end of the stack. Adjust computations.
10115 When mprotect call fails dequeue stack and free it.
10116 * pthread_attr_setstack.c: Store top of the stack in stackaddr
10118 * pthread_getattr_np.c: Likewise.
10120 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10123 2002-11-23 Ulrich Drepper <drepper@redhat.com>
10125 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10126 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10128 2002-11-22 Ulrich Drepper <drepper@redhat.com>
10130 * pthread_getspecific.c: Optimize access to first 2nd-level array.
10131 * pthread_setspecific.c: Likewise.
10133 2002-11-21 Ulrich Drepper <drepper@redhat.com>
10135 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10136 definitions. Get them from the official place.
10137 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10139 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10140 Use new CLONE_ flags in clone() calls.
10142 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10143 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10145 * Versions: Add pthread_* functions for libc.
10146 * forward.c: New file.
10148 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10150 * herrno.c: New file.
10153 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10154 sem_trywait, and sem_timedwait. Add herrno and res.
10155 * sem_init.c: Don't initialize lock and waiters members.
10156 * sem_open.c: Likewise.
10157 * sem_post.c: Removed.
10158 * sem_wait.c: Removed.
10159 * sem_trywait.c: Removed.
10160 * sem_timedwait.c: Removed.
10161 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10162 Includes full implementations of sem_post, sem_wait, sem_trywait,
10164 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10165 for new implementation.
10166 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10167 and waiters fields.
10169 * tst-sem3.c: Improve error message.
10170 * tst-signal3.c: Likewise.
10172 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10173 to tell the kernel about the termination futex and to initialize tid
10174 member. Don't initialize main_thread.
10175 * descr.h (struct pthread): Remove main_thread member.
10176 * cancelllation.c (__do_cancel): Remove code handling main thread.
10177 The main thread is not special anymore.
10179 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
10180 size of the stacks to stack_cache_actsize.
10182 * pt-readv.c: Add missing "defined".
10183 * pt-sigwait.c: Likewise.
10184 * pt-writev.c: Likewise.
10186 2002-11-09 Ulrich Drepper <drepper@redhat.com>
10188 * Versions: Export __connect from libpthread.
10189 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10191 * Makefile (libpthread-routines): Add pt-raise.
10192 * sysdeps/unix/sysv/linux/raise.c: New file.
10193 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10194 * sysdeps/generic/pt-raise.c: New file.
10196 * pthread_cond_init.c: Initialize all data elements of the condvar
10197 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10199 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10200 * pthread_create.c: Likewise.
10202 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10203 * tst-key1.c: New file.
10204 * tst-key2.c: New file.
10205 * tst-key3.c: New file.
10207 * Versions: Export pthread_detach for version GLIBC_2.0.
10208 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10210 2002-11-08 Ulrich Drepper <drepper@redhat.com>
10212 * pthread_key_create.c: Terminate search after an unused key was found.
10213 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10215 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10216 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10218 2002-10-10 Ulrich Drepper <drepper@redhat.com>
10220 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10221 dynamic lookup for errno in PIC.
10223 * allocatestack.c (get_cached_stack): Rearrange code slightly to
10224 release the stack lock as soon as possible.
10225 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10226 the static TLS block.
10227 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10229 * cancellation.c: Renamed from cancelation.c.
10230 * Makefile: Adjust accordingly.
10231 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10232 * cleanup_defer.c: Use CANCELLATION_P.
10233 * pthread_testcancel.c: Likewise.
10234 * descr.h: Fix spelling in comments.
10235 * init.c: Likewise.
10236 * pthread_getattr_np.c: Likewise.
10237 * pthread_getschedparam.c: Likewise.
10238 * pthread_setschedparam.c: Likewise.
10239 * Versions: Likewise.
10241 * pt-pselect.c: New file.
10242 * Makefile (libpthread-routines): Add pt-pselect.
10243 * Versions: Add pselect.
10245 * tst-cancel4.c: New file.
10246 * Makefile (tests): Add tst-cancel4.
10248 2002-10-09 Ulrich Drepper <drepper@redhat.com>
10250 * pthread_mutex_lock.c: Always record lock ownership.
10251 * pthread_mutex_timedlock.c: Likewise.
10252 * pthread_mutex_trylock.c: Likewise.
10254 * pt-readv.c: New file.
10255 * pt-writev.c: New file.
10256 * pt-creat.c: New file.
10257 * pt-msgrcv.c: New file.
10258 * pt-msgsnd.c: New file.
10259 * pt-poll.c: New file.
10260 * pt-select.c: New file.
10261 * pt-sigpause.c: New file.
10262 * pt-sigsuspend.c: New file.
10263 * pt-sigwait.c: New file.
10264 * pt-sigwaitinfo.c: New file.
10265 * pt-waitid.c: New file.
10266 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10267 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10268 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10269 * Versions: Add all the new functions.
10271 * tst-exit1.c: New file.
10272 * Makefile (tests): Add tst-exit1.
10274 * sem_timedwait.c: Minor optimization for more optimal fastpath.
10276 2002-10-08 Ulrich Drepper <drepper@redhat.com>
10278 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10280 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10281 call. pthread_join is an official cancellation point.
10282 * pthread_timedjoin.c: Likewise.
10284 * pthread_cond_wait.c: Revert order in which internal lock are dropped
10285 and the condvar's mutex are retrieved.
10286 * pthread_cond_timedwait.c: Likewise.
10287 Reported by dice@saros.East.Sun.COM.
10289 2002-10-07 Ulrich Drepper <drepper@redhat.com>
10291 * pthreadP.h: Cut out all type definitions and move them...
10292 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
10293 * pthreadP.h: Include <internaltypes.h>.
10295 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10296 performance tweaks.
10298 * sem_trywait.c: Shuffle #includes around to get right order.
10299 * sem_timedwait.c: Likewise.
10300 * sem_post.c: Likewise.
10301 * sem_wait.c: Likewise.
10303 * nptl 0.3 released.
10305 * Makefile (tests): Add tst-signal3.
10306 * tst-signal3.c: New file.
10308 2002-10-05 Ulrich Drepper <drepper@redhat.com>
10310 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10311 the asms modify the sem object.
10312 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10314 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10315 the actual members.
10316 * pthreadP.h (struct sem): New type. Actual semaphore type.
10317 * semaphoreP.h: Include pthreadP.h.
10318 * sem_getvalue.c: Adjust to sem_t change.
10319 * sem_init.c: Likewise.
10320 * sem_open.c: Likewise.
10321 * sem_post.c: Likewise.
10322 * sem_timedwait.c: Likewise.
10323 * sem_trywait.c: Likewise.
10324 * sem_wait.c: Likewise.
10326 2002-10-04 Ulrich Drepper <drepper@redhat.com>
10328 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10329 * tst-basic2.c: New file.
10330 * tst-exec1.c: New file.
10331 * tst-exec2.c: New file.
10332 * tst-exec3.c: New file.
10334 * tst-fork1.c: Remove extra */.
10336 * nptl 0.2 released. The API for IA-32 is complete.