1 2008-01-15 Ulrich Drepper <drepper@redhat.com>
3 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
4 thread returns the program exits with an error code.
6 2008-01-10 Ulrich Drepper <drepper@redhat.com>
8 * pthread-errnos.sym: Add EOVERFLOW.
9 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
10 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
11 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
12 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
14 2007-12-14 Ulrich Drepper <drepper@redhat.com>
16 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
17 parameter. Passed it as permission to mmap.
18 * allocatestack.c (allocate_stack): Pass prot as second parameter
21 2007-12-12 Ulrich Drepper <drepper@redhat.com>
23 * tst-basic7.c: Allocate memory for the stack.
26 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
27 (__pthread_cond_timedwait): Don't use VDSO.
28 Patch by Michal Januszewski.
30 2007-12-07 Ulrich Drepper <drepper@redhat.com>
33 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
34 Allow label before pthread_cleanup_pop.
35 (pthread_cleanup_pop_restore_np): Likewise.
37 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
39 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
40 Store 2 before returning ETIMEDOUT.
42 2007-11-23 Ulrich Drepper <drepper@redhat.com>
44 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
45 Store 2 before returning ETIMEDOUT.
46 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
47 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
48 (__lll_lock_wait_private): Optimize.
49 (__lll_lock_wait): Likewise.
51 2007-11-20 Jakub Jelinek <jakub@redhat.com>
53 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
54 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
55 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
57 2007-11-08 Ulrich Drepper <drepper@redhat.com>
60 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
61 If we time out, try one last time to lock the futex to avoid
62 losing a wakeup signal.
63 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
64 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
67 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
70 2007-11-07 Ulrich Drepper <drepper@redhat.com>
73 * allocatestack.c (allocate_stack): Change ENOMEM error in case
74 mmap failed to EAGAIN.
75 * Makefile (tests): Add tst-basic7.
76 * tst-basic7.c: New file.
78 2007-11-05 Ulrich Drepper <drepper@redhat.com>
80 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
83 2007-11-03 Mike Frysinger <vapier@gentoo.org>
85 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
86 missing line continuations.
87 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
88 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
90 2007-10-28 Ulrich Drepper <drepper@redhat.com>
93 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
94 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
95 (struct timer): Add next element.
96 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
97 enqueue timer structure into __active_timer_sigev_thread list.
98 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
99 remove timer struct from __active_timer_sigev_thread.
100 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
101 Before using timer structure make sure it is still on the
102 __active_timer_sigev_thread list. Keep lock until done.
103 Define __active_timer_sigev_thread and
104 __active_timer_sigev_thread_lock.
106 2007-10-27 Ulrich Drepper <drepper@redhat.com>
108 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
109 Redefine thread_atfork for use of ATFORK_MEM.
110 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
111 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
113 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
114 Use atomic operation when removing first element of list.
116 2007-10-17 Jakub Jelinek <jakub@redhat.com>
118 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
119 routine instead of an alias to __new_sem_post.
121 2007-10-15 Jakub Jelinek <jakub@redhat.com>
123 * init.c (__pthread_initialize_minimal): Initialize word to appease
126 2007-10-10 Jakub Jelinek <jakub@redhat.com>
128 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
129 libc.so just clear NAME.
130 (__libc_rwlock_fini): Nop inside of libc.so.
131 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
134 2007-09-02 Ulrich Drepper <drepper@redhat.com>
136 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
137 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
139 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
141 2007-08-21 Ulrich Drepper <drepper@redhat.com>
144 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
145 reclaimed stack if necessary.
146 * Makefile (tests): Add tst-tsd6.
147 * tst-tsd6.c: New file.
149 2007-08-21 Jakub Jelinek <jakub@redhat.com>
151 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
152 Add private argument.
154 2007-08-20 Ulrich Drepper <drepper@redhat.com>
156 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
157 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
159 2007-08-16 Jakub Jelinek <jakub@redhat.com>
161 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
162 (__lll_robust_timedlock): Pass private as last argument to
163 __lll_robust_timedlock_wait.
164 (__lll_unlock): Fix a pasto.
166 2007-08-15 Jakub Jelinek <jakub@redhat.com>
168 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
169 sparc_old_sem): New structs.
170 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
171 (__sem_wait_cleanup): New function.
172 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
173 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
174 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
176 (__old_sem_wait): New function.
177 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
178 nptl/sysdeps/unix/sysv/linux/sparc version.
179 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
181 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
182 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
183 (__new_sem_trywait): Use sparc_old_sem structure.
184 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
185 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
186 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
187 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
188 lll_futex_timed_wait.
189 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
190 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
191 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
193 (__old_sem_post): New function.
194 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
195 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
196 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
197 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
198 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
199 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
201 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
203 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
204 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
205 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
206 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
207 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
208 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
209 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
211 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
212 kernel-features.h and tcb-offsets.h.
213 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
214 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
216 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
218 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
219 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
221 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
222 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
223 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
224 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
225 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
226 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
227 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
229 2007-08-14 Jakub Jelinek <jakub@redhat.com>
231 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
232 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
233 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
234 lll_futex_timed_wait.
236 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
237 __lll_robust_unlock): Rewrite as macros instead of inline functions.
238 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
239 __lll_robust_unlock, __lll_wait_tid): Likewise.
241 2007-08-13 Jakub Jelinek <jakub@redhat.com>
243 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
245 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
246 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
247 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
248 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
249 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
250 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
251 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
252 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
254 (__pthread_cond_wait, __condvar_w_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_loc1 and some
257 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
258 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
259 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
260 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
261 process private. Switch DW_CFA_advance_loc{1,2} and some
262 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
263 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
264 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
265 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
267 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
268 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
269 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
271 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
272 (__pthread_cond_broadcast): Compare %r8 instead of
273 dep_mutex-cond_*(%rdi) with $-1.
274 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
275 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
278 2007-08-13 Ulrich Drepper <drepper@redhat.com>
280 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
282 2007-08-13 Jakub Jelinek <jakub@redhat.com>
284 * allocatestack.c: Include kernel-features.h.
285 * pthread_create.c: Likewise.
286 * pthread_mutex_init.c: Likewise.
288 * pthread_cond_timedwait.c: Likewise.
289 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
290 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
291 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
292 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
293 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
294 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
295 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
297 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
299 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
300 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
301 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
302 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
304 2007-08-12 Jakub Jelinek <jakub@redhat.com>
306 * sysdeps/unix/sysv/linux/sparc/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/s390/bits/pthreadtypes.h
312 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
313 byte elements. One of them is the new __shared element.
314 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
315 adjust names of other padding elements.
316 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
317 Renamed __pad1 element to __shared, adjust names of other padding
319 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
320 (pthread_rwlock_t): Likewise.
321 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
324 2007-08-09 Anton Blanchard <anton@samba.org>
326 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
328 2007-08-12 Ulrich Drepper <drepper@redhat.com>
330 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
332 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
334 2007-08-11 Ulrich Drepper <drepper@redhat.com>
336 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
337 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
338 dealing with robust mutexes.
339 * pthread_mutex_timedlock.c: Likewise.
340 * pthread_mutex_trylock.c: Likewise.
341 * pthread_mutex_unlock.c: Likewise.
342 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
344 2007-08-06 Jakub Jelinek <jakub@redhat.com>
346 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
347 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
348 (PTHREAD_MUTEX_PSHARED): Define.
349 * pthread_mutex_init.c (__pthread_mutex_init): Set
350 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
352 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
353 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
354 as second argument to lll_lock.
355 (LLL_MUTEX_TRYLOCK): Take mutex as argument
356 instead of its __data.__lock field.
357 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
358 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
360 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
361 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
362 instead of mutex->__data.__kind directly, pass
363 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
364 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
365 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
366 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
367 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
368 to lll_timedlock, lll_robust_timedlock, lll_unlock and
369 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
370 of mutex->__data.__kind directly.
371 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
372 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
373 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
374 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
375 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
376 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
378 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
379 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
380 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
382 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
383 Take mutex as argument instead of its __data.__lock field, pass
384 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
385 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
387 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
388 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
389 to lll_robust_cond_lock.
390 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
391 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
392 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
393 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
394 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
395 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
397 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
398 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
400 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
401 pshared variable, pass it to lll_lock, lll_unlock,
402 lll_futex_timedwait and lll_futex_wake.
403 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
404 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
406 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
407 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
409 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
410 lll_futex_wake_unlock): Likewise.
411 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
413 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
414 lll_futex_wake_unlock): Likewise.
415 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
417 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
418 lll_futex_wake_unlock): Likewise.
419 (lll_futex_wake): Fix a typo.
420 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
421 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
422 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
423 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
424 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
425 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
426 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
427 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
428 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
429 (__pthread_cond_timedwait): Likewise.
430 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
431 (__condvar_cleanup, __pthread_cond_wait): Likewise.
433 2007-08-05 Jakub Jelinek <jakub@redhat.com>
435 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
436 Don't use CGOTSETUP and CGOTRESTORE macros.
437 (CGOTSETUP, CGOTRESTORE): Remove.
438 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
441 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
443 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
444 definitions for private futexes.
445 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
446 kernel-features.h and lowlevellock.h. Use private futexes if
448 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
449 (__lll_mutex_lock_wait): Rename to
450 (__lll_lock_wait): ... this. Don't compile in for libc.so.
451 (__lll_mutex_timedlock_wait): Rename to ...
452 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
453 Don't compile in for libc.so.
454 (__lll_mutex_unlock_wake): Rename to ...
455 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
456 (__lll_timedwait_tid): Use __NR_gettimeofday.
457 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
458 the header from assembler. Renamed all lll_mutex_* resp.
459 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
460 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
461 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
463 (__lll_lock_wait_private): Add prototype.
464 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
465 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
466 __lll_unlock_wake): Likewise.
467 (lll_lock): Add private argument. Call __lll_lock_wait_private
468 if private is constant LLL_PRIVATE.
469 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
470 lll_timedlock, lll_robust_timedlock): Add private argument.
471 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
472 if private is constant LLL_PRIVATE.
473 (lll_robust_unlock, lll_robust_dead): Add private argument.
474 (lll_lock_t): Remove.
475 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
476 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
477 lll_cond_wake, lll_cond_broadcast): Remove.
478 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
479 kernel-features.h and lowlevellock.h.
480 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
481 (LOAD_FUTEX_WAIT): Define.
482 (__lll_robust_mutex_lock_wait): Rename to ...
483 (__lll_robust_lock_wait): ... this. Add private argument.
484 Use LOAD_FUTEX_WAIT macro.
485 (__lll_robust_mutex_timedlock_wait): Rename to ...
486 (__lll_robust_timedlock_wait): ... this. Add private argument.
487 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
488 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
490 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
491 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
492 __lll_mutex_{lock,unlock}_*.
493 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
494 lowlevellock.h and pthread-errnos.h.
495 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
496 FUTEX_CMP_REQUEUE, EINVAL): Remove.
497 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
498 __lll_mutex_{lock,unlock}_*.
499 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
500 lowlevellock.h and pthread-errnos.h.
501 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
502 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
503 __lll_mutex_{lock,unlock}_*.
504 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
506 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
507 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
508 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
509 (__condvar_tw_cleanup): Likewise.
510 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
512 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
513 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
514 __lll_mutex_{lock,unlock}_*.
515 ( __condvar_w_cleanup): Likewise.
516 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
517 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
518 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
520 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
521 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
522 __lll_mutex_{lock,unlock}_*.
523 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
525 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
526 FUTEX_PRIVATE_FLAG): Remove.
527 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
528 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
529 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
531 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
532 FUTEX_PRIVATE_FLAG): Remove.
533 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
534 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
535 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
537 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
538 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
539 __lll_mutex_{lock,unlock}_*.
540 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
542 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
543 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
544 __lll_mutex_{lock,unlock}_*.
545 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
546 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
547 (__new_sem_post): Use standard initial exec code sequences.
548 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
550 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
551 FUTEX_PRIVATE_FLAG): Remove.
552 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
554 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
555 (__new_sem_trywait): Use standard initial exec code sequences.
556 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
557 (__new_sem_wait): Use standard initial exec code sequences.
559 2007-07-31 Anton Blanchard <anton@samba.org>
561 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
562 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
565 2007-07-31 Jakub Jelinek <jakub@redhat.com>
567 * allocatestack.c (stack_cache_lock): Change type to int.
568 (get_cached_stack, allocate_stack, __deallocate_stack,
569 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
570 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
571 as second argument to lll_lock and lll_unlock macros on
573 * pthread_create.c (__find_in_stack_list): Likewise.
574 (start_thread): Similarly with pd->lock. Use lll_robust_dead
575 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
577 * descr.h (struct pthread): Change lock and setxid_futex field
579 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
580 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
581 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
582 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
584 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
585 * pthread_cond_init.c (__pthread_cond_init): Likewise.
586 * pthreadP.h (__attr_list_lock): Change type to int.
587 * pthread_attr_init.c (__attr_list_lock): Likewise.
588 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
589 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
591 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
592 also for lll_futex_{wake,wait}.
593 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
595 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
596 LLL_SHARED as second argument to lll_{,un}lock.
597 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
598 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
599 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
600 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
602 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
603 as second argument to lll_{,un}lock macros on pd->lock.
604 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
605 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
606 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
607 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
609 * sysdeps/pthread/createthread.c (do_clone, create_thread):
611 * pthread_once.c (once_lock): Change type to int.
612 (__pthread_once): Pass LLL_PRIVATE as second argument to
613 lll_{,un}lock macros on once_lock.
614 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
615 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
616 rwlock->__data.__shared as second argument to them and similarly
618 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
620 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
622 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
623 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
624 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
625 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
626 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
627 to lll_{,un}lock macros on __sem_mappings_lock.
628 * sem_open.c (check_add_mapping): Likewise.
629 (__sem_mappings_lock): Change type to int.
630 * semaphoreP.h (__sem_mappings_lock): Likewise.
631 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
632 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
633 instead of lll_*mutex_*, pass LLL_SHARED as last
635 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
636 pass LLL_SHARED as last argument.
637 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
638 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
639 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
640 pass LLL_SHARED as last argument.
641 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
642 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
643 LLL_SHARED as last argument.
644 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
645 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
647 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
648 __libc_lock_lock_recursive, __libc_lock_unlock,
649 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
650 argument to lll_{,un}lock.
651 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
652 _IO_lock_unlock): Likewise.
653 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
655 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
656 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
658 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
660 (__fork_lock): Change type to int.
661 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
662 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
663 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
665 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
666 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
667 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
669 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
670 pass it through to lll_futex_*wait, only compile in when
672 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
673 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
674 argument and pass it through to lll_futex_*wait.
675 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
676 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
677 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
678 inline functions to __lll_* resp. __lll_robust_*.
679 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
680 (lll_mutex_dead): Add private argument.
681 (__lll_lock_wait_private): New prototype.
682 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
683 __lll_robust_lock_timedwait): Add private argument to prototypes.
684 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
685 call __lll_lock_wait_private, otherwise pass private to
687 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
688 __lll_robust_timedlock): Add private argument, pass it to
689 __lll_*wait functions.
690 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
691 call __lll_unlock_wake_private, otherwise pass private to
693 (__lll_robust_unlock): Add private argument, pass it to
694 __lll_robust_unlock_wake.
695 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
696 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
697 argument, pass it through to __lll_* inline function.
698 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
699 (lll_lock_t): Remove.
700 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
701 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
702 lll_cond_wake, lll_cond_broadcast): Remove.
703 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
704 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
705 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
706 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
707 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
708 the header from assembler. Renamed all lll_mutex_* resp.
709 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
710 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
711 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
712 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
713 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
714 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
715 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
717 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
718 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
719 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
720 (lll_trylock): Likewise, use __lll_trylock_asm, pass
721 MULTIPLE_THREADS_OFFSET as another asm operand.
722 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
723 MULTIPLE_THREADS_OFFSET as last asm operand, call
724 __lll_lock_wait_private if private is constant LLL_PRIVATE,
725 otherwise pass private as another argument to __lll_lock_wait.
726 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
727 lll_timedlock, lll_robust_timedlock): Add private argument, pass
728 private as another argument to __lll_*lock_wait call.
729 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
730 MULTIPLE_THREADS_OFFSET as another asm operand, call
731 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
732 otherwise pass private as another argument to __lll_unlock_wake.
733 (lll_robust_unlock): Add private argument, pass private as another
734 argument to __lll_unlock_wake.
735 (lll_robust_dead): Add private argument, use __lll_private_flag
737 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
738 LLL_MUTEX_LOCK_INITIALIZER.
739 (lll_lock_t): Remove.
740 (LLL_LOCK_INITIALIZER_WAITERS): Define.
741 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
742 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
743 lll_cond_wake, lll_cond_broadcast): Remove.
744 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
745 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
746 2007-05-2{3,9} changes.
747 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
748 kernel-features.h and lowlevellock.h.
749 (LOAD_PRIVATE_FUTEX_WAIT): Define.
750 (LOAD_FUTEX_WAIT): Rewritten.
751 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
753 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
754 (__lll_mutex_lock_wait): Rename to ...
755 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
756 %ecx, %ecx is now private argument. Don't compile in for libc.so.
757 (__lll_mutex_timedlock_wait): Rename to ...
758 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
759 contains private argument. Don't compile in for libc.so.
760 (__lll_mutex_unlock_wake): Rename to ...
761 (__lll_unlock_wake): ... this. %ecx contains private argument.
762 Don't compile in for libc.so.
763 (__lll_timedwait_tid): Use __NR_gettimeofday.
764 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
765 kernel-features.h and lowlevellock.h.
766 (LOAD_FUTEX_WAIT): Define.
767 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
769 (__lll_robust_mutex_lock_wait): Rename to ...
770 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
771 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
773 (__lll_robust_mutex_timedlock_wait): Rename to ...
774 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
775 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
776 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
778 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
779 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
780 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
781 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
782 to __lll_lock_wait in %edx.
783 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
784 Include lowlevellock.h and pthread-errnos.h.
785 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
786 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
787 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
788 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
789 pass LLL_SHARED in %ecx to both __lll_lock_wait and
791 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
792 Include lowlevellock.h and pthread-errnos.h.
793 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
794 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
795 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
796 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
797 pass LLL_SHARED in %ecx to both __lll_lock_wait and
799 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
800 Include lowlevellock.h.
801 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
803 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
804 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
805 pass LLL_SHARED in %ecx to both __lll_lock_wait and
806 __lll_unlock_wake. Use __NR_gettimeofday.
807 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
808 Include lowlevellock.h.
809 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
810 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
811 to __lll_*, pass cond_lock address in %edx rather than %ecx to
812 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
813 and __lll_unlock_wake.
814 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
815 Include lowlevellock.h.
816 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
817 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
818 MUTEX(%ebx) address in %edx rather than %ecx to
819 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
820 and __lll_unlock_wake. Move return value from %ecx to %edx
822 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
823 Include lowlevellock.h.
824 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
826 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
827 MUTEX(%ebp) address in %edx rather than %ecx to
828 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
829 and __lll_unlock_wake. Move return value from %ecx to %edx
830 register. Use __NR_gettimeofday.
831 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
832 Include lowlevellock.h.
833 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
835 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
836 MUTEX(%ebp) address in %edx rather than %ecx to
837 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
838 and __lll_unlock_wake. Move return value from %ecx to %edx
839 register. Use __NR_gettimeofday.
840 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
841 Include lowlevellock.h.
842 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
843 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
844 MUTEX(%edi) address in %edx rather than %ecx to
845 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
846 and __lll_unlock_wake.
847 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
848 Include lowlevellock.h.
849 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
850 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
851 MUTEX(%ebx) address in %edx rather than %ecx to
852 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
853 and __lll_unlock_wake. Move return value from %ecx to %edx
855 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
857 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
859 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
860 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
861 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
863 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
864 (sem_timedwait): Use __NR_gettimeofday.
865 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
867 (LOCK): Don't define.
868 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
870 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
871 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
873 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
874 2007-05-2{3,9} changes.
875 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
876 kernel-features.h and lowlevellock.h.
877 (LOAD_PRIVATE_FUTEX_WAIT): Define.
878 (LOAD_FUTEX_WAIT): Rewritten.
879 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
880 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
881 (__lll_mutex_lock_wait): Rename to ...
882 (__lll_lock_wait): ... this. %esi is now private argument.
883 Don't compile in for libc.so.
884 (__lll_mutex_timedlock_wait): Rename to ...
885 (__lll_timedlock_wait): ... this. %esi contains private argument.
886 Don't compile in for libc.so.
887 (__lll_mutex_unlock_wake): Rename to ...
888 (__lll_unlock_wake): ... this. %esi contains private argument.
889 Don't compile in for libc.so.
890 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
891 kernel-features.h and lowlevellock.h.
892 (LOAD_FUTEX_WAIT): Define.
893 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
894 (__lll_robust_mutex_lock_wait): Rename to ...
895 (__lll_robust_lock_wait): ... this. %esi argument contains private.
896 Use LOAD_FUTEX_WAIT macro.
897 (__lll_robust_mutex_timedlock_wait): Rename to ...
898 (__lll_robust_timedlock_wait): ... this. %esi argument contains
899 private, use LOAD_FUTEX_WAIT macro.
900 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
902 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
903 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
904 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
905 __lll_lock_wait and __lll_unlock_wake.
906 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
907 Include lowlevellock.h and pthread-errnos.h.
908 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
909 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
910 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
911 pass LLL_SHARED in %esi to both __lll_lock_wait and
913 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
914 Include lowlevellock.h and pthread-errnos.h.
915 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
916 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
917 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
918 pass LLL_SHARED in %esi to both __lll_lock_wait and
920 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
921 Include lowlevellock.h.
922 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
923 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
924 pass LLL_SHARED in %esi to both __lll_lock_wait and
926 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
927 Include lowlevellock.h.
928 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
929 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
930 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
931 and __lll_unlock_wake.
932 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
933 Include lowlevellock.h.
934 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
936 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
937 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
938 and __lll_unlock_wake.
939 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
940 Include lowlevellock.h.
941 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
943 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
944 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
945 and __lll_unlock_wake.
946 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
947 Include lowlevellock.h.
948 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
950 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
951 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
952 and __lll_unlock_wake.
953 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
954 Include lowlevellock.h.
955 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
957 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
958 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
959 and __lll_unlock_wake.
960 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
961 Include lowlevellock.h.
962 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
964 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
965 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
966 and __lll_unlock_wake.
967 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
969 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
971 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
972 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
973 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
975 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
976 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
978 (LOCK): Don't define.
979 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
981 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
982 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
983 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
984 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
985 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
986 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
987 (__lll_lock_wait_private): New function.
988 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
989 it to lll_futex_*wait. Don't compile in for libc.so.
990 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
992 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
993 (struct sparc_pthread_barrier): Remove.
994 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
995 struct sparc_pthread_barrier. Pass
996 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
997 and lll_futex_wait macros.
998 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1000 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1001 Include sparc pthread_barrier_wait.c instead of generic one.
1003 2007-07-30 Jakub Jelinek <jakub@redhat.com>
1005 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1007 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1008 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1010 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1011 (pthread_rwlock_timedwrlock): Likewise.
1012 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1013 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1015 2007-07-31 Jakub Jelinek <jakub@redhat.com>
1017 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1019 2007-07-26 Jakub Jelinek <jakub@redhat.com>
1021 * tst-locale2.c (useless): Add return statement.
1023 2007-07-24 Jakub Jelinek <jakub@redhat.com>
1025 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1026 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1027 * pthread_create.c (start_thread): Likewise.
1028 * init.c (sighandler_setxid): Likewise.
1029 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1030 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1031 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1032 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1033 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1034 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1035 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1036 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1037 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1039 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1041 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1043 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1044 __rtld_notify): Likewise.
1045 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1046 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1047 __pthread_once): Likewise.
1048 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1049 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1050 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1051 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1052 (lll_futex_wait): Add private argument, define as wrapper around
1053 lll_futex_timed_wait.
1054 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1055 use __lll_private_flag macro.
1056 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1057 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1058 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1059 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1060 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1061 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1062 (lll_futex_wait): Add private argument, define as wrapper around
1063 lll_futex_timed_wait.
1064 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1065 use __lll_private_flag macro.
1066 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1067 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1068 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1070 (lll_futex_timed_wait, lll_futex_wake): Use it.
1071 (lll_private_futex_wait, lll_private_futex_timed_wait,
1072 lll_private_futex_wake): Removed.
1073 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1074 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1075 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1076 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1077 (lll_futex_wait): Add private argument, define as wrapper around
1078 lll_futex_timed_wait.
1079 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1080 use __lll_private_flag macro.
1081 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1082 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1084 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1085 (lll_private_futex_wait, lll_private_futex_timed_wait,
1086 lll_private_futex_wake): Removed.
1087 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1088 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1089 (lll_private_futex_wait, lll_private_futex_timed_wait,
1090 lll_private_futex_wake): Removed.
1091 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1092 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1093 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1094 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1095 (lll_futex_wait): Add private argument, define as wrapper around
1096 lll_futex_timed_wait.
1097 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1098 use __lll_private_flag macro.
1099 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1100 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1102 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1104 (lll_futex_timed_wait, lll_futex_wake): Use it.
1105 (lll_private_futex_wait, lll_private_futex_timed_wait,
1106 lll_private_futex_wake): Removed.
1108 2007-07-27 Jakub Jelinek <jakub@redhat.com>
1110 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1111 of the structure for sparc32.
1113 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
1115 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1117 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1119 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1120 code used when private futexes are assumed.
1121 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1124 2007-07-23 Jakub Jelinek <jakub@redhat.com>
1126 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1127 (__lll_private_flag): Define.
1128 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1129 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1131 (lll_private_futex_wait, lll_private_futex_timedwait,
1132 lll_private_futex_wake): Define as wrapper around non-_private
1134 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1135 (__lll_private_flag): Define.
1136 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1137 (lll_private_futex_wait, lll_private_futex_timedwait,
1138 lll_private_futex_wake): Define as wrapper around non-_private
1141 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
1143 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1144 parameter to lll_futex_wait call.
1145 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1147 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1148 Replace lll_futex_wait with lll_private_futex_wait.
1149 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1150 Add LLL_SHARED parameter to lll_futex_wake().
1152 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1153 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1154 lll_private_futex_wake.
1155 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1156 bit from private parm before syscall.
1157 (lll_futex_timed_wait): Likewise.
1158 (lll_futex_wake): Likewise.
1159 (lll_futex_wake_unlock): Likewise.
1160 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1161 (lll_robust_mutex_unlock): Likewise.
1162 (lll_mutex_unlock_force): Likewise.
1163 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1165 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1167 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1168 compilation when unconditionally using private futexes.
1169 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1170 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1172 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1173 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1175 2007-07-17 Jakub Jelinek <jakub@redhat.com>
1177 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1180 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1182 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1185 2007-05-16 Roland McGrath <roland@redhat.com>
1187 * init.c (__nptl_initial_report_events): New variable.
1188 (__pthread_initialize_minimal_internal): Initialize pd->report_events
1191 2007-06-22 Jakub Jelinek <jakub@redhat.com>
1193 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1194 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1196 2007-06-19 Ulrich Drepper <drepper@redhat.com>
1198 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1201 2007-06-18 Ulrich Drepper <drepper@redhat.com>
1203 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1204 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1205 * pthread_mutex_timedlock.c: Likewise.
1206 * pthread_mutex_trylock.c: Likewise.
1207 * pthread_mutex_unlock.c: Likewise.
1209 2007-06-17 Andreas Schwab <schwab@suse.de>
1211 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1214 2007-06-17 Ulrich Drepper <drepper@redhat.com>
1216 * allocatestack.c (allocate_stack): Make code compile if
1217 __ASSUME_PRIVATE_FUTEX is set.
1219 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1221 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1222 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1223 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1224 (__pthread_rwlock_wrlock): Likewise.
1225 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1226 (pthread_rwlock_timedrdlock): Likewise.
1227 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1228 (pthread_rwlock_timedwrlock): Likewise.
1229 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1230 (__pthread_rwlock_unlock): Likewise.
1232 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1234 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1235 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1236 Split __flags into __flags, __shared, __pad1 and __pad2.
1237 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1238 futexes if they are available.
1239 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1240 in libc-lowlevellock.S allow using private futexes.
1241 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1242 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
1243 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
1244 to call lll_futex_timed_wait. Add lll_private_futex_wait,
1245 lll_private_futex_timed_wait and lll_private_futex_wake.
1246 (lll_robust_mutex_unlock): Fix typo.
1247 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1248 field in futex command setup.
1249 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1250 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1251 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1252 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1253 if they are available. Remove clear_once_control.
1254 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1255 futexes if they are available.
1256 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1257 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1258 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1259 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1260 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1261 Wake only when there are waiters.
1262 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1263 support. Indicate that there are waiters. Remove unnecessary
1264 extra cancellation test.
1265 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
1266 left-over duplication of __sem_wait_cleanup.
1268 2007-06-07 Ulrich Drepper <drepper@redhat.com>
1270 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1271 parameter to lll_futex_wait, lll_futex_timed_wait, and
1272 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
1273 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1274 lll_private_futex_wake.
1275 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1276 * allocatestack.c: Adjust use of lll_futex_* macros.
1278 * lowlevellock.h: Likewise.
1279 * pthread_barrier_wait.c: Likewise.
1280 * pthread_cond_broadcast.c: Likewise.
1281 * pthread_cond_destroy.c: Likewise.
1282 * pthread_cond_signal.c: Likewise.
1283 * pthread_cond_timedwait.c: Likewise.
1284 * pthread_cond_wait.c: Likewise.
1285 * pthread_create.c: Likewise.
1286 * pthread_mutex_lock.c: Likewise.
1287 * pthread_mutex_setprioceiling.c: Likewise.
1288 * pthread_mutex_timedlock.c: Likewise.
1289 * pthread_mutex_unlock.c: Likewise.
1290 * pthread_rwlock_timedrdlock.c: Likewise.
1291 * pthread_rwlock_timedwrlock.c: Likewise.
1292 * pthread_rwlock_unlock.c: Likewise.
1293 * sysdeps/alpha/tls.h: Likewise.
1294 * sysdeps/i386/tls.h: Likewise.
1295 * sysdeps/ia64/tls.h: Likewise.
1296 * sysdeps/powerpc/tls.h: Likewise.
1297 * sysdeps/pthread/aio_misc.h: Likewise.
1298 * sysdeps/pthread/gai_misc.h: Likewise.
1299 * sysdeps/s390/tls.h: Likewise.
1300 * sysdeps/sh/tls.h: Likewise.
1301 * sysdeps/sparc/tls.h: Likewise.
1302 * sysdeps/unix/sysv/linux/fork.c: Likewise.
1303 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1304 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1305 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1306 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1307 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1308 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1309 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1310 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1311 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1313 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1314 * sysdeps/x86_64/tls.h: Likewise.
1316 2007-05-29 Ulrich Drepper <drepper@redhat.com>
1318 * pthread_getattr_np.c: No need to install a cancellation handler,
1319 this is no cancellation point.
1320 * pthread_getschedparam.c: Likewise.
1321 * pthread_setschedparam.c: Likewise.
1322 * pthread_setschedprio.c: Likewise.
1323 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1325 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1326 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1327 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1328 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1329 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1330 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1331 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1332 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1333 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1334 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1335 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1336 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1338 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1339 whether there are more than one thread makes no sense here since
1340 we only call the slow path if the locks are taken.
1341 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1343 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1344 COND_NWAITERS_SHIFT.
1345 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1347 * pthread_cond_init.c: Likewise.
1348 * pthread_cond_timedwait.c: Likewise.
1349 * pthread_cond_wait.c: Likewise.
1350 * pthread_condattr_getclock.c: Likewise.
1351 * pthread_condattr_setclock.c: Likewise.
1352 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1353 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1354 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1355 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1356 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1358 2007-05-28 Jakub Jelinek <jakub@redhat.com>
1360 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1363 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1365 (THREAD_GSCOPE_GET_FLAG): Remove.
1366 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1367 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1369 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1370 (THREAD_GSCOPE_GET_FLAG): Remove.
1371 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1372 instead of THREAD_GSCOPE_GET_FLAG.
1373 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
1375 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1376 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1377 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1378 THREAD_GSCOPE_WAIT): Define.
1379 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1380 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1381 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1382 THREAD_GSCOPE_WAIT): Define.
1383 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1384 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1385 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1386 THREAD_GSCOPE_WAIT): Define.
1387 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1388 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1389 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1390 THREAD_GSCOPE_WAIT): Define.
1392 2007-05-24 Richard Henderson <rth@redhat.com>
1394 * descr.h (struct pthread): Add header.gscope_flag.
1395 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1396 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1397 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1398 THREAD_GSCOPE_WAIT): Define.
1400 2007-05-27 Ulrich Drepper <drepper@redhat.com>
1402 * init.c: Make it compile with older kernel headers.
1404 * tst-initializers1.c: Show through exit code which test failed.
1406 * pthread_rwlock_init.c: Also initialize __shared field.
1407 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1408 element in rwlock structure into four byte elements. One of them is
1409 the new __shared element.
1410 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1412 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1413 __shared, adjust names of other padding elements.
1414 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1415 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1416 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1417 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1419 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1420 futex to use private operations if possible.
1421 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1423 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1425 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1426 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1427 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1428 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1430 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1432 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1433 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1435 2007-05-26 Ulrich Drepper <drepper@redhat.com>
1437 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1438 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1439 * pthread_rwlock_timedrdlock.c: Likewise.
1440 * pthread_rwlock_tryrdlock.c: Likewise.
1442 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1445 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1446 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1447 duplication of __sem_wait_cleanup.
1449 * allocatestack.c: Revert last change.
1451 * sysdeps/i386/tls.h: Likewise.
1452 * sysdeps/x86_64/tls.h: Likewise.
1453 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1455 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1457 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1459 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1460 * pthread_barrier_init.c: Set private flag if pshared and private
1461 futexes are supported.
1462 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1463 private field in futex command setup.
1464 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1466 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1468 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1470 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1471 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1472 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1473 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1474 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1476 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1477 * sem_init.c (__new_sem_init): Rewrite to initialize all three
1478 fields in the structure.
1479 (__old_sem_init): New function.
1480 * sem_open.c: Initialize all fields of the structure.
1481 * sem_getvalue.c: Adjust for renamed element.
1482 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1483 (gen-as-const-headers): Add structsem.sym.
1484 * sysdeps/unix/sysv/linux/structsem.sym: New file.
1485 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1486 struct new_sem. Add struct old_sem.
1487 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1488 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1489 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1490 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1491 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1492 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1493 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1494 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1495 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1496 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1497 * tst-sem10.c: New file.
1498 * tst-sem11.c: New file.
1499 * tst-sem12.c: New file.
1500 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1503 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1504 Jakub Jelinek <jakub@redhat.com>
1506 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1507 Move __pthread_enable_asynccancel right before futex syscall.
1508 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1511 2007-05-24 Jakub Jelinek <jakub@redhat.com>
1513 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1514 THREAD_COPY_PRIVATE_FUTEX): Define.
1515 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1516 THREAD_COPY_PRIVATE_FUTEX): Define.
1517 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1518 * init.c (__pthread_initialize_minimal_internal): Use
1519 THREAD_SET_PRIVATE_FUTEX.
1521 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1522 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1523 THREAD_GSCOPE_FLAG_WAIT): Define.
1524 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1525 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1526 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1528 (THREAD_GSCOPE_GET_FLAG): Define.
1529 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1530 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1531 instead of ->header.gscope_flag directly.
1533 2007-05-23 Ulrich Drepper <drepper@redhat.com>
1535 * init.c (__pthread_initialize_minimal_internal): Check whether
1536 private futexes are available.
1537 * allocatestack.c (allocate_stack): Copy private_futex field from
1538 current thread into the new stack.
1539 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1540 futexes if they are available.
1541 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1542 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1543 in libc-lowlevellock.S allow using private futexes.
1544 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1545 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1547 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1548 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1549 if they are available.
1550 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1551 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1552 * sysdeps/i386/tcb-offsets.sym: Likewise.
1553 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1554 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1556 2007-05-21 Ulrich Drepper <drepper@redhat.com>
1558 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1559 Remove ptr_wait_lookup_done again.
1560 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1561 (__pthread_initialize_minimal_internal): Initialize
1562 _dl_wait_lookup_done pointer in _rtld_global directly.
1563 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1564 Remove code to code _dl_wait_lookup_done.
1565 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1568 2007-05-21 Jakub Jelinek <jakub@redhat.com>
1570 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1571 pthread_mutex_init failed with ENOTSUP.
1573 2007-05-19 Ulrich Drepper <drepper@redhat.com>
1575 * allocatestack.c (__wait_lookup_done): New function.
1576 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1577 Add ptr_wait_lookup_done.
1578 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1579 * pthreadP.h: Declare __wait_lookup_done.
1580 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1581 Define macros to implement reference handling of global scope.
1582 * sysdeps/x86_64/tls.h: Likewise.
1583 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1584 Initialize GL(dl_wait_lookup_done).
1586 2007-05-17 Ulrich Drepper <drepper@redhat.com>
1589 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1591 * pthread_mutex_timedlock.c: Likewise.
1592 * pthread_mutex_trylock.c: Likewise.
1593 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1595 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1596 * tst-robust9.c: New file.
1597 * tst-robustpi9.c: New file.
1599 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1600 unnecessary extra cancellation test.
1602 2007-05-14 Ulrich Drepper <drepper@redhat.com>
1604 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1605 extra cancellation test.
1606 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1608 2007-05-10 Ulrich Drepper <drepper@redhat.com>
1610 * descr.h (struct pthread): Rearrange members to fill hole in
1613 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1614 (__pthread_setaffinity_new): If syscall was successful and
1615 RESET_VGETCPU_CACHE is defined, use it before returning.
1616 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1618 2007-05-10 Jakub Jelinek <jakub@redhat.com>
1621 * tst-align2.c: Include stackinfo.h.
1622 * tst-getpid1.c: Likewise.
1624 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
1627 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1628 * tst-getpid1.c (do_test): Likewise.
1631 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1632 (allocate_stack): Likewise.
1634 2007-05-07 Ulrich Drepper <drepper@redhat.com>
1636 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1637 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1638 (__lll_robust_timedlock_wait): Likewise.
1639 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1641 2007-05-06 Mike Frysinger <vapier@gentoo.org>
1644 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1645 * tst-cancel4.c (tf_fdatasync): New test.
1647 2007-04-27 Ulrich Drepper <drepper@redhat.com>
1650 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1651 check mutexes like normal mutexes.
1654 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1655 Initialize the whole sigevent structure to appease valgrind.
1657 2007-04-25 Ulrich Drepper <drepper@redhat.com>
1659 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1660 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1662 2007-04-06 Ulrich Drepper <drepper@redhat.com>
1664 * tst-locale1.c: Avoid warnings.
1665 * tst-locale2.c: Likewise.
1667 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
1669 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1670 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1672 2007-03-16 Jakub Jelinek <jakub@redhat.com>
1674 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1675 __extern_always_inline where appropriate.
1676 * sysdeps/pthread/pthread.h: Likewise.
1678 2007-03-13 Richard Henderson <rth@redhat.com>
1680 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1681 separate cfi regions for the two subsections.
1683 2007-02-25 Ulrich Drepper <drepper@redhat.com>
1685 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1686 new thread, don't just decrement it.
1687 Patch by Suzuki K P <suzuki@in.ibm.com>.
1689 2007-02-21 Ulrich Drepper <drepper@redhat.com>
1691 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1692 PTHFCT_CALL definition.
1694 2007-02-18 Ulrich Drepper <drepper@redhat.com>
1696 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1697 available, don't use it.
1699 2007-02-09 Jakub Jelinek <jakub@redhat.com>
1701 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1702 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1703 call into the kernel to delay.
1705 2007-01-18 Ulrich Drepper <drepper@redhat.com>
1707 * tst-initializers1.c: We want to test the initializers as seen
1708 outside of libc, so undefined _LIBC.
1710 * pthread_join.c (cleanup): Avoid warning.
1712 2007-01-17 Ulrich Drepper <drepper@redhat.com>
1714 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1715 (__lll_timedwait_tid): Add unwind info.
1717 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1718 function table, mangle the pointers.
1719 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1720 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1721 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1722 demangle pointers before use.
1723 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1725 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1726 * sysdeps/pthread/setxid.h: Likewise.
1728 2007-01-12 Ulrich Drepper <drepper@redhat.com>
1730 * tst-rwlock7.c: Show some more information in case of correct
1733 2007-01-11 Ulrich Drepper <drepper@redhat.com>
1735 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1736 (lll_futex_timed_wait): Undo part of last change, don't negate
1739 2007-01-10 Ulrich Drepper <drepper@redhat.com>
1741 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
1742 FUTEX_CMP_REQUEUE and lll_futex_requeue.
1744 2006-12-28 David S. Miller <davem@davemloft.net>
1746 * shlib-versions: Fix sparc64 linux target specification.
1748 2007-01-10 Jakub Jelinek <jakub@redhat.com>
1750 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1751 Adjust include path for pthread_barrier_wait.c move.
1753 2006-12-21 Jakub Jelinek <jakub@redhat.com>
1755 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1756 tid isn't reread from pd->tid in between ESRCH test and the syscall.
1758 2006-12-06 Jakub Jelinek <jakub@redhat.com>
1760 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1761 6 argument cancellable syscalls.
1762 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1763 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1764 6 argument cancellable syscalls.
1765 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1767 2006-12-09 Ulrich Drepper <drepper@redhat.com>
1769 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1770 (__rtld_mrlock_initialize): Add missing closing parenthesis.
1772 2006-10-30 Jakub Jelinek <jakub@redhat.com>
1774 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1775 __sync_lock_release instead of __sync_lock_release_si.
1777 2006-10-29 Jakub Jelinek <jakub@redhat.com>
1779 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1781 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1782 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1783 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1784 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1785 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1786 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1787 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1788 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1789 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1790 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1791 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1793 2006-10-27 Ulrich Drepper <drepper@redhat.com>
1795 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1796 * pthread_barrier_wait.c: ...here.
1797 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1798 * pthread_cond_broadcast.c: ...here.
1799 * sysdeps/pthread/pthread_cond_signal.c: Move to...
1800 * pthread_cond_signal.c: ...here.
1801 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1802 * pthread_cond_timedwait.c: ...here.
1803 * sysdeps/pthread/pthread_cond_wait.c: Move to...
1804 * pthread_cond_wait.c: ...here.
1805 * sysdeps/pthread/pthread_once.c: Move to...
1806 * pthread_once.c: ...here.
1807 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1808 * pthread_rwlock_rdlock.c: ...here.
1809 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1810 * pthread_rwlock_timedrdlock.c: ...here.
1811 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1812 * pthread_rwlock_timedwrlock.c: ...here.
1813 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1814 * pthread_rwlock_unlock.c: ...here.
1815 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1816 * pthread_rwlock_wrlock.c: ...here.
1817 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1818 * pthread_spin_destroy.c: ...here.
1819 * sysdeps/pthread/pthread_spin_init.c: Move to...
1820 * pthread_spin_init.c: ...here.
1821 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1822 * pthread_spin_unlock.c: ...here.
1823 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1824 * pthread_getcpuclockid.c: ...here.
1826 * init.c: USE_TLS support is now always enabled.
1827 * tst-tls5.h: Likewise.
1828 * sysdeps/alpha/tls.h: Likewise.
1829 * sysdeps/i386/tls.h: Likewise.
1830 * sysdeps/ia64/tls.h: Likewise.
1831 * sysdeps/powerpc/tls.h: Likewise.
1832 * sysdeps/s390/tls.h: Likewise.
1833 * sysdeps/sh/tls.h: Likewise.
1834 * sysdeps/sparc/tls.h: Likewise.
1835 * sysdeps/x86_64/tls.h: Likewise.
1837 2006-10-27 Jakub Jelinek <jakub@redhat.com>
1839 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1840 __rtld_mrlock_change): Update oldval if atomic compare and exchange
1843 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1844 Define to THREAD_SELF->header.multiple_threads.
1845 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1847 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1849 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1850 (SINGLE_THREAD_P): Likewise.
1851 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1852 (SINGLE_THREAD_P): Likewise.
1853 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1854 (SINGLE_THREAD_P): Likewise.
1855 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1856 (SINGLE_THREAD_P): Likewise.
1857 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1859 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1860 (SINGLE_THREAD_P): Likewise.
1861 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1862 (SINGLE_THREAD_P): Likewise.
1863 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1866 2006-10-26 Jakub Jelinek <jakub@redhat.com>
1868 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1869 by default rather than 2_3_3.
1871 2006-10-17 Jakub Jelinek <jakub@redhat.com>
1873 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1874 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1875 atomic_* instead of catomic_* macros.
1877 2006-10-12 Ulrich Drepper <drepper@redhat.com>
1880 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1881 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1882 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1883 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1884 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1885 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1886 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1887 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1888 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1889 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1890 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1891 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1892 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1894 2006-10-11 Ulrich Drepper <drepper@redhat.com>
1896 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1897 cancelable syscalls with six parameters.
1899 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1900 operations instead of atomic_*.
1902 2006-10-09 Ulrich Drepper <drepper@redhat.com>
1904 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
1906 2006-10-07 Ulrich Drepper <drepper@redhat.com>
1908 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1909 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1910 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1912 * pthread_attr_setstack.c: Allow overwriting the version number of the
1914 * pthread_attr_setstacksize.c: Likewise.
1915 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1917 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1918 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
1920 2006-09-24 Ulrich Drepper <drepper@redhat.com>
1923 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
1924 Patch by Petr Baudis.
1926 2006-09-18 Jakub Jelinek <jakub@redhat.com>
1928 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
1930 * tst-cancel2.c (tf): Loop as long as something was written.
1932 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1934 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
1935 mutexes wake all mutexes.
1936 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
1937 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1938 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1940 2006-09-12 Ulrich Drepper <drepper@redhat.com>
1942 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
1943 to guarantee the thread is always canceled.
1945 2006-09-08 Jakub Jelinek <jakub@redhat.com>
1947 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
1949 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
1950 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
1951 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1952 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1953 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1955 2006-09-08 Ulrich Drepper <drepper@redhat.com>
1958 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
1959 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1960 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1961 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1962 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1963 * Makefile (tests): Add tst-cond22.
1964 * tst-cond22.c: New file.
1966 2006-09-05 Ulrich Drepper <drepper@redhat.com>
1969 * descr.h (struct pthread): Add parent_cancelhandling.
1970 * sysdeps/pthread/createthread.c (create_thread): Pass parent
1971 cancelhandling value to child.
1972 * pthread_create.c (start_thread): If parent thread was canceled
1973 reset the SIGCANCEL mask.
1974 * Makefile (tests): Add tst-cancel25.
1975 * tst-cancel25.c: New file.
1977 2006-09-05 Jakub Jelinek <jakub@redhat.com>
1978 Ulrich Drepper <drepper@redhat.com>
1980 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
1981 counterp if it is already zero.
1982 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
1984 2006-03-04 Jakub Jelinek <jakub@redhat.com>
1985 Roland McGrath <roland@redhat.com>
1987 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
1988 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1989 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
1990 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1991 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1992 lll_robust_mutex_timedlock, lll_mutex_unlock,
1993 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1994 Add _L_*_ symbols around the subsection.
1995 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
1996 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
1998 2006-03-03 Jakub Jelinek <jakub@redhat.com>
1999 Roland McGrath <roland@redhat.com>
2001 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2002 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2003 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2004 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2005 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2006 lll_robust_mutex_timedlock, lll_mutex_unlock,
2007 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2008 Add _L_*_ symbols around the subsection.
2009 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2010 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2012 2006-08-31 Ulrich Drepper <drepper@redhat.com>
2014 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2015 change because it can disturb too much existing code. If real hard
2016 reader preference is needed we'll introduce another type.
2017 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2018 (pthread_rwlock_timedwrlock): Likewise.
2019 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2022 2006-08-30 Ulrich Drepper <drepper@redhat.com>
2024 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2026 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2027 (pthread_rwlock_timedwrlock): Likewise.
2028 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2031 2006-08-25 Jakub Jelinek <jakub@redhat.com>
2033 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2034 Only define ifdef SHARED.
2036 2006-08-23 Ulrich Drepper <drepper@redhat.com>
2038 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2039 (free_stacks): ...here.
2040 (__free_stack_cache): New function.
2041 * pthreadP.h: Declare __free_stack_cache.
2042 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2044 * init.c (pthread_functions): Initialize ptr_freeres.
2045 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2046 New freeres function.
2048 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
2051 * Makefile (extra-objs): Add modules to extra-test-objs instead.
2053 2006-08-20 Ulrich Drepper <drepper@redhat.com>
2055 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2056 _XOPEN_REALTIME_THREADS.
2058 2006-08-15 Jakub Jelinek <jakub@redhat.com>
2060 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2061 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2062 HAVE_CLOCK_GETTIME_VSYSCALL.
2063 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2065 2006-08-14 Jakub Jelinek <jakub@redhat.com>
2067 * sysdeps/unix/sysv/linux/bits/posix_opt.h
2068 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2069 * descr.h (struct priority_protection_data): New type.
2070 (struct pthread): Add tpp field.
2071 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2072 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2073 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2074 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2076 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2077 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2078 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2079 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2081 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2083 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2084 * pthread_mutexattr_getprioceiling.c
2085 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2086 in the SCHED_FIFO priority range.
2087 * pthread_mutexattr_setprioceiling.c
2088 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2089 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2090 if mutex is not TPP. Ceiling is now in __data.__lock.
2091 * pthread_mutex_setprioceiling.c: Include stdbool.h.
2092 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
2093 is now in __data.__lock. Add locking.
2094 * pthread_create.c (__free_tcb): Free pd->tpp structure.
2095 * Makefile (libpthread-routines): Add tpp.
2096 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2097 * tst-tpp.h: New file.
2098 * tst-mutexpp1.c: New file.
2099 * tst-mutexpp6.c: New file.
2100 * tst-mutexpp10.c: New file.
2101 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2102 * tst-mutex6.c (TEST_FUNCTION): Likewise.
2104 2006-08-12 Ulrich Drepper <drepper@redhat.com>
2107 * pthread_join.c (pthread_join): Account for self being canceled
2108 when checking for deadlocks.
2109 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
2110 (tf1): Don't print anything after pthread_join returns, this would be
2111 another cancellation point.
2113 * tst-join6.c: New file.
2114 * Makefile (tests): Add tst-join6.
2116 2006-08-03 Ulrich Drepper <drepper@redhat.com>
2119 * pthread_setspecific.c (__pthread_setspecific): Check
2120 out-of-range index before checking for unused key.
2122 * sysdeps/pthread/gai_misc.h: New file.
2124 2006-08-01 Ulrich Drepper <drepper@redhat.com>
2126 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
2127 file. Don't use sysctl.
2128 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
2129 overwrite the file if this is likely not true.
2131 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
2133 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2134 * Makefile (tests): Add tst-getpid3.
2135 * tst-getpid3.c: New file.
2137 2006-07-30 Roland McGrath <roland@redhat.com>
2139 * Makefile (libpthread-routines): Add ptw-sigsuspend.
2141 * sysdeps/unix/sysv/linux/i386/not-cancel.h
2142 (pause_not_cancel): New macro.
2143 (nanosleep_not_cancel): New macro.
2144 (sigsuspend_not_cancel): New macro.
2145 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2146 nanosleep_not_cancel macro from <not-cancel.h>.
2147 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2148 macro from <not-cancel.h>.
2150 2006-07-28 Ulrich Drepper <drepper@redhat.com>
2151 Jakub Jelinek <jakub@redhat.com>
2153 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2154 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
2155 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2156 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2157 * pthread_mutex_init.c: Add support for priority inheritance mutex.
2158 * pthread_mutex_lock.c: Likewise.
2159 * pthread_mutex_timedlock.c: Likewise.
2160 * pthread_mutex_trylock.c: Likewise.
2161 * pthread_mutex_unlock.c: Likewise.
2162 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2164 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2165 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2166 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2167 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2168 pthread-pi-defines.sym.
2169 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2170 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2171 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2172 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2173 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2174 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2175 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2176 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2177 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2178 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2179 _POSIX_THREAD_PRIO_INHERIT to 200112L.
2180 * tst-mutex1.c: Adjust to allow use in PI mutex test.
2181 * tst-mutex2.c: Likewise.
2182 * tst-mutex3.c: Likewise.
2183 * tst-mutex4.c: Likewise.
2184 * tst-mutex5.c: Likewise.
2185 * tst-mutex6.c: Likewise.
2186 * tst-mutex7.c: Likewise.
2187 * tst-mutex7a.c: Likewise.
2188 * tst-mutex8.c: Likewise.
2189 * tst-mutex9.c: Likewise.
2190 * tst-robust1.c: Likewise.
2191 * tst-robust7.c: Likewise.
2192 * tst-robust8.c: Likewise.
2193 * tst-mutexpi1.c: New file.
2194 * tst-mutexpi2.c: New file.
2195 * tst-mutexpi3.c: New file.
2196 * tst-mutexpi4.c: New file.
2197 * tst-mutexpi5.c: New file.
2198 * tst-mutexpi6.c: New file.
2199 * tst-mutexpi7.c: New file.
2200 * tst-mutexpi7a.c: New file.
2201 * tst-mutexpi8.c: New file.
2202 * tst-mutexpi9.c: New file.
2203 * tst-robust1.c: New file.
2204 * tst-robust2.c: New file.
2205 * tst-robust3.c: New file.
2206 * tst-robust4.c: New file.
2207 * tst-robust5.c: New file.
2208 * tst-robust6.c: New file.
2209 * tst-robust7.c: New file.
2210 * tst-robust8.c: New file.
2211 * Makefile (tests): Add the new tests.
2213 * pthread_create.c (start_thread): Add some casts to avoid warnings.
2214 * pthread_mutex_destroy.c: Remove unneeded label.
2216 2006-07-01 Ulrich Drepper <drepper@redhat.com>
2218 * pthread_mutex_init.c (__pthread_mutex_init): Move some
2219 computations to compile time.
2221 2006-06-04 Ulrich Drepper <drepper@redhat.com>
2223 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2225 2006-05-15 Ulrich Drepper <drepper@redhat.com>
2227 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2229 2006-05-11 Ulrich Drepper <drepper@redhat.com>
2231 * pthread_key_create.c (__pthread_key_create): Do away with
2232 __pthread_keys_lock.
2234 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2235 (__kernel_cpumask_size): Mark as hidden.
2236 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2238 * sem_open.c (__sem_mappings_lock): Mark as hidden.
2239 * semaphoreP.h (__sem_mappings_lock): Likewise.
2241 2006-05-10 Ulrich Drepper <drepper@redhat.com>
2243 * pthread_atfork.c: Mark __dso_handle as hidden.
2245 2006-05-09 Ulrich Drepper <drepper@redhat.com>
2248 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2249 the reload problem. Change the one path in pthread_cancel_init
2250 which causes the problem. Force gcc to reload. Simplify callers.
2251 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2252 (_Unwind_GetBSP): Undo last patch.
2254 2006-05-07 Ulrich Drepper <drepper@redhat.com>
2256 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2257 function pointer is reloaded after pthread_cancel_init calls.
2260 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2261 pointers are reloaded after pthread_cancel_init calls.
2263 2006-05-01 Ulrich Drepper <drepper@redhat.com>
2265 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2268 2006-04-27 Ulrich Drepper <drepper@redhat.com>
2270 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2271 Allocate new object which is passed to timer_sigev_thread so that
2272 the timer can be deleted before the new thread is scheduled.
2274 2006-04-26 Roland McGrath <roland@redhat.com>
2276 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2278 2006-04-08 Ulrich Drepper <drepper@redhat.com>
2280 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2281 suffix for conditional jumps.
2282 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2283 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2284 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2285 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2286 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2287 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2289 * init.c (sigcancel_handler): Compare with correct PID even if the
2290 thread is in the middle of a fork call.
2291 (sighandler_setxid): Likewise.
2292 Reported by Suzuki K P <suzuki@in.ibm.com> .
2294 2006-04-07 Jakub Jelinek <jakub@redhat.com>
2296 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2298 2006-04-06 Ulrich Drepper <drepper@redhat.com>
2300 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2301 fails [Coverity CID 105].
2303 2006-04-05 Ulrich Drepper <drepper@redhat.com>
2305 * sysdeps/pthread/pthread.h: Add nonnull attributes.
2307 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
2310 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2311 Define __lll_rel_instr using lwsync.
2313 2006-03-27 Ulrich Drepper <drepper@redhat.com>
2315 * allocatestack.c (allocate_stack): Always initialize robust_head.
2316 * descr.h: Define struct robust_list_head.
2317 (struct pthread): Use robust_list_head in robust mutex list definition.
2318 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2319 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2320 (__pthread_initialize_minimal_internal): Register robust_list with
2322 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2323 Declare __set_robust_list_avail.
2324 * pthread_create.c (start_thread): Register robust_list of new thread.
2325 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2327 * pthread_mutex_destroy.c: For robust mutexes don't look at the
2328 number of users, it's unreliable.
2329 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2330 set_robust_list syscall is available.
2331 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2332 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2333 Set robust_head.list_op_pending before trying to lock a robust mutex.
2334 * pthread_mutex_timedlock.c: Likewise.
2335 * pthread_mutex_trylock.c: Likewise.
2336 * pthread_mutex_unlock.c: Likewise for unlocking.
2337 * Makefile (tests): Add tst-robust8.
2338 * tst-robust8.c: New file.
2340 2006-03-08 Andreas Schwab <schwab@suse.de>
2342 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2343 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2345 2006-03-05 Roland McGrath <roland@redhat.com>
2347 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2348 and $config_os doesn't match *linux*.
2350 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
2352 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2353 Use __syscall_error.
2354 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2355 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2356 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2357 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2358 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2359 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2361 2006-03-02 Ulrich Drepper <drepper@redhat.com>
2363 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2365 2006-03-01 Ulrich Drepper <drepper@redhat.com>
2367 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2368 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2370 (__lll_robust_timedlock_wait): Likewise.
2371 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2372 (__lll_robust_lock_wait): Likewise.
2373 (__lll_robust_timedlock_wait): Likewise.
2374 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2375 (__lll_robust_lock_wait): Likewise.
2376 (__lll_robust_timedlock_wait): Likewise.
2378 2006-03-01 Jakub Jelinek <jakub@redhat.com>
2380 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2381 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2382 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2383 lll_robust_mutex_unlock): Define.
2384 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2386 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
2388 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2389 instead of <clone.S>.
2391 2006-02-27 Jakub Jelinek <jakub@redhat.com>
2393 * Makefile (libpthread-routines): Add
2394 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2395 and pthread_mutex_[sg]etprioceiling.
2396 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2397 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2398 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2399 pthread_mutex_setprioceiling.
2400 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2401 PTHREAD_PRIO_PROTECT): New enum values.
2402 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2403 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2404 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2406 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2407 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2408 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2410 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2411 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2412 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2413 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2414 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2415 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2416 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2418 * pthread_mutex_getprioceiling.c: New file.
2419 * pthread_mutex_setprioceiling.c: New file.
2420 * pthread_mutexattr_getprioceiling.c: New file.
2421 * pthread_mutexattr_setprioceiling.c: New file.
2422 * pthread_mutexattr_getprotocol.c: New file.
2423 * pthread_mutexattr_setprotocol.c: New file.
2425 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2427 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2429 2006-02-27 Roland McGrath <roland@redhat.com>
2431 * sysdeps/pthread/Subdirs: List nptl here too.
2432 * configure (libc_add_on_canonical): New variable.
2434 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2436 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2437 self to get main source tree's file.
2438 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2439 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2440 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2441 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2442 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2443 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2444 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2445 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2446 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2447 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2448 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2449 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2450 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2452 * Makefile: Use $(sysdirs) in vpath directive.
2454 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2455 (CPPFLAGS-timer_routines.c): Likewise.
2457 * Makeconfig (includes): Variable removed.
2459 2006-02-26 Roland McGrath <roland@redhat.com>
2461 * sysdeps/generic/pt-raise.c: Moved to ...
2462 * pt-raise.c: ... here.
2463 * sysdeps/generic/lowlevellock.h: Moved to ...
2464 * lowlevellock.h: ... here.
2466 2006-02-23 Roland McGrath <roland@redhat.com>
2468 * descr.h (struct pthread): Add final member `end_padding'.
2469 (PTHREAD_STRUCT_END_PADDING): Use it.
2471 2006-02-20 Roland McGrath <roland@redhat.com>
2473 * sysdeps/mips: Directory removed, saved in ports repository.
2474 * sysdeps/unix/sysv/linux/mips: Likewise.
2476 2006-02-18 Ulrich Drepper <drepper@redhat.com>
2478 * tst-robust1.c: Add second mutex to check that the mutex list is
2481 2006-02-17 Jakub Jelinek <jakub@redhat.com>
2483 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2484 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2485 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2486 lll_robust_mutex_unlock): New macros.
2487 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2488 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2489 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2490 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2491 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2493 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2495 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2497 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2499 2006-02-17 Ulrich Drepper <drepper@redhat.com>
2501 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2502 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2503 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2504 (lll_robust_mutex_unlock): Likewise.
2506 2006-02-13 Jakub Jelinek <jakub@redhat.com>
2508 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2509 Set robust_list.__next rather than robust_list.
2510 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2511 (__pthread_list_t): New typedef.
2512 (pthread_mutex_t): Replace __next and __prev fields with __list.
2513 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2514 (__pthread_list_t): New typedef.
2515 (pthread_mutex_t): Replace __next and __prev fields with __list.
2516 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2517 (__pthread_list_t, __pthread_slist_t): New typedefs.
2518 (pthread_mutex_t): Replace __next and __prev fields with __list.
2519 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2520 (__pthread_list_t, __pthread_slist_t): New typedefs.
2521 (pthread_mutex_t): Replace __next and __prev fields with __list.
2522 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2523 (__pthread_list_t, __pthread_slist_t): New typedefs.
2524 (pthread_mutex_t): Replace __next and __prev fields with __list.
2525 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2526 (__pthread_slist_t): New typedef.
2527 (pthread_mutex_t): Replace __next field with __list.
2529 2006-02-15 Ulrich Drepper <drepper@redhat.com>
2531 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2532 PTHREAD_MUTEX_OWNERDEAD.
2533 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2534 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2535 * Makefile (libpthread-routines): Add lowlevelrobustlock.
2536 * pthread_create.c (start_thread): Very much simplify robust_list loop.
2537 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2538 to PTHREAD_MUTEX_INCONSISTENT.
2539 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2540 * pthread_mutex_lock.c: Reimplement robust mutex handling.
2541 * pthread_mutex_trylock.c: Likewise.
2542 * pthread_mutex_timedlock.c: Likewise.
2543 * pthread_mutex_unlock.c: Likewise.
2544 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2545 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2546 lowlevelrobustlock.sym.
2547 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2548 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2550 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2551 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2552 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2553 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2554 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2556 2006-02-12 Ulrich Drepper <drepper@redhat.com>
2558 * allocatestack.c (allocate_stack): Initialize robust_list.
2559 * init.c (__pthread_initialize_minimal_internal): Likewise.
2560 * descr.h (struct xid_command): Pretty printing.
2561 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2562 robust_list. Adjust macros.
2563 * pthread_create.c (start_thread): Adjust robust_list handling.
2564 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2565 but the owner for all robust mutex types.
2566 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2567 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
2568 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2569 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2571 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2572 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2574 2006-02-08 Jakub Jelinek <jakub@redhat.com>
2576 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2577 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2579 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2581 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2583 (lll_futex_timed_wait): Define.
2585 2006-01-19 Ulrich Drepper <drepper@redhat.com>
2587 * tst-cancel4.c: Test ppoll.
2589 2006-01-18 Andreas Jaeger <aj@suse.de>
2592 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2593 (pthread_mutex_t): Follow changes for other archs. Based on patch
2594 by Jim Gifford <patches@jg555.com>.
2596 2006-01-13 Richard Henderson <rth@redhat.com>
2598 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2600 2006-01-10 Roland McGrath <roland@redhat.com>
2602 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2603 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2604 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2605 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2606 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2607 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2608 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2609 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2610 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2611 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2613 2006-01-09 Roland McGrath <roland@redhat.com>
2615 * tst-initializers1-c89.c: New file.
2616 * tst-initializers1-c99.c: New file.
2617 * tst-initializers1-gnu89.c: New file.
2618 * tst-initializers1-gnu99.c: New file.
2619 * Makefile (tests): Add them.
2620 (CFLAGS-tst-initializers1-c89.c): New variable.
2621 (CFLAGS-tst-initializers1-c99.c): New variable.
2622 (CFLAGS-tst-initializers1-gnu89.c): New variable.
2623 (CFLAGS-tst-initializers1-gnu99.c): New variable.
2625 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2626 Use __extension__ on anonymous union definition.
2627 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2628 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2629 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2630 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2631 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2633 2006-01-08 Jakub Jelinek <jakub@redhat.com>
2635 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2636 Don't give the union a name because it changes the mangled name.
2637 Instead name the struct for __data.
2638 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2640 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2643 2006-01-09 Jakub Jelinek <jakub@redhat.com>
2645 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2646 stack bias to mc_ftp field.
2648 2006-01-07 Ulrich Drepper <drepper@redhat.com>
2650 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2651 being too clever and reloading the futex value where it shouldn't.
2653 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2655 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2658 2006-01-06 Jakub Jelinek <jakub@redhat.com>
2660 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2663 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2665 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2666 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2667 rename in tcbhead_t.
2669 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2670 Don't give the union a name because it changes the mangled name.
2671 Instead name the struct for __data.
2672 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2673 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2674 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2675 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2676 * pthread_create.c (start_thread): Adjust robust mutex free loop.
2677 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2679 2006-01-05 Ulrich Drepper <drepper@redhat.com>
2681 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2683 (lll_futex_timed_wait): Define.
2684 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2685 * sysdeps/pthread/aio_misc.h: New file.
2687 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
2689 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2691 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
2693 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2694 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2695 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2697 2006-01-04 Ulrich Drepper <drepper@redhat.com>
2699 * tst-cancel24.cc: Use C headers instead of C++ headers.
2701 2006-01-03 Jakub Jelinek <jakub@redhat.com>
2703 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2704 sparc-linux configured glibc.
2705 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2706 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2707 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2708 atomic_compare_and_exchange_val_24_acq instead of
2709 atomic_compare_and_exchange_val_acq.
2710 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2711 instead of atomic_exchange_rel.
2712 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2713 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2715 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2717 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2718 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2719 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2720 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2721 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2722 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2724 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2726 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2727 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2728 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2730 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2732 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2734 2006-01-03 Ulrich Drepper <drepper@redhat.com>
2736 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2739 2006-01-02 Jakub Jelinek <jakub@redhat.com>
2741 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2742 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2743 THREAD_COPY_POINTER_GUARD): Define.
2744 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2745 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2747 2006-01-01 Ulrich Drepper <drepper@redhat.com>
2749 * version.c: Update copyright year.
2751 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2753 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2754 .eh_frame section, use cfi_* directives.
2755 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2757 2005-12-30 Ulrich Drepper <drepper@redhat.com>
2759 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2762 2005-12-29 Ulrich Drepper <drepper@redhat.com>
2764 * sysdeps/pthread/sigaction.c: Removed.
2765 * sigaction.c: New file.
2766 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2768 2005-12-28 Ulrich Drepper <drepper@redhat.com>
2770 * Makefile (tests): Add tst-signal7.
2771 * tst-signal7.c: New file.
2773 2005-12-27 Roland McGrath <roland@redhat.com>
2775 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2776 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2777 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2778 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2779 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2780 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2781 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2782 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2783 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2784 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2785 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2787 2005-12-27 Jakub Jelinek <jakub@redhat.com>
2789 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2790 and __prev field to pthread_mutex_t.
2791 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2792 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2793 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2794 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2795 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2798 2005-12-26 Ulrich Drepper <drepper@redhat.com>
2800 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2801 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2802 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2803 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2804 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2805 and PTHREAD_MUTEXATTR_FLAG_BITS.
2806 * descr.h (struct pthread): Add robust_list field and define
2807 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2808 * pthread_mutexattr_getrobust.c: New file.
2809 * pthread_mutexattr_setrobust.c: New file.
2810 * pthread_mutex_consistent.c: New file.
2811 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2812 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2813 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2814 Adjust pthread_mutex_t initializers.
2815 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2816 field to pthread_mutex_t.
2817 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2818 and __prev field to pthread_mutex_t.
2819 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2820 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2821 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2822 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2823 * pthread_mutexattr_gettype.c: Likewise.
2824 * pthread_mutexattr_setpshared.c: Likewise.
2825 * pthread_mutexattr_settype.c: Likewise.
2826 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2827 Initialize mutex kind according to robust flag.
2828 * pthread_mutex_lock.c: Implement local robust mutex.
2829 * pthread_mutex_timedlock.c: Likewise.
2830 * pthread_mutex_trylock.c: Likewise.
2831 * pthread_mutex_unlock.c: Likewise.
2832 * pthread_create.c (start_thread): Mark robust mutexes which remained
2834 * tst-robust1.c: New file.
2835 * tst-robust2.c: New file.
2836 * tst-robust3.c: New file.
2837 * tst-robust4.c: New file.
2838 * tst-robust5.c: New file.
2839 * tst-robust6.c: New file.
2840 * tst-robust7.c: New file.
2841 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2842 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2843 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2844 tst-robust5, tst-robust6, and tst-robust7.
2846 * tst-typesizes.c: New file.
2847 * Makefile (tests): Add tst-typesizes.
2849 * tst-once3.c: More debug output.
2851 2005-12-24 Ulrich Drepper <drepper@redhat.com>
2853 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2854 missing after last change.
2856 * version.c: Update copyright year.
2858 2005-12-23 Ulrich Drepper <drepper@redhat.com>
2860 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2861 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2862 * pthread_mutex_trylock.c: Likewise.
2863 * pthread_mutex_timedlock.c: Likewise.
2864 * pthread_mutex_unlock.c: Likewise.
2866 2005-12-22 Roland McGrath <roland@redhat.com>
2868 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2869 so that #include_next's search location is not reset to the -I..
2870 directory where <nptl/...> can be found.
2872 2005-12-22 Ulrich Drepper <drepper@redhat.com>
2875 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2876 Fix unwind info. Remove useless branch prediction prefix.
2877 * tst-cancel24.cc: New file.
2878 * Makefile: Add rules to build and run tst-cancel24.
2880 2005-12-21 Roland McGrath <roland@redhat.com>
2882 * libc-cancellation.c: Use <> rather than "" #includes.
2883 * pt-cleanup.c: Likewise.
2884 * pthread_create.c: Likewise.
2885 * pthread_join.c: Likewise.
2886 * pthread_timedjoin.c: Likewise.
2887 * pthread_tryjoin.c: Likewise.
2888 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2889 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2890 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2891 * unwind.c: Likewise.
2893 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2895 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2896 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2897 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2898 THREAD_COPY_POINTER_GUARD): Define.
2900 2005-12-19 Jakub Jelinek <jakub@redhat.com>
2902 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2904 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2905 THREAD_COPY_POINTER_GUARD): Define.
2906 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2907 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2908 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2909 THREAD_COPY_POINTER_GUARD): Define.
2910 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2911 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2912 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2913 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2914 Use PTR_DEMANGLE for B0 if defined.
2916 2005-12-17 Ulrich Drepper <drepper@redhat.com>
2918 * pthread_create.c (__pthread_create_2_1): Use
2919 THREAD_COPY_POINTER_GUARD if available.
2920 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2921 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2922 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
2923 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
2924 * sysdeps/x86_64/tls.h: Likewise.
2926 2005-12-15 Roland McGrath <roland@redhat.com>
2928 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
2930 2005-12-13 Ulrich Drepper <drepper@redhat.com>
2932 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
2934 * errno-loc.c: New file.
2936 2005-12-12 Roland McGrath <roland@redhat.com>
2938 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
2939 adjustments before choosing stack size. Update minimum stack size
2940 calculation to match allocate_stack change.
2942 2005-12-12 Ulrich Drepper <drepper@redhat.com>
2944 * allocatestack.c (allocate_stack): Don't demand that there is an
2945 additional full page available on the stack beside guard, TLS, the
2948 2005-11-24 Ulrich Drepper <drepper@redhat.com>
2950 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2951 (__cleanup_fct_attribute): Use __regparm__ not regparm.
2953 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
2954 compiling 32-bit code we must define __cleanup_fct_attribute.
2956 005-11-24 Jakub Jelinek <jakub@redhat.com>
2959 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
2960 __attribute__ instead of __attribute.
2961 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2962 (__cleanup_fct_attribute): Likewise.
2964 2005-11-17 Jakub Jelinek <jakub@redhat.com>
2966 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
2967 a write barrier before writing libgcc_s_getcfa.
2969 2005-11-06 Ulrich Drepper <drepper@redhat.com>
2971 * sysdeps/unix/sysv/linux/configure: Removed.
2973 2005-11-05 Ulrich Drepper <drepper@redhat.com>
2975 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
2976 optional init_array/fini_array support.
2978 2005-10-24 Roland McGrath <roland@redhat.com>
2980 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
2981 versioned_symbol use.
2983 2005-10-16 Roland McGrath <roland@redhat.com>
2985 * init.c (__pthread_initialize_minimal_internal): Even when using a
2986 compile-time default stack size, apply the minimum that allocate_stack
2987 will require, and round up to page size.
2989 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
2991 * Makefile ($(test-modules)): Remove static pattern rule.
2993 2005-10-14 Jakub Jelinek <jakub@redhat.com>
2994 Ulrich Drepper <drepper@redhat.com>
2996 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
2997 alignment in callback function.
2998 * Makefile: Add rules to build and run tst-align3.
2999 * tst-align3.c: New file.
3001 2005-10-03 Jakub Jelinek <jakub@redhat.com>
3003 * allocatestack.c (setxid_signal_thread): Add
3004 INTERNAL_SYSCALL_DECL (err).
3006 2005-10-02 Jakub Jelinek <jakub@redhat.com>
3008 * allocatestack.c (setxid_signal_thread): Need to use
3009 atomic_compare_and_exchange_bool_acq.
3011 2005-10-01 Ulrich Drepper <drepper@redhat.com>
3012 Jakub Jelinek <jakub@redhat.com>
3014 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
3016 (struct pthread): Move specific_used field to avoid padding.
3017 Add setxid_futex field.
3018 * init.c (sighandler_setxid): Reset setxid flag and release the
3020 * allocatestack.c (setxid_signal_thread): New function. Broken
3021 out of the bodies of the two loops in __nptl_setxid. For undetached
3022 threads check whether they are exiting and if yes, don't send a signal.
3023 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3024 * pthread_create.c (start_thread): For undetached threads, check
3025 whether setxid bit is set. If yes, wait until signal has been
3028 * allocatestack.c (STACK_VARIABLES): Initialize them.
3029 * pthread_create.c (__pthread_create_2_1): Initialize pd.
3031 2004-09-02 Jakub Jelinek <jakub@redhat.com>
3033 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3034 waiters, awake all waiters on the associated mutex.
3036 2005-09-22 Roland McGrath <roland@redhat.com>
3038 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3039 ../sysdeps/x86_64/hp-timing.h).
3041 2005-08-29 Jakub Jelinek <jakub@redhat.com>
3043 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3044 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3045 (lll_futex_wake_unlock): Define.
3046 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3047 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3048 (lll_futex_wake_unlock): Define.
3049 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3050 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3051 (lll_futex_wake_unlock): Define.
3052 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3053 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3054 (lll_futex_wake_unlock): Define.
3055 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3056 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3057 (lll_futex_wake_unlock): Define.
3058 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3059 lll_futex_wake_unlock.
3060 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3061 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3062 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3063 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3064 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3065 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3067 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3069 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3070 Fix typo in register name.
3072 2005-08-23 Ulrich Drepper <drepper@redhat.com>
3074 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3075 Use __sigfillset. Document that sigfillset does the right thing wrt
3078 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3081 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3082 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3083 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3084 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3085 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3086 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3088 * Makefile (tests): Add tst-initializers1.
3089 (CFLAGS-tst-initializers1.c): Set.
3090 * tst-initializers1.c: New test.
3092 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3094 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3095 Make sure __flags are located at offset 48 from the start of the
3098 2005-07-02 Roland McGrath <roland@redhat.com>
3100 * Makeconfig: Comment fix.
3102 2005-07-05 Jakub Jelinek <jakub@redhat.com>
3104 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3105 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3106 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3107 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3108 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3109 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3110 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3111 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3112 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3113 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3115 2005-06-25 Jakub Jelinek <jakub@redhat.com>
3117 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3118 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3119 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3121 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3122 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3123 field. Put in sysinfo field unconditionally.
3124 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3125 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3126 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3127 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3129 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3130 * pthread_create.c (__pthread_create_2_1): Use
3131 THREAD_COPY_STACK_GUARD macro.
3132 * Makefile: Add rules to build and run tst-stackguard1{,-static}
3134 * tst-stackguard1.c: New file.
3135 * tst-stackguard1-static.c: New file.
3137 2005-06-14 Alan Modra <amodra@bigpond.net.au>
3139 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3140 Invoke CGOTSETUP and CGOTRESTORE.
3141 (CGOTSETUP, CGOTRESTORE): Define.
3143 2005-05-29 Richard Henderson <rth@redhat.com>
3145 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3146 (tf_write, tf_writev): Use it.
3147 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
3150 2005-05-23 Jakub Jelinek <jakub@redhat.com>
3152 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3153 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3154 __librt_*_asynccancel@local.
3156 2005-05-17 Alan Modra <amodra@bigpond.net.au>
3158 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3159 all occurrences of JUMPTARGET. Instead append @local to labels.
3161 2005-05-20 Jakub Jelinek <jakub@redhat.com>
3163 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3164 size/alignment of struct pthread rather than tcbhead_t.
3165 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3167 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3169 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3172 2005-05-19 Richard Henderson <rth@redhat.com>
3174 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3175 __sync_val_compare_and_swap, not explicit _si variant.
3176 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3178 2005-05-03 Ulrich Drepper <drepper@redhat.com>
3181 * sysdeps/pthread/pthread.h: Avoid empty initializers.
3183 2005-05-03 Jakub Jelinek <jakub@redhat.com>
3185 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3186 .eh_frame section, use cfi_* directives.
3188 2005-04-27 Jakub Jelinek <jakub@redhat.com>
3190 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3193 2005-04-27 Ulrich Drepper <drepper@redhat.com>
3196 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3199 2005-04-27 Roland McGrath <roland@redhat.com>
3201 * Makefile (tests): Remove tst-clock2.
3203 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3204 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3205 translating to the kernel clockid_t for our own process/thread clock.
3207 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3209 2005-04-15 Jakub Jelinek <jakub@redhat.com>
3211 * old_pthread_cond_init.c: Include <errno.h>.
3212 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3213 process shared or uses clock other than CLOCK_REALTIME.
3214 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3216 2005-04-13 David S. Miller <davem@davemloft.net>
3218 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3219 * sysdeps/sparc/sparc64/clone.S: New file.
3221 2005-04-05 Jakub Jelinek <jakub@redhat.com>
3224 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3225 __inline instead of inline.
3226 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3228 2005-03-31 Jakub Jelinek <jakub@redhat.com>
3230 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3231 functionally equivalent, but shorter instructions.
3232 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3233 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3234 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3236 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3237 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3238 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3239 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3240 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3241 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3242 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3244 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3245 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3246 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3247 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3248 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3250 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
3252 * sysdeps/mips/Makefile: New file.
3253 * sysdeps/mips/nptl-sysdep.S: New file.
3254 * sysdeps/mips/tcb-offsets.sym: New file.
3255 * sysdeps/mips/pthread_spin_lock.S: New file.
3256 * sysdeps/mips/pthread_spin_trylock.S: New file.
3257 * sysdeps/mips/pthreaddef.h: New file.
3258 * sysdeps/mips/tls.h: New file.
3259 * sysdeps/mips/jmpbuf-unwind.h: New file.
3260 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3261 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3262 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3263 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3264 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3265 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3266 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3267 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3268 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3269 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3271 2005-03-23 Ulrich Drepper <drepper@redhat.com>
3274 * pthread_create.c (__pthread_create_2_1): Rename syscall error
3277 2005-03-10 Jakub Jelinek <jakub@redhat.com>
3279 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3281 2005-02-25 Roland McGrath <roland@redhat.com>
3283 * alloca_cutoff.c: Correct license text.
3284 * tst-unload.c: Likewise.
3285 * sysdeps/pthread/allocalim.h: Likewise.
3286 * sysdeps/pthread/pt-initfini.c: Likewise.
3287 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3288 * sysdeps/pthread/bits/sigthread.h: Likewise.
3289 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3290 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3292 2005-02-16 Roland McGrath <roland@redhat.com>
3294 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3295 Use unsigned int * for ptr_nthreads.
3297 2005-02-14 Alan Modra <amodra@bigpond.net.au>
3300 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3303 2005-02-07 Richard Henderson <rth@redhat.com>
3306 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3309 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
3311 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3312 order of arguments in invocation of atomic_add_zero.
3314 2005-01-26 Jakub Jelinek <jakub@redhat.com>
3317 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3318 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3319 at least gotntpoff relocation and addition.
3320 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3322 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3324 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3327 2005-01-06 Ulrich Drepper <drepper@redhat.com>
3329 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3330 entry for static tls deallocation fix.
3331 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3332 also contains information whether the memory pointed to is static
3334 * sysdeps/i386/tls.h: Likewise.
3335 * sysdeps/ia64/tls.h: Likewise.
3336 * sysdeps/powerpc/tls.h: Likewise.
3337 * sysdeps/s390/tls.h: Likewise.
3338 * sysdeps/sh/tls.h: Likewise.
3339 * sysdeps/sparc/tls.h: Likewise.
3340 * sysdeps/x86_64/tls.h: Likewise.
3342 2004-12-27 Ulrich Drepper <drepper@redhat.com>
3344 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3346 2004-12-21 Jakub Jelinek <jakub@redhat.com>
3348 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3350 * Makefile (tests): Add tst-align2.
3351 * tst-align2.c: New test.
3352 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3353 -mpreferred-stack-boundary=4.
3355 2004-12-18 Roland McGrath <roland@redhat.com>
3357 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3358 New file removed withdrawn for the moment.
3360 2004-12-17 Richard Henderson <rth@redhat.com>
3362 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3363 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3365 2004-12-16 Ulrich Drepper <drepper@redhat.com>
3367 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3368 Increased PTHREAD_STACK_MIN.
3370 * tst-context1.c (stacks): Use bigger stack size.
3372 2004-12-16 Jakub Jelinek <jakub@redhat.com>
3374 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3375 * sysdeps/sparc/tcb-offsets.sym: Add TID.
3377 2004-12-15 Jakub Jelinek <jakub@redhat.com>
3379 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3380 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3381 * sysdeps/s390/tcb-offsets.sym (TID): Add.
3383 2004-12-15 Ulrich Drepper <drepper@redhat.com>
3385 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3387 2004-12-14 Ulrich Drepper <drepper@redhat.com>
3389 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3390 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3392 * tst-getpid1.c: If child crashes, report this first. Print which
3395 2004-12-09 Ulrich Drepper <drepper@redhat.com>
3397 * init.c (__pthread_initialize_minimal_internal): Also unblock
3400 2004-12-01 Jakub Jelinek <jakub@redhat.com>
3402 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3403 _POSIX_THREAD_CPUTIME): Define to 0.
3404 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3405 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3406 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3407 __timer_signal_thread_tclk): Remove.
3408 (init_module): Remove their initialization.
3409 (thread_cleanup): Remove their cleanup assertions.
3410 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3411 __timer_signal_thread_tclk): Remove.
3412 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3413 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3414 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3416 2004-12-07 Jakub Jelinek <jakub@redhat.com>
3418 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3419 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3421 * Makefile (tests): Add tst-getpid2.
3422 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3423 (do_test): Use it. Use __clone2 instead of clone on ia64.
3424 * tst-getpid2.c: New test.
3426 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3428 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3430 2004-12-04 Ulrich Drepper <drepper@redhat.com>
3432 * Makefile (tests): Add tst-getpid1.
3433 * tst-getpid1.c: New file.
3434 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3435 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3437 2004-12-02 Roland McGrath <roland@redhat.com>
3439 * Makefile (libpthread-nonshared): Variable removed.
3440 ($(objpfx)libpthread_nonshared.a): Target removed.
3441 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3442 These are now handled by generic magic from
3443 libpthread-static-only-routines being set.
3445 2004-11-27 Ulrich Drepper <drepper@redhat.com>
3447 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3448 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3449 _POSIX_THREAD_PRIO_PROTECT): Define.
3450 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3451 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3452 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3454 2004-11-26 Jakub Jelinek <jakub@redhat.com>
3456 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3457 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3458 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3459 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3460 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3461 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3462 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3464 2004-11-24 Ulrich Drepper <drepper@redhat.com>
3466 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3468 * Makefile (libpthread-routines): Add pthread_setschedprio.
3469 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3470 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3471 * pthread_setschedprio.c: New file.
3473 2004-11-20 Jakub Jelinek <jakub@redhat.com>
3475 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3476 * pthread_cancel.c (pthread_create): Likewise.
3478 * Makefile (libpthread-routines): Add vars.
3479 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3480 * init.c (__default_stacksize, __is_smp): Remove.
3482 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3483 and define a wrapper macro.
3484 (PTHREAD_STATIC_FN_REQUIRE): Define.
3485 * allocatestack.c (__find_thread_by_id): Undefine.
3486 * pthread_create (__pthread_keys): Remove.
3487 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3488 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3489 PTHREAD_STATIC_FN_REQUIRE.
3491 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3493 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3494 parameter to REGISTER macro.
3496 2004-11-17 Roland McGrath <roland@redhat.com>
3498 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3499 Make sure SIGCANCEL is blocked as well.
3501 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3503 * sysdeps/pthread/setxid.h: New file.
3504 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3505 (struct xid_command): Add forward decl.
3506 (struct pthread_functions): Change return type of __nptl_setxid hook
3508 * pthreadP.h (__nptl_setxid): Change return type to int.
3509 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3510 calling thread, return its return value and set errno on failure.
3511 * descr.h (struct xid_command): Change id type to long array.
3513 * Makefile: Add rules to build and test tst-setuid1 and
3515 * tst-setuid1.c: New test.
3516 * tst-setuid1-static.c: New test.
3518 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3520 * Makefile (tests): Add tst-exit3.
3521 * tst-exit3.c: New test.
3523 2004-11-09 Ulrich Drepper <drepper@redhat.com>
3525 * Makefile (tests): Add tst-exit2.
3526 * tst-exit2.c: New file.
3528 2004-11-09 Roland McGrath <roland@redhat.com>
3531 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3532 here, before calling clone.
3533 * pthread_create.c (start_thread): Don't do it here.
3535 2004-11-02 Jakub Jelinek <jakub@redhat.com>
3537 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3539 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3541 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3542 Set ETIMEDOUT to errno when time is up. Tweak to avoid
3545 2004-10-28 Jakub Jelinek <jakub@redhat.com>
3547 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3548 if sched_priority is not between minprio and maxprio.
3550 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3552 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3553 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3555 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3556 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3558 2004-10-24 Ulrich Drepper <drepper@redhat.com>
3560 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3561 not-cancelable I/O functions.
3563 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3565 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3566 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3567 make sure 2 is stored in the futex and we looked at the old value.
3568 Fix a few other problems to return the correct value.
3570 2004-10-14 Richard Henderson <rth@redhat.com>
3572 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3575 2004-10-06 Jakub Jelinek <jakub@redhat.com>
3577 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3578 of pthread-functions.h and pthreaddef.h.
3579 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3581 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3582 Change __data.__nwaiters from int to unsigned int.
3584 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3585 sysconf (_SC_THREAD_CPUTIME) returns negative value.
3587 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3590 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3591 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3593 2004-10-06 Ulrich Drepper <drepper@redhat.com>
3595 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
3596 test fails, remove message queue.
3597 (tf_msgsnd): Likewise.
3599 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3601 * tst-clock1.c: Change #ifdef to #if defined.
3602 * tst-clock2.c: Likewise.
3603 * tst-cond11.c: Likewise.
3605 * sysdeps/pthread/timer_create.c (timer_create): Use
3606 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3607 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3610 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3612 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3613 _POSIX_THREAD_CPUTIME): Define to 0.
3615 2004-10-04 Ulrich Drepper <drepper@redhat.com>
3617 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3618 and _POSIX_THREAD_CPUTIME to zero.
3619 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3620 * tst-barrier2.c: Fix testing for POSIX feature.
3621 * tst-clock1.c: Likewise.
3622 * tst-clock2.c: Likewise.
3623 * tst-cond11.c: Likewise.
3624 * tst-cond4.c: Likewise.
3625 * tst-cond6.c: Likewise.
3626 * tst-flock2.c: Likewise.
3627 * tst-mutex4.c: Likewise.
3628 * tst-mutex9.c: Likewise.
3629 * tst-rwlock12.c: Likewise.
3630 * tst-rwlock4.c: Likewise.
3631 * tst-signal1.c: Likewise.
3632 * tst-spin2.c: Likewise.
3633 * sysdeps/pthread/posix-timer.h: Likewise.
3634 * sysdeps/pthread/timer_create.c: Likewise.
3635 * sysdeps/pthread/timer_routines.c: Likewise.
3637 2004-10-01 Ulrich Drepper <drepper@redhat.com>
3639 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3640 (__lll_mutex_timedlock_wait): Address futex correctly.
3642 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3643 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3644 make sure 2 is stored in the futex and we looked at the old value.
3645 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3646 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
3647 which might very well made the code not working at all before.
3650 2004-09-28 Ulrich Drepper <drepper@redhat.com>
3652 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3653 allow SIGSETXID to be sent.
3654 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3655 for SIGSETXID to be defined.
3656 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3657 SIGSETXID cannot be blocked.
3659 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3660 Add __extension__ to long long types.
3661 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3662 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3663 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3664 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3665 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3666 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3667 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3669 2004-09-25 Ulrich Drepper <drepper@redhat.com>
3671 * descr.h (struct pthread): Add stopped_start field.
3672 * sysdeps/pthread/createthread.c (create_thread): Set
3673 start_stopped flag in descriptor for new thread appropriately.
3674 * pthread_create.c (start_thread): Only take lock to be stopped on
3675 startup if stopped_start flag says so.
3677 2004-09-24 Ulrich Drepper <drepper@redhat.com>
3679 * pthread_create.c (__pthread_create_2_1): Remember whether thread
3680 is created detached and if yes, do not try to free the stack in case
3681 the thread creation failed.
3682 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3683 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3684 case there has been no error. [BZ #405]
3686 * pthread_create.c (start_thread): Don't wait for scheduler data
3687 etc to be set at the beginning of the function. The cancellation
3688 infrastructure must have been set up. And enable async
3689 cancellation before potentially going to sleep. [BZ #401]
3691 2004-09-20 Ulrich Drepper <drepper@redhat.com>
3693 * Versions: Remove exports for pthread_set*id_np functions.
3694 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3696 * Makefile: Don't build pthread_set*id code for now.
3698 2004-09-19 Ulrich Drepper <drepper@redhat.com>
3700 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3702 * allocatestack.c (__nptl_setxid): New function.
3703 * descr.h (struct xid_command): Define type.
3704 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3705 (sighandler_setxid): New function.
3706 (__pthread_initialize_minimal): Register sighandler_setxid for
3708 * pt-allocrtsig.c: Update comment.
3709 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
3710 Declare __nptl_setxid.
3711 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3712 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3713 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3714 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3715 and pthread_setresuid_np.
3716 * pthread_setgid_np.c: New file.
3717 * pthread_setuid_np.c: New file.
3718 * pthread_setegid_np.c: New file.
3719 * pthread_seteuid_np.c: New file.
3720 * pthread_setregid_np.c: New file.
3721 * pthread_setreuid_np.c: New file.
3722 * pthread_setresgid_np.c: New file.
3723 * pthread_setresuid_np.c: New file.
3724 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3725 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3726 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3727 and pthread_setresuid_np.
3728 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3729 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3730 pthread_setregid, and pthread_setresgid.
3732 2004-09-18 Ulrich Drepper <drepper@redhat.com>
3734 * allocatestack.c (allocate_stack): Return EAGAIN instead of
3735 ENOMEM when out of memory.
3737 2004-09-10 Roland McGrath <roland@redhat.com>
3740 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3741 code, since we don't try to use the broken CLONE_STOPPED any more.
3742 * pthread_create.c (start_thread): Likewise.
3744 2004-09-15 Richard Henderson <rth@redhat.com>
3746 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3748 2004-09-01 David Mosberger <davidm@hpl.hp.com>
3750 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3751 (__libc_unwind_longjmp): Delete macro and declare as function.
3752 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3753 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3755 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3756 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3757 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3759 2004-09-12 Ulrich Drepper <drepper@redhat.com>
3761 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3763 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3764 types also for __USE_XOPEN2K.
3765 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3766 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3767 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3768 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3769 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3770 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3771 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3774 2004-09-08 Ulrich Drepper <drepper@redhat.com>
3776 * sysdeps/pthread/pthread.h
3777 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3778 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3779 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3780 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3783 2004-09-07 Ulrich Drepper <drepper@redhat.com>
3785 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3786 PSEUDO to be used with . prefix.
3788 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3789 Use atomic_increment instead of atomic_exchange_and_add.
3790 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3792 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3794 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3797 * allocatestack.c (allocate_stack): Use atomic_increment_val
3798 instead of atomic_exchange_and_add.
3799 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3800 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3802 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3805 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3806 the initialization function might throw.
3808 2005-09-05 Richard Henderson <rth@redhat.com>
3810 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3811 Move definition inside libpthread, libc, librt check. Provide
3812 definition for rtld.
3814 2004-09-02 Ulrich Drepper <drepper@redhat.com>
3816 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3817 * sysdeps/i386/jmpbuf-unwind.h: Likewise
3818 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3819 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3820 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3821 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3822 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3823 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3826 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3827 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3828 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3830 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3831 Decrement __nwaiters. If pthread_cond_destroy has been called and
3832 this is the last waiter, signal pthread_cond_destroy caller and
3833 avoid using the pthread_cond_t structure after unlock.
3834 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3835 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3836 Read clock type from the least significant bits of __nwaiters instead
3838 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3839 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3841 2004-08-31 Jakub Jelinek <jakub@redhat.com>
3844 * Makefile (tests): Add tst-cond20 and tst-cond21.
3845 * tst-cond20.c: New test.
3846 * tst-cond21.c: New test.
3847 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3848 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3850 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3852 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3853 (pthread_cond_t): Likewise.
3854 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3856 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3858 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3860 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3861 (cond_nwaiters): New.
3863 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3864 if there are waiters not signalled yet.
3865 Wait until all already signalled waiters wake up.
3866 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3867 __nwaiters. If pthread_cond_destroy has been called and this is the
3868 last waiter, signal pthread_cond_destroy caller and avoid using
3869 the pthread_cond_t structure after unlock.
3870 (__pthread_cond_wait): Increment __nwaiters in the beginning,
3871 decrement it when leaving. If pthread_cond_destroy has been called
3872 and this is the last waiter, signal pthread_cond_destroy caller.
3873 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3874 Likewise. Read clock type from the least significant bits of
3875 __nwaiters instead of __clock.
3876 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3877 whether clock ID can be encoded in COND_CLOCK_BITS bits.
3878 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3879 clock type just from the last COND_CLOCK_BITS bits of value.
3880 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3881 instead of __clock, just from second bit of condattr's value.
3883 2004-08-30 Jakub Jelinek <jakub@redhat.com>
3885 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3886 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
3888 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3890 2004-08-15 Roland McGrath <roland@frob.com>
3892 * pthread_atfork.c: Update copyright terms including special exception
3893 for these trivial files, which are statically linked into executables
3894 that use dynamic linking for the significant library code.
3896 2004-08-09 Jakub Jelinek <jakub@redhat.com>
3898 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3899 pthread_rwlock_rdlock.
3900 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3901 Decrease __nr_readers_queued after reacquiring lock.
3902 * sysdeps/pthread/pthread_rwlock_timedrdlock
3903 (pthread_rwlock_timedrdlock): Likewise.
3904 Reported by Bob Cook <bobcook47@hotmail.com>.
3906 2004-08-11 Jakub Jelinek <jakub@redhat.com>
3908 * tst-rwlock14.c (tf): Read main thread handle from *ARG
3909 before pthread_barrier_wait.
3911 2004-08-07 Ulrich Drepper <drepper@redhat.com>
3913 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3914 Remove unnecessary exception handling data.
3916 2004-07-23 Jakub Jelinek <jakub@redhat.com>
3919 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3920 instead of clockid_t.
3922 2004-07-21 Roland McGrath <roland@redhat.com>
3924 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
3926 2004-07-19 Roland McGrath <roland@redhat.com>
3928 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
3930 2004-07-02 Roland McGrath <roland@redhat.com>
3932 * configure: Don't exit.
3934 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3936 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3937 (__pthread_cond_timedwait): Check for invalid nanosecond in
3940 2004-07-07 Ulrich Drepper <drepper@redhat.com>
3942 * Makefile: Add rules to build and run tst-fini1.
3943 * tst-fini1.c: New file.
3944 * tst-fini1mod.c: New file.
3946 2004-07-05 Ulrich Drepper <drepper@redhat.com>
3948 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
3949 if no cancellation support is needed.
3950 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3951 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3952 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3953 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3954 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3955 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3956 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3957 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3958 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3960 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
3961 only if not already defined.
3963 2004-07-05 Jakub Jelinek <jakub@redhat.com>
3965 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
3966 constraint "m" instead of "0" for futex.
3968 * shlib-versions: Add powerpc64-.*-linux.*.
3970 2004-07-04 Jakub Jelinek <jakub@redhat.com>
3972 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
3973 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
3975 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
3976 1 billion and 64-bit tv_nsec which is valid when truncated to 32
3979 2004-06-29 Roland McGrath <roland@redhat.com>
3981 * Banner: NPTL no longer has its own version number.
3982 * Makefile (nptl-version): Variable removed.
3983 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
3984 using $(version), the glibc version number.
3986 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3988 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
3989 Fix branch offset for a PLT entry.
3990 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
3992 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3994 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
3996 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
3999 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4001 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4004 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4006 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4007 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4009 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4010 (pthread_rwlock_timedrdlock): Likewise.
4012 2004-06-22 Jakub Jelinek <jakub@redhat.com>
4014 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4015 Set __r7 to val, not mutex.
4017 2004-06-27 Ulrich Drepper <drepper@redhat.com>
4019 * Makefile: Add rules to build tst-rwlock14.
4020 * tst-rwlock14.c: New file.
4022 2004-06-24 Boris Hu <boris.hu@intel.com>
4024 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4026 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4028 2004-06-19 Andreas Jaeger <aj@suse.de>
4030 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4031 assembler in last patch.
4033 2004-06-17 Ulrich Drepper <drepper@redhat.com>
4035 * sysdeps/pthread/pthread_cond_timedwait.c
4036 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4037 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4038 (__pthread_cond_timedwait): Check for invalid nanosecond in
4040 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4041 * tst-cond19.c: New file.
4042 * Makefile: Add rules to build and run tst-cond19.
4044 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
4046 * tst-context1.c (GUARD_PATTERN): Defined.
4047 (tst_context_t): Define struct containing ucontext_t & guard words.
4048 (ctx): Declare as an array of tst_context_t.
4049 (fct): Verify uc_link & guard words are still valid.
4050 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
4052 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4054 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4055 Add __data.__futex field, reshuffle __data.__clock.
4056 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4057 (__pthread_cond_signal): Increment __futex at the same time as
4058 __wakeup_seq or __total_seq. Pass address of __futex instead of
4059 address of low 32-bits of __wakeup_seq to futex syscall.
4060 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4061 (__pthread_cond_wait): Likewise. Pass __futex value from before
4062 releasing internal lock to FUTEX_WAIT.
4063 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4064 (__pthread_cond_timedwait): Likewise.
4065 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4066 (FUTEX_CMP_REQUEUE): Define.
4067 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4068 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4069 Pass __futex value from before the unlock and __futex address instead
4070 of address of low 32-bits of __wakeup_seq to futex syscall.
4071 Fallback to FUTEX_WAKE all on any errors.
4073 2004-06-08 Jakub Jelinek <jakub@redhat.com>
4075 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4077 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4078 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4079 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4080 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4081 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
4083 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
4085 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4086 Add memory clobber to inline assembly.
4087 (__lll_mutex_trylock): Likewise.
4088 (__lll_mutex_cond_trylock): Likewise.
4090 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
4092 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4093 Pass val argument as 6th system call argument in %r7.
4095 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4097 * Makefile (tests): Add tst-cond16.
4098 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4099 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4100 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4101 Add __data.__futex field, reshuffle __data.__clock.
4102 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4103 (__pthread_cond_signal): Increment __futex at the same time as
4104 __wakeup_seq or __total_seq. Pass address of __futex instead of
4105 address of low 32-bits of __wakeup_seq to futex syscall.
4106 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4107 (__pthread_cond_wait): Likewise. Pass __futex value from before
4108 releasing internal lock to FUTEX_WAIT.
4109 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4110 (__pthread_cond_timedwait): Likewise.
4111 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4112 (FUTEX_CMP_REQUEUE): Define.
4113 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4114 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4115 Pass __futex value from before the unlock and __futex address instead
4116 of address of low 32-bits of __wakeup_seq to futex syscall.
4117 Fallback to FUTEX_WAKE all on any errors.
4118 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4120 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4121 internally. Return non-zero if error, zero if success.
4122 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4123 Add __data.__futex field, reshuffle __data.__clock.
4124 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4126 (lll_futex_requeue): Add val argument, return 1 unconditionally
4128 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4129 Add __data.__futex field, reshuffle __data.__clock.
4130 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4132 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4133 internally. Return non-zero if error, zero if success.
4134 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4135 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4136 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4138 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4139 internally. Return non-zero if error, zero if success.
4140 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4141 Add __data.__futex field, reshuffle __data.__clock.
4142 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4144 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4145 internally. Return non-zero if error, zero if success.
4146 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4147 Add __data.__futex field, reshuffle __data.__clock.
4148 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4149 Add __data.__futex field, reshuffle __data.__clock.
4150 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4151 Increment __futex at the same time as __wakeup_seq or __total_seq.
4152 Pass address of __futex instead of address of low 32-bits of
4153 __wakeup_seq to futex syscall.
4154 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4155 Pass __futex value from before releasing internal lock
4157 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4158 Likewise. Avoid unnecessary shadowing of variables.
4159 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4160 Set __futex to 2 * __total_seq. Pass __futex value from before the
4161 unlock and __futex address instead of address of low 32-bits of
4162 __wakeup_seq to futex_requeue macro, adjust for new return value
4164 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4165 (__pthread_cond_signal): Increment __futex at the same time as
4166 __wakeup_seq or __total_seq. Pass address of __futex instead of
4167 address of low 32-bits of __wakeup_seq to futex syscall.
4168 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4169 (__pthread_cond_wait): Likewise. Pass __futex value from before
4170 releasing internal lock to FUTEX_WAIT.
4171 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4172 (__pthread_cond_timedwait): Likewise.
4173 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4174 (FUTEX_CMP_REQUEUE): Define.
4175 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4176 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4177 Pass __futex value from before the unlock and __futex address instead
4178 of address of low 32-bits of __wakeup_seq to futex syscall.
4179 Fallback to FUTEX_WAKE all on any errors.
4181 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4183 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4184 Add nop to align the end of critical section.
4185 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4187 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4189 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4190 Add __broadcast_seq field.
4191 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4192 all waiters as woken with woken_seq and bump broadcast counter.
4193 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4194 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
4195 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4196 Comment typo fixes. Avoid returning -ETIMEDOUT.
4198 2004-06-01 Ulrich Drepper <drepper@redhat.com>
4200 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4201 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4202 Reported by Kaz Kojima.
4204 2004-05-25 Jakub Jelinek <jakub@redhat.com>
4206 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4208 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4210 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4211 __broadcast_seq with bc_seq after acquiring internal lock instead of
4214 2004-05-18 Jakub Jelinek <jakub@redhat.com>
4216 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4218 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4219 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4220 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4221 (pthread_cond_t): Add __data.__broadcast_seq field.
4222 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4223 (FRAME_SIZE): Define.
4224 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
4226 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4228 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
4230 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4231 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
4234 2004-05-18 Ulrich Drepper <drepper@redhat.com>
4236 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4237 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4238 Add __broadcast_seq field.
4239 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4240 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4241 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4242 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4243 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4244 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4245 all waiters as woken with woken_seq and bump broadcast counter.
4246 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4247 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4248 __broadcast_seq field.
4249 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4250 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4251 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4252 * pthread_cond_init.c: Initialize __broadcast_seq field.
4253 * Makefile (tests): Add tst-cond17 and tst-cond18.
4254 Add .NOTPARALLEL goal.
4255 * tst-cond16.c: New file. From Jakub.
4256 * tst-cond17.c: New file. From Jakub.
4257 * tst-cond18.c: New file. From Jakub.
4259 2004-05-16 Ulrich Drepper <drepper@redhat.com>
4261 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4264 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4265 Parametrize frame size. Correct some unwind info.
4266 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4268 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4270 * tst-stack3.c: Note testing functionality beyond POSIX.
4272 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4274 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4275 Change conditional from ifdef to if.
4277 2004-04-23 Jakub Jelinek <jakub@redhat.com>
4279 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4280 SYSDEP_CANCEL_ERROR): Define.
4283 2004-05-01 Jakub Jelinek <jakub@redhat.com>
4285 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4287 2004-04-20 Jakub Jelinek <jakub@redhat.com>
4289 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4291 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4293 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4294 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4295 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4296 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4298 2004-04-19 Ulrich Drepper <drepper@redhat.com>
4300 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4301 thread has all signals blocked.
4303 2004-04-18 Andreas Jaeger <aj@suse.de>
4305 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4306 (SEM_VALUE_MAX): Add missing brace.
4308 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4310 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4312 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4313 * sysdeps/pthread/tst-mqueue8x.c: New test.
4314 * tst-cancel4.c: Update comment about message queues.
4316 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4317 return it_value { 0, 0 }.
4318 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4320 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4321 assertion for SIGEV_NONE.
4322 (thread_attr_compare): Compare all attributes, not just a partial
4325 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4327 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4329 2004-04-17 Ulrich Drepper <drepper@redhat.com>
4331 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4332 Just use a plain number.
4333 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4334 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4335 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4336 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4337 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4338 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4339 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4341 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4343 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4345 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4347 2004-04-15 Jakub Jelinek <jakub@redhat.com>
4349 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4350 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4351 of calling sigwaitinfo.
4353 2004-04-16 Ulrich Drepper <drepper@redhat.com>
4355 * allocatestack.c (allocate_stack): Set reported_guardsize
4357 * pthread_getattr_np.c (pthread_getattr_np): Use
4358 reported_guardsize instead of guardsize.
4359 * descr.h (struct pthread): Add reported_guardsize field.
4361 2004-04-13 Jakub Jelinek <jakub@redhat.com>
4363 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4365 2004-04-12 Ulrich Drepper <drepper@redhat.com>
4367 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4369 2004-04-08 Jakub Jelinek <jakub@redhat.com>
4371 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4372 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4373 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4374 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4375 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4377 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4378 (_POSIX_MESSAGE_PASSING): Define.
4379 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4380 (_POSIX_MESSAGE_PASSING): Define.
4381 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4382 (_POSIX_MESSAGE_PASSING): Define.
4384 2004-04-04 Ulrich Drepper <drepper@redhat.com>
4386 * tst-context1.c (fct): Check whether correct stack is used.
4388 2004-04-03 Ulrich Drepper <drepper@redhat.com>
4390 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4391 matching constraints for asm mem parameters.
4393 * tst-clock2.c (tf): Don't define unless needed.
4395 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
4397 * Makefile (link-libc-static): Use $(static-gnulib) instead of
4400 2004-03-30 Ulrich Drepper <drepper@redhat.com>
4402 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4403 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4404 * pthreadP.h: Declare __nptl_deallocate_tsd.
4405 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4408 * Makefile (tests): Add tst-tsd5.
4409 * tst-tsd5.c: New file.
4411 2004-03-29 Ulrich Drepper <drepper@redhat.com>
4413 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4414 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4415 is SHLIB_COMPAT check.
4416 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4417 (__pthread_attr_getaffinity_old): Likewise.
4418 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4419 (__pthread_getaffinity_old): Likewise.
4420 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4421 (__pthread_setaffinity_old): Likewise.
4423 2004-03-26 Ulrich Drepper <drepper@redhat.com>
4425 * allocatestack.c (_make_stacks_executable): Call
4426 _dl_make_stack_executable first.
4428 2004-03-24 Roland McGrath <roland@redhat.com>
4430 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4431 constraint instead of "0".
4433 2004-03-24 Ulrich Drepper <drepper@redhat.com>
4435 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4436 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4438 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4439 code to avoid warning.
4441 2004-03-24 Andreas Jaeger <aj@suse.de>
4443 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4444 (__pthread_attr_setaffinity_old): Remove const.
4446 2004-03-23 Ulrich Drepper <drepper@redhat.com>
4448 * sysdeps/unix/sysv/linux/smp.h: New file.
4449 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4450 * init.c: Define __is_smp.
4451 (__pthread_initialize_minimal_internal): Call is_smp_system to
4452 initialize __is_smp.
4453 * pthreadP.h: Declare __is_smp.
4454 Define MAX_ADAPTIVE_COUNT is necessary.
4455 * pthread_mutex_init.c: Add comment regarding __spins field.
4456 * pthread_mutex_lock.c: Implement adaptive mutex type.
4457 * pthread_mutex_timedlock.c: Likewise.
4458 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4459 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4461 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4462 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4463 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4464 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4465 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4466 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4467 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4468 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4469 lll_mutex_cond_trylock.
4470 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4471 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4472 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4473 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4474 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4475 Define BUSY_WAIT_NOP.
4476 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4477 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4479 * tst-mutex5.c: Add support for testing adaptive mutexes.
4480 * tst-mutex7.c: Likewise.
4481 * tst-mutex5a.c: New file.
4482 * tst-mutex7a.c: New file.
4483 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4485 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4486 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4487 vgettimeofday call might destroy the content.
4489 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4492 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4493 No need to restrict type of ret. Make it int. Add comment.
4495 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4496 Remove unnecessary setne instruction.
4498 2004-03-22 Jakub Jelinek <jakub@redhat.com>
4500 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4501 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4502 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4503 If realloc fails, break out of the loop.
4505 2004-03-20 Andreas Jaeger <aj@suse.de>
4507 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4508 (__pthread_setaffinity_old): Fix interface.
4509 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4510 (__pthread_getaffinity_old): Likewise.
4512 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4513 (__pthread_setaffinity_new): Remove duplicate declaration.
4515 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4517 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4518 the return value to a safe register.
4519 (CDISABLE): Set the function argument correctly.
4521 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4523 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4524 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4525 Rewrite so that only one locked memory operation per round is needed.
4526 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4527 (pthread_barrier_wait): After wakeup, release lock only when the
4528 last thread stopped using the barrier object.
4529 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4530 (__pthread_cond_wait): Don't store mutex address if the current
4531 value is ~0l. Add correct cleanup support and unwind info.
4532 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4533 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4534 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4535 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4536 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4537 Add correct cleanup support and unwind info.
4538 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4539 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4540 information for syscall wrappers.
4542 2004-03-18 Ulrich Drepper <drepper@redhat.com>
4544 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4545 cpusetsize field, remove next.
4546 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4547 parameter for size of the CPU set.
4548 (pthread_setaffinity_np): Likewise.
4549 (pthread_attr_getaffinity_np): Likewise.
4550 (pthread_attr_setaffinity_np): Likewise.
4551 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4552 interface change, keep compatibility code.
4553 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4554 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4555 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4556 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
4557 __pthread_getaffinity_np.
4558 * Versions: Add version for changed interfaces.
4559 * tst-attr3.c: Adjust test for interface change.
4560 * pthread_getattr_np.c: Query the kernel about the affinity mask with
4561 increasing buffer sizes.
4562 * pthread_attr_destroy.c: Remove unused list handling.
4563 * pthread_attr_init.c: Likewise.
4565 2004-03-17 Roland McGrath <roland@redhat.com>
4567 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4568 first argument to clock_getres so we ever enable kernel timers.
4570 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
4572 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4574 2004-03-12 Richard Henderson <rth@redhat.com>
4576 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4577 oldvalue from CENABLE to CDISABLE.
4579 2004-03-12 Ulrich Drepper <drepper@redhat.com>
4581 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4582 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4583 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4584 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4586 2004-03-11 Richard Henderson <rth@redhat.com>
4588 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4589 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4590 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4592 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4594 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4595 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4596 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4598 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4600 * forward.c (__pthread_cond_broadcast_2_0,
4601 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4602 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4603 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4605 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4607 * sysdeps/sh/tcb-offsets.sym: Add PID.
4608 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4609 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4611 2004-03-10 Ulrich Drepper <drepper@redhat.com>
4613 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4614 include <sysdep-cancel.h>, vfork is no cancellation point.
4615 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4616 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4617 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4619 2004-03-10 Jakub Jelinek <jakub@redhat.com>
4621 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4623 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4624 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4626 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4628 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4629 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4630 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4631 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4632 of DO_CALL_VIA_BREAK. Work around a gas problem.
4634 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4635 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4636 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4637 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4638 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4639 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4641 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4642 a local register for saving old PID. Negate PID in parent upon exit.
4644 * sysdeps/unix/sysv/linux/s390/s390-32/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-32/vfork.S: New file.
4649 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4651 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4652 before syscall, set to the old value in the parent afterwards.
4653 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4654 * sysdeps/s390/tcb-offsets.sym: Add PID.
4656 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4657 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4658 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4659 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4660 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4661 * sysdeps/sparc/tcb-offsets.sym: Add PID.
4663 2004-03-10 Andreas Schwab <schwab@suse.de>
4665 * sysdeps/ia64/tcb-offsets.sym: Add PID.
4666 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4667 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4669 2004-03-09 Jakub Jelinek <jakub@redhat.com>
4671 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4672 * tst-cancel21.c (do_one_test): Likewise.
4673 Reported by Gordon Jin <gordon.jin@intel.com>.
4675 2004-02-09 Jakub Jelinek <jakub@redhat.com>
4677 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4678 if non-zero and set to INT_MIN if zero.
4679 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4680 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4681 (SAVE_PID, RESTORE_PID): Define.
4683 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4684 Use relative path to avoid including NPTL i386/vfork.S.
4685 (SAVE_PID, RESTORE_PID): Define.
4686 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4687 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4688 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4690 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4691 * tst-vfork1.c: New test.
4692 * tst-vfork2.c: New test.
4693 * tst-vfork1x.c: New test.
4694 * tst-vfork2x.c: New test.
4696 2004-03-08 Ulrich Drepper <drepper@redhat.com>
4698 * sysdeps/i386/tcb-offsets.sym: Add PID.
4699 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4700 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4701 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4703 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
4705 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4707 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
4709 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4712 2004-03-07 Ulrich Drepper <drepper@redhat.com>
4714 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4717 * tst-once4.c: Remove unnecessary macro definition.
4719 * tst-mutex7.c (do_test): Limit thread stack size.
4720 * tst-once2.c (do_test): Likewise.
4721 * tst-tls3.c (do_test): Likewise.
4722 * tst-tls1.c (do_test): Likewise.
4723 * tst-signal3.c (do_test): Likewise.
4724 * tst-kill6.c (do_test): Likewise.
4725 * tst-key4.c (do_test): Likewise.
4726 * tst-join4.c (do_test): Likewise.
4727 * tst-fork1.c (do_test): Likewise.
4728 * tst-context1.c (do_test): Likewise.
4729 * tst-cond2.c (do_test): Likewise.
4730 * tst-cond10.c (do_test): Likewise.
4731 * tst-clock2.c (do_test): Likewise.
4732 * tst-cancel10.c (do_test): Likewise.
4733 * tst-basic2.c (do_test): Likewise.
4734 * tst-barrier4.c (do_test): Likewise.
4736 2004-03-05 Ulrich Drepper <drepper@redhat.com>
4738 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4740 2004-03-01 Ulrich Drepper <drepper@redhat.com>
4742 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4743 (__pthread_cond_timedwait): Optimize wakeup test.
4744 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4745 (__pthread_cond_wait): Likewise.
4746 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4747 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4750 2004-02-29 Ulrich Drepper <drepper@redhat.com>
4752 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4753 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
4754 the atomic instruction needed.
4755 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4756 (__lll_mutex_lock_wait): Likewise.
4758 2004-02-28 Ulrich Drepper <drepper@redhat.com>
4760 * Makefile (tests): Add tst-cond14 and tst-cond15.
4761 * tst-cond14.c: New file.
4762 * tst-cond15.c: New file.
4764 2004-02-27 Ulrich Drepper <drepper@redhat.com>
4766 * sysdeps/pthread/createthread.c (create_thread): Remove use of
4767 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
4768 needs to be implemented differently to be useful.
4770 2004-02-26 Ulrich Drepper <drepper@redhat.com>
4772 * pthread_attr_setschedparam.c: Don't test priority against limits
4773 here. Set ATTR_FLAG_SCHED_SET flag.
4774 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4775 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4776 from parent thread to child. If attribute is used and scheduling
4777 parameters are not inherited, copy parameters from attribute or
4778 compute them. Check priority value.
4779 * pthread_getschedparam.c: If the parameters aren't known yet get
4780 them from the kernel.
4781 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4782 ATTR_FLAG_POLICY_SET flag for thread.
4783 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4784 and ATTR_FLAG_POLICY_SET.
4786 * sysdeps/pthread/createthread.c: Use tgkill if possible.
4788 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4789 fail if stack address hasn't been set. Just return 0.
4791 2004-02-25 Ulrich Drepper <drepper@redhat.com>
4793 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
4794 libpthread for the files in this list.
4795 (CFLAGS-tst-unload): Removed.
4796 * tst-unload.c (do_test): Don't use complete path for
4799 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4802 2004-02-22 Ulrich Drepper <drepper@redhat.com>
4804 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4805 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4806 operation per round is needed.
4807 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4808 (__lll_mutex_lock_wait): Likewise.
4810 2004-02-20 Ulrich Drepper <drepper@redhat.com>
4812 * tst-cancel9.c (cleanup): Don't print to stderr.
4814 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4816 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4818 2004-02-20 Jakub Jelinek <jakub@redhat.com>
4820 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4821 (__syscall_error_handler2): Call CDISABLE.
4822 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4823 (__syscall_error_handler2): Call CDISABLE.
4825 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4826 Release lock before the loop, don't reacquire it.
4828 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4830 2004-02-19 Andreas Schwab <schwab@suse.de>
4832 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4835 2004-02-18 Ulrich Drepper <drepper@redhat.com>
4837 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4838 (pthread_barrier_wait): After wakeup, release lock only when the
4839 last thread stopped using the barrier object.
4840 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4841 (pthread_barrier_wait): Likewise.
4842 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4844 * Makefile (tests): Add tst-barrier4.
4845 * tst-barrier4.c: New file.
4847 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4848 (__pthread_cond_timedwait): Perform timeout test while holding
4849 internal lock to prevent wakeup race.
4850 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4851 * sysdeps/pthread/pthread_cond_timedwait.c
4852 (__pthread_cond_timedwait): Likewise.
4853 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4854 (__pthread_cond_timedwait): Likewise.
4856 2004-02-18 Jakub Jelinek <jakub@redhat.com>
4858 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4859 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4860 * Makefile (tests): Add tst-rwlock13.
4861 * tst-rwlock13.c: New test.
4863 2004-02-16 Ulrich Drepper <drepper@redhat.com>
4865 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4866 (__condvar_tw_cleanup): Little optimization.
4867 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4869 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
4871 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4872 libpthread as "lib" parameter to SHLIB_COMPAT.
4873 (__novmx_siglongjmp): Fix typo in function name.
4874 (__novmx_longjmp): Fix typo in function name.
4876 2004-02-13 Ulrich Drepper <drepper@redhat.com>
4878 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4881 * sysdeps/generic/pt-longjmp.c: Moved to...
4882 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
4884 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
4886 * Makefile (libpthread-routines): Add pt-cleanup.
4887 * pt-longjmp.c: Removed.
4888 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4889 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4890 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4891 Version longjmp, siglongjmp for GLIBC_2.3.4.
4892 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4894 2004-02-13 Ulrich Drepper <drepper@redhat.com>
4896 * sysdeps/pthread/pthread_cond_timedwait.c
4897 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
4898 Reuse code. Add __builtin_expects.
4900 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4901 (__pthread_cond_timedwait): Get internal lock in case timeout has
4902 passed before the futex syscall.
4903 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4905 2004-01-20 Ulrich Drepper <drepper@redhat.com>
4907 * allocatestack.c: Pretty printing.
4909 * sysdeps/pthread/createthread.c (create_thread): Don't add
4910 CLONE_DETACHED bit if it is not necessary.
4912 2004-01-16 Ulrich Drepper <drepper@redhat.com>
4914 * pthread_getattr_np.c: Include ldsodefs.h.
4916 2004-01-16 Richard Henderson <rth@redhat.com>
4918 * allocatestack.c: Don't declare __libc_stack_end.
4919 * init.c (__pthread_initialize_minimal_internal): Likewise.
4920 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
4922 2004-01-15 Richard Henderson <rth@redhat.com>
4924 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4925 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
4926 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
4927 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
4928 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
4929 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
4930 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
4931 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
4933 2004-01-14 Ulrich Drepper <drepper@redhat.com>
4935 * init.c (pthread_functions): Make array const.
4937 2004-01-13 Ulrich Drepper <drepper@redhat.com>
4939 * allocatestack.c (__make_stacks_executable): Change interface.
4940 Check parameters. Pass parameter on to libc counterpart.
4941 * pthreadP.h: Change declaration.
4943 2004-01-13 Richard Henderson <rth@redhat.com>
4945 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
4947 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
4950 * sysdeps/alpha/Makefile: New file.
4951 * sysdeps/alpha/tcb-offsets.sym: New file.
4952 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4953 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
4955 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
4958 2004-01-08 Jakub Jelinek <jakub@redhat.com>
4960 * Makefile (tests): Add tst-backtrace1.
4961 * tst-backtrace1.c: New test.
4963 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
4965 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
4966 register as second parameter to the REGISTER macro.
4967 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
4968 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
4969 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
4970 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
4971 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
4972 of thread register as second parameter to REGISTER macro in 64 case.
4974 2004-01-03 Ulrich Drepper <drepper@redhat.com>
4976 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
4977 (CFLAGS-getpid.o): Defined.
4978 (CFLAGS-getpid.os): Defined.
4980 2003-12-31 Ulrich Drepper <drepper@redhat.com>
4982 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
4983 returned for main thread does not overlap with any other VMA.
4984 Patch by Jakub Jelinek.
4986 2003-12-29 Jakub Jelinek <jakub@redhat.com>
4988 * tst-raise1.c: Include stdio.h.
4990 2003-12-23 Jakub Jelinek <jakub@redhat.com>
4992 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
4993 setting with __ASSUME_TGKILL || defined __NR_tgkill.
4994 If pid is 0, set it to selftid.
4995 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
4996 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
4997 != 0, return self->tid without doing a syscall.
4998 * descr.h (struct pthread): Move pid field after tid.
5000 * Makefile (tests): Add tst-raise1.
5001 * tst-raise1.c: New file.
5003 2003-12-23 Roland McGrath <roland@redhat.com>
5005 * tst-oddstacklimit.c: New file.
5006 * Makefile (tests): Add it.
5007 (tst-oddstacklimit-ENV): New variable.
5009 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5010 value up to page size for __default_stacksize.
5012 2003-12-21 Ulrich Drepper <drepper@redhat.com>
5014 * Makefile (tests): Add tst-eintr5.
5015 * tst-eintr5.c: New file.
5017 * eintr.c (eintr_source): Prevent sending signal to self.
5019 * tst-eintr2.c (tf1): Improve error message.
5021 2003-12-20 Ulrich Drepper <drepper@redhat.com>
5023 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5024 * sysdeps/unix/sysv/linux/getpid.c: New file.
5025 * pthread_cancel.c: Add comment explaining use of PID field.
5026 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5027 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5028 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5029 temporarily to signal the field must not be relied on and updated
5031 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5032 temporarily negative.
5033 * sysdeps/unix/sysv/linux/raise.c: Likewise.
5035 2003-12-19 Ulrich Drepper <drepper@redhat.com>
5037 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
5038 (eintr_source): If ARG != NULL, use pthread_kill.
5039 * tst-eintr1.c: Adjust for this change.
5040 * tst-eintr2.c: Likewise.
5041 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5042 * tst-eintr3.c: New file.
5043 * tst-eintr4.c: New file.
5045 2003-12-19 Jakub Jelinek <jakub@redhat.com>
5047 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5048 if CANCELSTATE_BITMASK is set.
5049 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5052 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5053 (tests-reverse): Add tst-cancel23.
5054 * tst-cancel22.c: New test.
5055 * tst-cancel23.c: New test.
5057 2003-12-18 Ulrich Drepper <drepper@redhat.com>
5059 * tst-eintr1.c: Better error messages.
5061 * Makefile (tests): Add tst-eintr2.
5062 * tst-eintr2.c: New file.
5064 2003-12-18 Jakub Jelinek <jakub@redhat.com>
5066 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5067 (CFLAGS-tst-cancelx21.c): Set.
5068 * tst-cancel21.c: New test.
5069 * tst-cancelx21.c: New test.
5071 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
5073 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5074 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
5075 * pt-longjmp.c: Include jmpbuf-unwind.h.
5076 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5077 _JMPBUF_UNWINDS. Adjust compared pointers.
5078 * init.c (__pthread_initialize_minimal_internal): Initialize
5079 pd->stackblock_size.
5080 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5081 * sysdeps/alpha/jmpbuf-unwind.h: New file.
5082 * sysdeps/i386/jmpbuf-unwind.h: New file.
5083 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5084 * sysdeps/s390/jmpbuf-unwind.h: New file.
5085 * sysdeps/sh/jmpbuf-unwind.h: New file.
5086 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5087 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5088 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5089 (_JMPBUF_CFA_UNWINDS): Remove.
5090 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5092 2003-12-12 Jakub Jelinek <jakub@redhat.com>
5094 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5095 (CFLAGS-tst-cancelx20.c): Set.
5096 * tst-cancel20.c: New test.
5097 * tst-cancelx20.c: New test.
5099 2003-12-17 Ulrich Drepper <drepper@redhat.com>
5101 * init.c (__pthread_initialize_minimal_internal): Don't treat
5102 architectures with separate register stack special here when
5103 computing default stack size.
5105 2003-12-17 Roland McGrath <roland@redhat.com>
5107 * Makefile (tst-cancelx7-ARGS): New variable.
5108 Reportd by Greg Schafer <gschafer@zip.com.au>.
5110 2003-12-17 Jakub Jelinek <jakub@redhat.com>
5112 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
5113 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5114 (tst-stack3-ENV): Set.
5115 ($(objpfx)tst-stack3-mem): New.
5116 * tst-stack3.c: New test.
5118 2003-12-10 David Mosberger <davidm@hpl.hp.com>
5120 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5121 Add unwind directives. Drop unused .regstk directive.
5122 (_fini_EPILOG_BEGINS): Add unwind directives.
5124 2003-12-11 Ulrich Drepper <drepper@redhat.com>
5126 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5127 Assume parameter is a pointer.
5128 (lll_futex_wake): Likewise.
5129 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5131 (lll_futex_wake): Likewise.
5132 Reported by Boris Hu.
5133 * sysdeps/unix/sysv/linux/unregister-atfork.c
5134 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5136 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5138 2003-12-10 Ulrich Drepper <drepper@redhat.com>
5140 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5141 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5142 __rtld_lock_initialize for ld.so lock.
5143 Patch in part by Adam Li <adam.li@intel.com>.
5145 2003-12-02 David Mosberger <davidm@hpl.hp.com>
5147 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5148 in $(gnulib). Also, remove stale comment.
5150 2003-11-12 David Mosberger <davidm@hpl.hp.com>
5152 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5153 advantage of new syscall stub and optimize accordingly.
5155 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5156 from SYS_futex, to match expectations of
5157 sysdep.h:DO_INLINE_SYSCALL.
5158 (lll_futex_clobbers): Remove.
5159 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5160 (lll_futex_wake): Likewise.
5161 (lll_futex_requeue): Likewise.
5162 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5163 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5165 (__lll_mutex_lock): Likewise.
5166 (__lll_mutex_cond_lock): Likewise.
5167 (__lll_mutex_timed_lock): Likewise.
5168 (__lll_mutex_unlock): Likewise.
5169 (__lll_mutex_unlock_force): Likewise.
5171 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5172 comes before the include of <sysdep.h>.
5173 (THREAD_SELF_SYSINFO): New macro.
5174 (THREAD_SYSINFO): Likewise.
5175 (INIT_SYSINFO): New macro.
5176 (TLS_INIT_TP): Call INIT_SYSINFO.
5178 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5180 * sysdeps/pthread/createthread.c (create_thread): Use
5181 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5182 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5183 THREAD_SELF_SYSINFO instead of open code.
5184 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5185 (THREAD_SYSINFO): Likewise.
5187 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5189 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5191 2003-12-06 Ulrich Drepper <drepper@redhat.com>
5193 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5194 instead of .init. Patch by David Mosberger.
5196 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
5198 * sysdeps/pthread/configure.in: Remove broken declaration in C
5199 cleanup handling check.
5201 2003-11-30 Andreas Jaeger <aj@suse.de>
5203 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5204 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5207 2003-11-27 Jakub Jelinek <jakub@redhat.com>
5209 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5210 * pthread_attr_destroy.c: Include shlib-compat.h.
5211 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5212 is set in iattr->flags.
5213 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5215 2003-11-21 Jakub Jelinek <jakub@redhat.com>
5217 * Makefile (distribute): Add tst-cleanup4aux.c.
5219 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
5222 2003-11-21 Ulrich Drepper <drepper@redhat.com>
5224 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5225 pthread_cond_signal.
5227 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5228 store mutex address if the current value is ~0l.
5229 * sysdeps/pthread/pthread_cond_timedwait.c
5230 (__pthread_cond_timedwait): Likewise.
5231 * sysdeps/pthread/pthread_cond_broadcast.c
5232 (__pthread_cond_broadcast): Don't use requeue for pshared
5235 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5236 (__pthread_cond_wait): Don't store mutex address if the current
5238 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5239 (__pthread_cond_timedwait): Likewise.
5240 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5241 (__pthread_cond_broadcast): Don't use requeue for pshared
5244 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5245 element with ~0l for pshared condvars, with NULL otherwise.
5247 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5248 (__pthread_cond_wait): Don't store mutex address if the current
5250 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5251 (__pthread_cond_timedwait): Likewise.
5252 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5253 (__pthread_cond_broadcast): Don't use requeue for pshared
5256 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5257 * tst-cond12.c: New file.
5258 * tst-cond13.c: New file.
5260 2003-11-17 Ulrich Drepper <drepper@redhat.com>
5262 * sysdeps/pthread/configure.in: Make missing forced unwind support
5265 2003-11-11 Ulrich Drepper <drepper@redhat.com>
5267 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5269 2003-11-06 Ulrich Drepper <drepper@redhat.com>
5271 * Makefile: Add magic to clean up correctly.
5273 2003-11-05 Jakub Jelinek <jakub@redhat.com>
5275 * unwind.c (FRAME_LEFT): Define.
5276 (unwind_stop): Handle old style cleanups here.
5277 (__pthread_unwind): Handle old style cleanups only if
5278 !HAVE_FORCED_UNWIND.
5279 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5280 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5281 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5282 ($(objpfx)tst-cleanupx4): Likewise.
5283 * tst-cleanup4.c: New test.
5284 * tst-cleanup4aux.c: New.
5285 * tst-cleanupx4.c: New test.
5287 2003-11-04 Ulrich Drepper <drepper@redhat.com>
5289 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5290 lll_mutex_*lock macros to skip atomic operations on some archs.
5292 2003-11-03 Ulrich Drepper <drepper@redhat.com>
5294 * sysdeps/pthread/tst-timer.c (main): Initialize
5295 sigev2.sigev_value as well.
5297 2003-10-15 Roland McGrath <roland@redhat.com>
5299 * sysdeps/pthread/configure.in: Barf if visibility attribute support
5301 * sysdeps/pthread/configure: Regenerated.
5303 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5305 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5306 locking macros. No distinction between normal and mutex locking
5308 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5309 Merge bits from lowlevelmutex.S we still need.
5310 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5311 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5312 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5313 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5314 new mutex implementation.
5315 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5316 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5317 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5318 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5319 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5320 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5321 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5322 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5323 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5324 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5325 symbol for entry point to avoid cancellation.
5327 2003-10-07 Jakub Jelinek <jakub@redhat.com>
5329 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5331 (SAVE_OLDTYPE_0): Fix a typo.
5333 2003-10-03 Ulrich Drepper <drepper@redhat.com>
5335 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5336 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
5338 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5340 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5343 2003-10-02 Jakub Jelinek <jakub@redhat.com>
5345 * Makefile (tests): Add tst-cancel19.
5346 * tst-cancel19.c: New test.
5348 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5350 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5351 restoring of the old cancellation type.
5353 2003-09-30 Jakub Jelinek <jakub@redhat.com>
5355 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5357 2003-09-27 Wolfram Gloger <wg@malloc.de>
5359 * sysdeps/pthread/malloc-machine.h: New file
5361 2003-09-24 Roland McGrath <roland@redhat.com>
5363 * allocatestack.c (__make_stacks_executable): Don't ignore return
5364 value from _dl_make_stack_executable.
5366 2003-09-24 Ulrich Drepper <drepper@redhat.com>
5368 * allocatestack.c (__make_stacks_executable): Also change
5369 permission of the currently unused stacks.
5371 * allocatestack.c (change_stack_perm): Split out from
5372 __make_stacks_executable.
5373 (allocate_stack): If the required permission changed between the time
5374 we started preparing the stack and queueing it, change the permission.
5375 (__make_stacks_executable): Call change_stack_perm.
5377 * Makefile: Build tst-execstack-mod locally.
5378 * tst-execstack-mod.c: New file.
5380 2003-09-23 Jakub Jelinek <jakub@redhat.com>
5382 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5384 2003-09-23 Roland McGrath <roland@redhat.com>
5386 * tst-execstack.c: New file.
5387 * Makefile (tests): Add it.
5388 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5389 (LDFLAGS-tst-execstack): New variable.
5391 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5392 whether to use PROT_EXEC for stack mmap.
5393 (__make_stacks_executable): New function.
5394 * pthreadP.h: Declare it.
5395 * init.c (__pthread_initialize_minimal_internal): Set
5396 GL(dl_make_stack_executable_hook) to that.
5398 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5400 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5401 recommendation from AMD re avoidance of lock prefix.
5403 2003-09-22 Jakub Jelinek <jakub@redhat.com>
5405 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5406 lll_futex_timed_wait instead of lll_futex_wait.
5407 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5408 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5409 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5410 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5411 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5412 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5413 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5414 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5415 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5416 Completely revamp the locking macros. No distinction between
5417 normal and mutex locking anymore.
5418 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5419 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5420 __lll_lock_timedwait): Fix prototypes.
5421 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5422 __lll_lock_timedwait): Likewise.
5423 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5424 macros, add __builtin_expect.
5425 (lll_mutex_timedlock): Likewise. Fix return value.
5426 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5427 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5428 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5429 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5430 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5431 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5432 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5433 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5435 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5437 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5438 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5439 operation if possible.
5441 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5442 like jumping over the lock prefix.
5444 2003-09-21 Ulrich Drepper <drepper@redhat.com>
5446 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5447 locking macros. No distinction between normal and mutex locking
5449 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5450 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5451 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5452 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5453 locking. Merge bits from lowlevelmutex.S we still need.
5454 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5455 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5456 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5457 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5458 * Makefile (routines): Remove libc-lowlevelmutex.
5459 (libpthread-rountines): Remove lowlevelmutex.
5460 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5461 for new mutex implementation.
5462 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5463 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5464 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5465 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5466 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5468 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5470 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5471 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5472 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5473 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5474 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5475 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5476 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5477 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5479 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5481 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5482 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5483 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5485 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5486 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5488 2003-09-20 Ulrich Drepper <drepper@redhat.com>
5490 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5491 in parameters of asm with output parameters.
5493 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5494 type of DECR parameter to int.
5495 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5497 2003-09-18 Jakub Jelinek <jakub@redhat.com>
5499 * tst-attr3.c (tf, do_test): Print stack start/end/size and
5500 guardsize for each thread.
5502 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5504 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5505 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5506 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5508 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5509 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5511 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5512 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5513 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5514 (pthread_getaffinity_np): Add hidden_def.
5516 * Makefile (tests): Add tst-attr3.
5517 * tst-attr3.c: New test.
5519 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5521 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5523 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5524 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5526 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5528 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5529 * tst-align.c: Include tst-stack-align.h.
5530 (tf, do_test): Use TEST_STACK_ALIGN macro.
5532 2003-09-17 Ulrich Drepper <drepper@redhat.com>
5534 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5537 2003-09-16 Ulrich Drepper <drepper@redhat.com>
5539 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5540 stack-related values for the initial thread.
5542 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5544 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5546 2003-09-11 Ulrich Drepper <drepper@redhat.com>
5548 * pthread_mutex_lock.c: Minor code rearrangements.
5550 2003-09-05 Roland McGrath <roland@redhat.com>
5552 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5553 Instead, include ../nptl_db/db_info.c to do its magic.
5554 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5555 (__pthread_pthread_key_2ndlevel_size): Likewise.
5556 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5557 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5558 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5559 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5560 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5561 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5562 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5563 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5564 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5565 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5566 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5567 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5568 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5569 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5570 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5571 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5572 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5574 2003-09-08 Ulrich Drepper <drepper@redhat.com>
5576 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5577 of pthread_t to be compatible with LT.
5578 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5579 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5580 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5581 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5582 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5583 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5584 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5586 2003-09-04 Ulrich Drepper <drepper@redhat.com>
5588 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5590 2003-09-04 Jakub Jelinek <jakub@redhat.com>
5592 * unwind-forcedunwind.c: Move to...
5593 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5594 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5595 * sysdeps/pthread/jmpbuf-unwind.h: New file.
5596 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5597 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5598 * unwind.c: Include jmpbuf-unwind.h.
5599 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5601 2003-09-02 Jakub Jelinek <jakub@redhat.com>
5603 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5604 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5605 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5606 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5607 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5608 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5609 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5610 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5611 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5612 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5613 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5615 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5616 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5617 * Makefile (tests): Add tst-stack2.
5618 * tst-stack2.c: New test.
5619 * tst-stack1.c: Include limits.h and sys/param.h.
5620 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5622 * pthread_condattr_setpshared.c: Include errno.h.
5623 (pthread_condattr_setpshared): Return EINVAL if pshared
5624 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5626 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5627 defined symbol for entry point to avoid cancellation.
5628 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5630 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5632 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5634 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5636 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5638 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5639 __close_nocancel, __read_nocancel, __write_nocancel,
5640 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
5641 libpthread.so or librt.so, define to corresponding function
5642 without _nocancel suffix.
5643 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5644 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5645 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5647 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5649 2003-09-02 Ulrich Drepper <drepper@redhat.com>
5651 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5652 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5654 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5655 in subsections has a symbol associated with it.
5657 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5658 defined symbol for entry point to avoid cancellation.
5659 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5661 2003-09-01 Jakub Jelinek <jakub@redhat.com>
5663 * Makefile (tests): Add tst-tls5.
5664 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5665 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5666 ($(objpfx)tst-tls5): New.
5667 ($(objpfx)tst-tls6.out): Likewise.
5668 (tests): Depend on $(objpfx)tst-tls6.out.
5669 * tst-tls3.c: Include stdint.h and pthreaddef.h.
5670 (do_test): Check pthread_self () return value alignment.
5671 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5672 (tf): Check pthread_self () return value alignment.
5673 * tst-tls5.c: New test.
5675 * tst-tls5mod.c: New.
5676 * tst-tls5moda.c: New.
5677 * tst-tls5modb.c: New.
5678 * tst-tls5modc.c: New.
5679 * tst-tls5modd.c: New.
5680 * tst-tls5mode.c: New.
5681 * tst-tls5modf.c: New.
5682 * tst-tls6.sh: New test.
5684 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5685 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5686 * init.c (pthread_functions): Initialize them.
5687 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5688 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5689 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5690 pthread_cond_timedwait@@GLIBC_2.3.2.
5692 2003-09-01 Jakub Jelinek <jakub@redhat.com>
5694 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5695 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5696 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5697 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5698 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5699 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5701 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5703 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5704 _POSIX_THREAD_PRIORITY_SCHEDULING.
5705 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5707 2003-08-31 Ulrich Drepper <drepper@redhat.com>
5709 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5710 nested function, use static inline function from libio.h.
5711 Code by Richard Henderson.
5713 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5716 2003-08-30 Jakub Jelinek <jakub@redhat.com>
5718 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5719 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5720 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5721 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5722 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5723 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5724 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5725 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5726 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5727 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5728 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5729 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5730 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5731 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5732 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5733 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5734 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5735 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5736 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5737 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5738 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5739 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5740 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5741 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5742 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5743 * sysdeps/sparc/tls.h: New file.
5744 * sysdeps/sparc/tcb-offsets.sym: New file.
5745 * sysdeps/sparc/Makefile: New file.
5746 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5747 * init.c [__sparc__] (__NR_set_tid_address): Define.
5749 2003-08-29 Jakub Jelinek <jakub@redhat.com>
5751 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5752 _IO_release_lock): Define.
5754 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
5756 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5757 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
5759 2003-08-27 Ulrich Drepper <drepper@redhat.com>
5761 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5762 (__pthread_cleanup_class): Add missing return types of member
5765 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
5767 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5768 (lll_mutex_unlock_force): Add memory barrier between store and futex
5771 2003-08-25 Ulrich Drepper <drepper@redhat.com>
5773 * tst-cancel4.c (do_test): Also unlink tempfname and remove
5774 tempmsg in first loop.
5776 2003-08-18 Ulrich Drepper <drepper@redhat.com>
5778 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5779 _POSIX_THREAD_PRIORITY_SCHEDULING.
5780 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5782 2003-08-07 Jakub Jelinek <jakub@redhat.com>
5784 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5785 (__rtld_lock_default_lock_recursive,
5786 __rtld_lock_default_unlock_recursive): Define.
5787 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5788 __rtld_lock_unlock_recursive): Define using
5789 GL(_dl_rtld_*lock_recursive).
5790 * init.c (__pthread_initialize_minimal_internal): Initialize
5791 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5792 Lock GL(_dl_load_lock) the same number of times as
5793 GL(_dl_load_lock) using non-mt implementation was nested.
5795 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5796 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5798 2003-08-06 Jakub Jelinek <jakub@redhat.com>
5800 * tst-cancel17.c (do_test): Make len2 maximum of page size and
5803 2003-08-07 Jakub Jelinek <jakub@redhat.com>
5805 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5807 2003-08-03 Jakub Jelinek <jakub@redhat.com>
5809 * sysdeps/pthread/createthread.c (do_clone): Move error handling
5810 to first syscall error check. Move syscall error check for tkill
5811 into __ASSUME_CLONE_STOPPED #ifdef.
5813 2003-08-02 Ulrich Drepper <drepper@redhat.com>
5815 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5816 is not defined, do explicit synchronization.
5817 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
5818 is not defined also unlock pd->lock for non-debugging case in case
5820 * pthread_create.c (start_thread): Always get and release pd->lock
5821 if __ASSUME_CLONE_STOPPED is not defined.
5822 (start_thread_debug): Removed. Adjust users.
5823 * allocatestack.c (allocate_stack): Always initialize lock if
5824 __ASSUME_CLONE_STOPPED is not defined.
5825 * Makefile (tests): Add tst-sched1.
5826 * tst-sched1.c: New file.
5828 * sysdeps/pthread/createthread.c (do_clone): Only use
5829 sched_setschduler and pass correct parameters.
5831 2003-07-31 Jakub Jelinek <jakub@redhat.com>
5833 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5834 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5835 PTHREAD_STACK_MIN in comments.
5837 2003-07-31 Jakub Jelinek <jakub@redhat.com>
5839 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5840 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5842 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5843 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5844 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5845 (__pthread_cleanup_upto): Fix prototype.
5846 (_longjmp_unwind): Adjust caller.
5847 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5848 Change second argument to const struct pointer.
5849 * tst-sem8.c (main): Remove unused s2 and s3 variables.
5850 * tst-sem9.c (main): Likewise.
5851 * unwind.c: Include string.h for strlen prototype.
5853 2003-07-31 Ulrich Drepper <drepper@redhat.com>
5855 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5856 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5857 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5859 Patch by Nicholas Miell <nmiell@attbi.com>.
5861 2003-07-30 Jakub Jelinek <jakub@redhat.com>
5863 * init.c (__pthread_initialize_minimal_internal): Initialize
5864 GL(dl_init_static_tls).
5865 * pthreadP.h (__pthread_init_static_tls): New prototype.
5866 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5868 * Makefile (tests): Add tst-tls4.
5869 (modules-names): Add tst-tls4moda and tst-tls4modb.
5870 ($(objpfx)tst-tls4): Link against libdl and libpthread.
5871 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5873 * tst-tls4.c: New file.
5874 * tst-tls4moda.c: New file.
5875 * tst-tls4modb.c: New file.
5877 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
5879 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5880 before __timer_dealloc.
5881 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5882 Don't call list_unlink.
5884 2003-07-29 Roland McGrath <roland@redhat.com>
5886 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5888 2003-07-25 Jakub Jelinek <jakub@redhat.com>
5890 * tst-cancel17.c (do_test): Check if aio_cancel failed.
5891 Don't reuse struct aiocb A if it failed.
5892 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5893 not just one byte, as that does not block.
5895 2003-07-22 Jakub Jelinek <jakub@redhat.com>
5897 * sysdeps/pthread/unwind-resume.c: New file.
5898 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5899 unwind-resume in csu subdir.
5900 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5902 (librt-sysdep_routines, librt-shared-only-routines): Add
5904 * sysdeps/pthread/rt-unwind-resume.c: New file.
5905 * unwind-forcedunwind.c: New file.
5906 * Makefile (libpthread-routines): Add unwind-forcedunwind.
5907 (libpthread-shared-only-routines): Likewise.
5908 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5909 * pthreadP.h (pthread_cancel_init): New prototype.
5910 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5912 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5913 attr argument const struct pthread_attr *.
5915 * res.c (__res_state): Return __resp.
5916 * descr.h: Include resolv.h.
5917 (struct pthread): Add res field.
5918 * pthread_create.c: Include resolv.h.
5919 (start_thread): Initialize __resp.
5920 * Makefile (tests): Add tst-_res1.
5921 (module-names): Add tst-_res1mod1, tst-_res1mod2.
5922 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
5923 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
5925 * tst-_res1.c: New file.
5926 * tst-_res1mod1.c: New file.
5927 * tst-_res1mod2.c: New file.
5929 2003-07-21 Ulrich Drepper <drepper@redhat.com>
5931 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
5933 * Makefile: Define various *-no-z-defs variables for test DSOs
5934 which has undefined symbols.
5936 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
5938 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5939 Retry if the stwcx fails to store once_control.
5941 2003-07-20 Ulrich Drepper <drepper@redhat.com>
5943 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
5944 pthread_attr_setaffinity.
5945 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
5946 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
5947 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
5948 * pthread_attr_destroy.c: Free cpuset element if allocated.
5949 * pthread_create.c: Pass iattr as additional parameter to
5951 * sysdeps/pthread/createthread.c: If attribute is provided and
5952 a new thread is created with affinity set or scheduling parameters,
5953 start thread with CLONE_STOPPED.
5954 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
5955 pthread_attr_setaffinity.
5956 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5959 2003-07-15 Ulrich Drepper <drepper@redhat.com>
5961 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
5963 2003-07-14 Ulrich Drepper <drepper@redhat.com>
5965 * sysdeps/pthread/configure.in: Require CFI directives also for
5968 2003-07-15 Jakub Jelinek <jakub@redhat.com>
5970 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5973 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5975 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
5977 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
5978 registers as variables. Call __pthread_mutex_unlock_usercnt.
5979 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5980 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
5981 not self pointer in __writer. Compare with TID to determine
5983 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5984 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
5986 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
5988 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
5989 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5990 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
5991 macros also when compiling librt.
5993 2003-07-11 Jakub Jelinek <jakub@redhat.com>
5995 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
5996 -fasynchronous-unwind-tables.
5997 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5998 (PSEUDO): Add cfi directives.
5999 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6001 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6004 2003-07-08 Jakub Jelinek <jakub@redhat.com>
6006 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6007 __pthread_unregister_cancel): Add prototypes and hidden_proto.
6008 * unwind.c (__pthread_unwind_next): Add hidden_def.
6009 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6011 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6012 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6013 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6015 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6016 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6018 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6019 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6020 __pthread_unregister_cancel and __pthread_unwind_next.
6022 2003-07-04 Jakub Jelinek <jakub@redhat.com>
6024 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6025 different symbol for the cancellation syscall wrapper and
6026 non-cancellation syscall wrapper.
6027 (PSEUDO_END): Define.
6029 2003-07-05 Richard Henderson <rth@redhat.com>
6031 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6032 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6033 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6034 return actual return value from the syscall, not 0.
6036 2003-07-07 Ulrich Drepper <drepper@redhat.com>
6038 * descr.h (struct pthread): Add pid field.
6039 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6040 (__reclaim_stacks): Likewise.
6041 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6042 also check for PID of the signal source.
6043 (__pthread_initialize_minimal_internal): Also initialize pid field
6044 of initial thread's descriptor.
6045 * pthread_cancel.c: Use tgkill instead of tkill if possible.
6046 * sysdeps/unix/sysv/linux/fork.c: Likewise.
6047 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6048 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6049 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6051 2003-07-05 Ulrich Drepper <drepper@redhat.com>
6053 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6054 Fix use of parameter.
6055 (__libc_cleanup_pop): Likewise.
6057 2003-07-04 Ulrich Drepper <drepper@redhat.com>
6059 * init.c (sigcancel_handler): Change parameters to match handler
6060 for SA_SIGACTION. Check signal number and code to recognize
6061 invalid invocations.
6063 2003-07-03 Roland McGrath <roland@redhat.com>
6065 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6066 Apply sizeof (struct pthread) bias to r13 value.
6068 2003-07-03 Ulrich Drepper <drepper@redhat.com>
6070 * sysdeps/pthread/configure.in: Require CFI directives.
6072 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6074 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6075 libpthread compilation.
6076 * unwind.c (__pthread_unwind): Add hidden_def.
6077 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6079 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6081 * libc-cancellation.c (__libc_cleanup_routine): Define.
6082 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6083 (__pthread_cleanup_pop): Define.
6085 2003-07-01 Richard Henderson <rth@redhat.com>
6087 * sysdeps/alpha/elf/pt-initfini.c: New file.
6088 * sysdeps/alpha/pthread_spin_lock.S: New file.
6089 * sysdeps/alpha/pthread_spin_trylock.S: New file.
6090 * sysdeps/alpha/pthreaddef.h: New file.
6091 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6092 * sysdeps/alpha/tls.h: New file.
6093 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6094 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6095 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6096 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6097 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6098 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6099 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6100 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6101 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6102 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6104 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6106 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6107 cleanup support and unwind info.
6109 2003-06-30 Ulrich Drepper <drepper@redhat.com>
6111 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6112 Use correct cleanup handler registration. Add unwind info.
6113 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6114 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6115 * tst-once3.c: Add cleanup handler and check it is called.
6116 * tst-once4.c: Likewise.
6117 * tst-oncex3.c: New file.
6118 * tst-oncex4.c: New file.
6119 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6121 2003-06-29 Ulrich Drepper <drepper@redhat.com>
6123 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6125 2003-06-27 Ulrich Drepper <drepper@redhat.com>
6127 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6128 (tf_msgsnd): Likewise.
6130 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6131 premature returns a bit more.
6133 2003-06-26 Ulrich Drepper <drepper@redhat.com>
6135 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6136 definition to the front.
6138 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6139 the cleanup functions to make the names unique. Fix dwarf opcode
6141 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6142 functions to make the names unique. Fix CFA offset for two blocks.
6144 2003-06-25 Ulrich Drepper <drepper@redhat.com>
6146 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6147 missing closing braces.
6148 Patch by Christophe Saout <christophe@saout.de>.
6150 2003-06-24 Roland McGrath <roland@redhat.com>
6152 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6154 2003-06-24 Ulrich Drepper <drepper@redhat.com>
6156 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6157 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6159 * pthreadP.h: Declare __find_thread_by_id.
6160 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6161 * pthread_clock_gettime.c: Allow using other thread's clock.
6162 * pthread_clock_settime.c: Likewise.
6163 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6164 * Makefile: Add rules to build and run tst-clock2.
6165 * tst-clock2.c: New file.
6167 2003-06-23 Ulrich Drepper <drepper@redhat.com>
6169 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6170 to use exception-based cleanup handler.
6171 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6173 * tst-cond8.c (ch): Announce that we are done.
6175 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6177 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6178 Also test aio_suspend with timeout value.
6180 2003-06-22 Ulrich Drepper <drepper@redhat.com>
6182 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6183 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6186 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6187 (__pthread_mutex_lock_internal): Likewise.
6188 (__pthread_mutex_unlock_internal): Likewise.
6189 (__pthread_mutex_unlock_usercnt): Declare.
6190 * pthread_mutex_destroy.c: Always fail if used in any way.
6191 * pthread_mutex_init.c: Update comment.
6192 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6193 * pthread_mutex_timedlock.c: Adjust __nusers.
6194 * pthread_mutex_trylock.c: Adjust __nusers.
6195 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6196 and public interfaces are wrapper with pass additional parameter.
6197 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6199 * tst-mutex8.c: New file.
6200 * Makefile (tests): Add tst-mutex8.
6201 * sysdeps/pthread/pthread_cond_timedwait.c: Call
6202 __pthread_mutex_unlock_usercnt.
6203 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6204 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6205 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6206 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6207 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6208 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6209 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6211 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6212 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6213 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6214 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6215 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6217 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6218 * pthread_mutex_timedlock.c: Likewise.
6219 * pthread_mutex_trylock.c: Adjust __nusers.
6220 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6221 * tst-mutex9.c: New file.
6222 * Makefile (tests): Add tst-mutex9.
6223 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6224 * sysdeps/ia64/tls.h: Likewise.
6225 * sysdeps/powerpc/tls.h: Likewise.
6226 * sysdeps/s390/tls.h: Likewise.
6227 * sysdeps/sh/tls.h: Likewise.
6228 * sysdeps/x86_64/tls.h: Likewise.
6229 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6230 Change type of __owner.
6231 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6232 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6233 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6234 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6235 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6237 2003-06-19 Jakub Jelinek <jakub@redhat.com>
6239 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6240 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6242 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6243 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
6244 instead of nr to lll_futex_wake. Only set errno and return -1
6247 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6248 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6249 return actual return value from the syscall, not 0.
6251 2003-06-18 Ulrich Drepper <drepper@redhat.com>
6253 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6254 find a random value.
6255 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
6258 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6259 compat_timer_settime.
6260 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6261 compat_timer_gettime.
6262 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6263 compat_timer_getoverrun.
6264 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6265 compat_timer_delete.
6267 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6268 error-checking mutex detect busy mutexes.
6270 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6272 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6273 Add ax to clobber list.
6274 (lll_mutex_cond_lock): Likewise.
6275 (lll_mutex_unlock): Likewise.
6276 (lll_lock): Likewise.
6277 (lll_unlock): Likewise.
6279 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6280 * tst-cancel18.c: New file.
6281 * tst-cancelx18.c: New file.
6283 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6286 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6287 * tst-cancel17.c: New file.
6288 * tst-cancelx17.c: New file.
6290 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6291 * sysdeps/unix/sysv/linux/sigwait.c: New file.
6292 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6294 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6296 2003-06-16 Jakub Jelinek <jakub@redhat.com>
6298 * sysdeps/pthread/createthread.c (create_thread): Set
6299 header.multiple_threads unconditionally.
6300 * allocatestack.c (allocate_stack): Likewise.
6301 * descr.h (struct pthread): Add header.multiple_threads
6303 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6304 Define for librt. #error if neither libpthread, libc nor librt.
6305 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6307 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6308 CDISABLE): Likewise.
6309 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6310 CDISABLE): Likewise.
6311 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6312 CDISABLE): Likewise.
6313 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6314 CDISABLE): Likewise. Access header.multiple_threads outside of
6315 libc and libpthread.
6316 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6318 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6319 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6321 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6323 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6324 Also test early cancellation before the thread reaches the cancellation
6327 * Makefile: Compile forward.c with exceptions.
6329 * sysdeps/unix/sysv/linux/sleep.c: New file.
6331 2003-06-16 Ulrich Drepper <drepper@redhat.com>
6333 * Makefile: Add CFLAGS definition to compile function wrappers
6334 duplicated from libc with exceptions.
6335 * tst-cancel4.c: Also check cancellation handlers.
6337 * Makefile: Add rules to build and run tst-cancel16 and
6338 tst-cancelx16. Add missing CFLAGS definitions.
6339 * tst-cancel16.c: New file.
6340 * tst-cancelx16.c: New file.
6342 2003-06-15 Ulrich Drepper <drepper@redhat.com>
6344 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6345 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6346 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6347 (DL_SYSINFO_IMPLEMENTATION): Likewise.
6349 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6350 (LIBC_CANCEL_RESET): Likewise.
6351 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6352 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6354 (CFLAGS-libcrt-cancellation.c): Define.
6355 * sysdeps/pthread/librt-cancellation.c: New file.
6356 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6357 macros also when compiling librt.
6358 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6359 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6360 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6361 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6362 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6363 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6364 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6366 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6367 compat_timer_create.
6369 2003-06-14 Ulrich Drepper <drepper@redhat.com>
6371 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6373 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6375 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6376 Add libc_hidden_def.
6378 2003-06-13 Roland McGrath <roland@redhat.com>
6380 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6381 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6383 2003-06-11 Ulrich Drepper <drepper@redhat.com>
6385 * allocatestack.c (queue_stack): Always inline.
6386 * ptreadhP.h (__do_cancel): Likewise.
6388 2003-06-10 Jakub Jelinek <jakub@redhat.com>
6390 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6393 2003-06-10 Ulrich Drepper <drepper@redhat.com>
6395 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6396 (__pthread_cond_signal): Remove incorrect second addition for
6399 2003-06-09 Ulrich Drepper <drepper@redhat.com>
6401 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6402 (__pthread_cond_signal): Use correct futex pointer in
6403 __lll_mutex_lock_wait call.
6405 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6406 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6408 2003-06-08 Ulrich Drepper <drepper@redhat.com>
6410 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6412 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6415 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6416 hand-written CFI generation code. Since ENTRY/END also initiated
6417 CFI frames this caused two CFI sets to be generated.
6419 2003-06-07 Ulrich Drepper <drepper@redhat.com>
6421 * cleanup_routine.c: New file.
6422 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6423 * sysdeps/pthread/pthread.h: Add support for fully exception-based
6425 * Makefile (libpthread-routines): Add cleanup_routine.
6426 Add more CFLAGS variables to compile with exceptions. Add comments
6427 why which file needs unwind tables.
6428 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6430 * tst-cancelx1.c: New file.
6431 * tst-cancelx2.c: New file.
6432 * tst-cancelx3.c: New file.
6433 * tst-cancelx4.c: New file.
6434 * tst-cancelx5.c: New file.
6435 * tst-cancelx6.c: New file.
6436 * tst-cancelx7.c: New file.
6437 * tst-cancelx8.c: New file.
6438 * tst-cancelx9.c: New file.
6439 * tst-cancelx10.c: New file.
6440 * tst-cancelx11.c: New file.
6441 * tst-cancelx12.c: New file.
6442 * tst-cancelx13.c: New file.
6443 * tst-cancelx14.c: New file.
6444 * tst-cancelx15.c: New file.
6445 * tst-cleanupx0.c: New file.
6446 * tst-cleanupx0.expect: New file.
6447 * tst-cleanupx1.c: New file.
6448 * tst-cleanupx2.c: New file.
6449 * tst-cleanupx3.c: New file.
6451 * tst-cleanup0.c: Make standard compliant.
6452 * tst-cleanup1.c: Likewise.
6454 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6455 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6456 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6457 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6458 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6459 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6460 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6462 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6463 * tst-cancel12.c: New file.
6464 * tst-cancel13.c: New file.
6465 * tst-cancel14.c: New file.
6466 * tst-cancel15.c: New file.
6467 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6470 * tst-cancel1.c: Add some comments.
6472 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6475 2003-06-06 Ulrich Drepper <drepper@redhat.com>
6477 * Makefile (CFLAGS-pthread_cancel.c): Define.
6479 2003-06-05 Ulrich Drepper <drepper@redhat.com>
6481 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6482 Change type of __writer element to int.
6483 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6484 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6485 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6486 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6487 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6488 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6489 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6490 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6491 Compare with TID to determine deadlocks.
6492 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6493 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6494 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6495 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6496 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6497 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6499 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6501 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6502 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6503 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6505 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6507 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6508 * Makefile (tests): Add tst-rwlock12.
6509 * tst-rwlock12.c: New file.
6511 2003-06-05 Jakub Jelinek <jakub@redhat.com>
6513 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6514 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6515 Remove bogus hidden_proto.
6516 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6518 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6519 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6520 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6521 ___lll_mutex_timedlock): Likewise.
6523 2003-06-04 Ulrich Drepper <drepper@redhat.com>
6525 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6526 (__pthread_cond_signal): Add some code to eventually handle
6529 2003-06-01 Ulrich Drepper <drepper@redhat.com>
6531 * Makefile (tests): Add tst-exec4.
6532 (tst-exec4-ARGS): Define.
6533 * tst-exec4.c: New file.
6535 2003-05-31 Ulrich Drepper <drepper@redhat.com>
6537 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6538 Also fail if tv_nsec < 0.
6539 (__lll_timedwait_tid): Likewise.
6540 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6541 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6543 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6545 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6547 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6549 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6551 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6554 * Makefile (tests): Add tst-sem8 and tst-sem9.
6555 * tst-sem8.c: New file.
6556 * tst-sem9.c: New file.
6557 * sem_open.c: Fix creation of in_use record if the file exists but
6560 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6563 * sysdeps/pthread/timer_create.c (timer_create): In case
6564 evp==NULL, assign timer ID to sival_ptr.
6566 * descr.h (struct pthread_unwind_buf): Change type of prev element to
6567 struct pthread_unwind_buf *.
6568 (struct pthread): Likewise for cleanup_jmp_buf element.
6570 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6571 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6572 * unwind.c (__pthread_unwind_next): Likewise.
6574 2003-05-30 Ulrich Drepper <drepper@redhat.com>
6576 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6577 (lll_futex_timed_wait): Use int for futex value parameter.
6578 (lll_futex_wake): Likewise.
6579 (lll_futex_requeue): Likewise.
6581 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6582 Replace one memory operation with one register operation.
6584 * tst-join4.c (do_test): Fix error message.
6586 * tst-rwlock6.c (do_test): Use correct format specifier.
6588 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6589 (__lll_mutex_lock_wait): Replace one memory operation with one
6591 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6592 (__lll_mutex_lock_wait): Likewise.
6594 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6595 (__lll_mutex_cond_lock): Add one to value parameter of
6596 __lll_lock_wait to reflect reality in the futex syscall.
6597 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6598 (lll_mutex_cond_lock): Likewise.
6600 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6602 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6604 (lll_mutex_cond_lock): Define.
6606 2003-05-29 Ulrich Drepper <drepper@redhat.com>
6608 * Makefile (tests): Add tst-signal6.
6609 * tst-signal6.c: New file.
6611 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6612 (__lll_mutex_unlock_force): New function
6613 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6615 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6616 (__lll_mutex_unlock_force): New function.
6617 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6619 * tst-rwlock7.c (do_test): Use correct format specifier.
6621 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6622 Find break parameter in correct asm argument.
6624 2003-05-27 Jakub Jelinek <jakub@redhat.com>
6626 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6628 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6630 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6632 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6633 lll_futex_requeue, lll_mutex_unlock_force): Define.
6635 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6637 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6638 (pthread_cond_t): Add __mutex.
6639 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6640 lll_futex_requeue, lll_mutex_unlock_force): Define.
6642 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6644 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6645 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6647 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6649 (lll_futex_wait, lll_futex_wake): Define.
6650 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6651 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6652 FUTEX_REQUEUE instead of FUTEX_WAIT.
6653 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6654 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6655 mutex which was used in condvar structure. Call
6656 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6657 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6659 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6660 include tcb-offsets.h. Read wakeup value in locked region.
6661 Use the value of gbr register as THREAD_ID.
6662 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6663 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6664 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6666 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6669 2003-05-28 Ulrich Drepper <drepper@redhat.com>
6671 * sysdeps/pthread/pthread_cond_broadcast.c
6672 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6674 2003-05-26 Ulrich Drepper <drepper@redhat.com>
6676 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6677 typo in register name.
6678 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6679 correctly. Actually use requeue. Little optimization.
6680 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6681 mutex address early. Handle cancellation state as 32-bit value.
6682 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6683 Remove unnecessary label.
6685 2003-05-25 Ulrich Drepper <drepper@redhat.com>
6687 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6688 instead of FUTEX_WAIT.
6689 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6690 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6691 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6692 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6693 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6694 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6695 used in condvar structure. Call __pthread_mutex_cond_lock instead
6696 of __pthread_mutex_lock_internal.
6697 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6698 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6699 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6700 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6701 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6702 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6703 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6704 Add pthread_mutex_cond_lock.
6705 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6706 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6707 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6708 lll_mutex_cond_lock.
6709 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6710 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6711 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6713 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6714 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6716 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6717 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6719 * pthreadP.h: Declare __pthread_mutex_cond_lock.
6720 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6721 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
6722 macro don't define aliases.
6724 * cancellation.c: Remove __pthread_enable_asynccancel_2.
6725 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6726 * sysdeps/pthread/pthread_cond_timedwait.c: Use
6727 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6728 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6729 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6730 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6731 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6732 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6734 2003-05-17 Ulrich Drepper <drepper@redhat.com>
6736 * sem_open.c: Fix one endless loop. Implement correct semantics
6737 wrt opening the same semaphore more then once.
6738 * sem_close.c: Adjust for sem_open change.
6739 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
6740 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6741 * Makefile (tests): Add tst-sem7.
6742 * tst-sem7.c: New file.
6744 2003-05-16 Roland McGrath <roland@redhat.com>
6746 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6747 uninitialized variable braino.
6749 2003-05-16 Ulrich Drepper <drepper@redhat.com>
6751 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6752 test for syscall availability.
6754 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6755 __no_posix_timers to -1 if the syscalls don't exist.
6757 * pthread_join.c (pthread_join): Set tid field of the joined
6758 thread to -1. This isn't necessary but helps to recognize some
6759 error conditions with almost no cost.
6761 * allocatestack.c (FREE_P): Also negative values indicate an
6764 * unwind.c: Include <unistd.h>.
6766 2003-05-14 Ulrich Drepper <drepper@redhat.com>
6768 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6770 2003-05-14 Jakub Jelinek <jakub@redhat.com>
6772 * Makefile (crti-objs, crtn-objs): New variables.
6773 (omit-deps, extra-objs): Add crtn.
6774 ($(objpfx)libpthread.so): Depend on both crti and crtn
6775 and links to them in multidir.
6776 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6778 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
6780 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6781 (lll_mutex_unlock): Use atomic_exchange_rel.
6783 2003-05-11 Ulrich Drepper <drepper@redhat.com>
6785 * cond-perf.c (cons): Add missing locking around setting of alldone.
6787 2003-05-10 Ulrich Drepper <drepper@redhat.com>
6789 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6791 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6793 2003-05-09 Ulrich Drepper <drepper@redhat.com>
6795 * tst-sem6.c: New file.
6796 * Makefile (tests): Add tst-sem6.
6798 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6799 Use atomic_exchange_rel instead of atomic_exchange.
6800 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6803 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6804 code for lll_futex_wait and lll_futex_wake in static apps. Use
6805 vsyscall is possible.
6807 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6808 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6809 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6810 pthread_setaffinity_np.
6811 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6812 and pthread_setaffinity_np.
6813 * Makefile (libpthread-routines): Add pthread_getaffinity and
6814 pthread_setaffinity.
6816 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6817 use it in case mmap to allocate the stack fails.
6818 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6819 ARCH_MAP_FLAGS here.
6820 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6823 2003-05-08 Ulrich Drepper <drepper@redhat.com>
6825 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6826 handler implementation. It is now lockless in fork().
6827 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6828 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6829 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
6830 declare the __fork_*_lists.
6831 (struct fork_handler): Include pointers to all three functions.
6832 Add next, refcntr and need_signal elements.
6833 (__fork_handlers): New declaration.
6834 (__register_atfork_malloc): Remove declaration.
6835 (HAVE_register_atfork_malloc): Remove definition.
6836 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6837 __pthread_child_handler variable.
6838 (__libc_pthread_init): Use __register_atfork instead of explicitly
6840 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6842 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6844 * unwind.c (unwind_cleanup): Print error message and then abort. This
6845 function must never be reached.
6847 * cond-perf.c: New file.
6849 2003-05-05 Ulrich Drepper <drepper@redhat.com>
6851 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6853 2003-05-04 Roland McGrath <roland@redhat.com>
6855 * Makefile ($(objpfx)../libc.so): New target.
6857 2003-05-02 Ulrich Drepper <drepper@redhat.com>
6859 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6860 (pthread_condattr_t): Size is only an int, don't use long for
6862 (pthread_mutexattr_t): Likewise.
6863 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6864 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6865 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6867 2003-05-01 Ulrich Drepper <drepper@redhat.com>
6869 * sysdeps/i386/tls.h: Define THREAD_ID.
6870 * sysdeps/ia64/tls.h: Likewise.
6871 * sysdeps/powerpc/tls.h: Likewise.
6872 * sysdeps/s390/tls.h: Likewise.
6873 * sysdeps/sh/tls.h: Likewise.
6874 * sysdeps/x86_64/tls.h: Likewise.
6875 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6877 * pthread_mutex_timedlock.c: Likewise.
6878 * pthread_mutex_trylock.c: Likewise.
6879 * pthread_mutex_unlock.c: Likewise.
6880 * pthread_rwlock_trywrlock.c: Likewise.
6881 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6882 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6883 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6884 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6886 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6889 2003-04-29 Jakub Jelinek <jakub@redhat.com>
6891 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6892 (__SIZEOF_PTHREAD_COND_T): Define to 48.
6893 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6894 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6895 Make __align long long instead of long.
6896 (pthread_rwlock_t): Formatting.
6897 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6898 (pthread_rwlock_t): Formatting.
6899 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6900 (pthread_cond_t): Make __align long long instead of long.
6901 (pthread_rwlock_t): Move __flags field to the same position as in
6904 2003-04-30 Ulrich Drepper <drepper@redhat.com>
6906 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6907 * tst-rwlock7.c (do_test): Likewise.
6909 2003-04-26 Roland McGrath <roland@redhat.com>
6911 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6913 2003-04-22 Jakub Jelinek <jakub@redhat.com>
6915 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6916 sizeof (struct pthread).
6917 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
6919 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6921 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
6923 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
6925 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
6927 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
6929 (NO_TLS_OFFSET): Define.
6930 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
6931 add TLS_TCB_SIZE unnecessarily.
6933 2003-04-22 Roland McGrath <roland@redhat.com>
6935 * Makeconfig (shared-thread-library): Reverse link order to work
6938 2003-04-22 Ulrich Drepper <drepper@redhat.com>
6940 * semaphore.h: Fix typo in comment.
6942 2003-04-21 Ulrich Drepper <drepper@redhat.com>
6944 * sysdeps/pthread/sigfillset.c: New file.
6946 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
6947 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
6948 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
6949 * sysdeps/pthread/sigaction.c: Likewise.
6950 * sysdeps/pthread/sigprocmask.c: New file.
6951 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
6953 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6954 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
6957 2003-04-19 Ulrich Drepper <drepper@redhat.com>
6959 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6960 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
6962 * sysdeps/unix/sysv/linux/unregister-atfork.c
6963 (__unregister_atfork): Don't free memory not allocated dynamically.
6965 * semaphore.h: Remove __THROW marker from cancellation points.
6966 * nptl/sysdeps/pthread/pthread.h: Likewise.
6968 2003-04-18 Ulrich Drepper <drepper@redhat.com>
6970 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
6971 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
6974 2003-04-16 Jakub Jelinek <jakub@redhat.com>
6976 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
6978 2003-04-15 Roland McGrath <roland@redhat.com>
6980 * forward.c (__pthread_unwind): Tweak to avoid warning.
6982 2003-04-15 Ulrich Drepper <drepper@redhat.com>
6984 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
6986 2003-04-14 Ulrich Drepper <drepper@redhat.com>
6988 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
6989 overflow CFA advance instructions.
6990 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6992 2003-04-14 Jakub Jelinek <jakub@redhat.com>
6994 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
6995 * sysdeps/i386/pthread_spin_lock.c: Likewise.
6996 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
6999 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7000 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7001 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7002 DW_CFA_advance_loc for .Laddl-.Lsubl.
7004 2003-04-13 Ulrich Drepper <drepper@redhat.com>
7006 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7007 position-independent unwind data for static libraries.
7008 Add missing unwind info. Add comments.
7010 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7011 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7012 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7013 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7015 2003-04-12 Ulrich Drepper <drepper@redhat.com>
7017 * Makefile: Make sure all cancellation points are compiled with
7018 exception and asynchronous unwind tables.
7020 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7021 which mishandles loading of global object addresses in PIC.
7022 (THREAD_SETMEM_NC): Likewise.
7024 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7026 * pthread.h: Define new data structure for cleanup buffer. Declare
7027 new cleanup handler interfaces.
7028 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
7029 (struct pthread): Add cleanup_jmp_buf pointer. Define
7030 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7031 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
7032 it. Declare old cleanup handler installation functions.
7033 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
7035 * cleanup_defer.c: Likewise.
7036 * cleanup_compat.c: New file. Old cleanup code.
7037 * cleanup_def_compat.c: New file. Old cleanup code.
7038 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7039 if own thread descriptor.
7040 * unwind.c: New file.
7041 * forward.c: Add __pthread_unwind.
7042 * init.c (pthread_functions): Add __pthread_unwind.
7043 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7044 Add ptr___pthread_unwind.
7045 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7046 and unwind function.
7047 * Makefile (libpthread-routines): Add cleanup_compat,
7048 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
7049 table generation if necessary.
7050 * version.c: Record whether unwind support is compiled in.
7051 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7052 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7054 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7055 complication to generate unwind information for syscall wrappers.
7056 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7057 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7058 __cleanup_fct_attribute.
7060 * Makefile: Add rules to build and run tst-cleanup0.
7061 * tst-cleanup0.c: New file.
7062 * tst-cleanup0.expect: New file.
7064 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
7065 caller. Optimize to avoid often unecessary local variable.
7067 2003-04-11 Roland McGrath <roland@redhat.com>
7069 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7070 sets variable `multidir'; include that.
7071 (generated): Add it.
7072 ($(objpfx)$(multidir)/crti.o): New target.
7073 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7075 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7077 * tst-attr2.c (do_test): Add cast to avoid warning.
7078 * tst-mutex4.c (do_test): Likewise.
7080 2003-04-10 Ulrich Drepper <drepper@redhat.com>
7082 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7085 2003-04-09 Ulrich Drepper <drepper@redhat.com>
7087 * Makefile (tests): Add tst-detach1.
7088 * tst-detach1.c: New file.
7090 2003-04-08 Ulrich Drepper <drepper@redhat.com>
7092 * sysdeps/pthread/pthread.h: Remove duplicate
7093 pthread_cleanup_{push,pop} definitions.
7095 * tst-barrier2.c: Eliminate warnings.
7096 * tst-cancel4.c: Likewise.
7097 * tst-cond4.c: Likewise.
7098 * tst-cond6.c: Likewise.
7099 * tst-detach1.c: Likewise.
7100 * tst-rwlock4.c: Likewise.
7101 * tst-rwlock6.c: Likewise.
7102 * tst-rwlock7.c: Likewise.
7103 * tst-sem3.c: Likewise.
7104 * tst-spin2.c: Likewise.
7105 * tst-umask1.c: Likewise.
7107 2003-04-07 Ulrich Drepper <drepper@redhat.com>
7109 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7111 2003-04-06 Ulrich Drepper <drepper@redhat.com>
7113 * descr.h (struct pthread): Move cancelhandling member to the front.
7115 2003-04-05 Ulrich Drepper <drepper@redhat.com>
7117 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7118 malloc_parent, and malloc_child statically.
7119 (__register_atfork_malloc): New function.
7120 (free_mem): Don't free any of the malloc_* variables on the list.
7121 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7122 Define HAVE_register_atfork_malloc.
7124 2003-04-04 Ulrich Drepper <drepper@redhat.com>
7126 * sysdeps/pthread/createthread.c (create_thread): Add some more
7127 comments explaining when to set multiple_threads and when not.
7129 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7130 THREAD_ATOMIC_BIT_SET if not already defined.
7131 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7132 THREAD_ATOMIC_BIT_SET:
7133 * sysdeps/x86_64/tls.h: Likewise.
7134 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7135 THREAD_ATOMIC_CMPXCHG_VAL.
7136 (_pthread_cleanup_pop_restore): Likewise.
7137 * cancellation.c (__pthread_enable_asynccancel): Likewise.
7138 (__pthread_enable_asynccancel_2): Likewise.
7139 (__pthread_disable_asynccancel): Likewise.
7140 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7141 (__libc_disable_asynccancel): Likewise.
7142 * init.c (sigcancel_handler): Likewise.
7143 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7144 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7146 2003-04-03 Ulrich Drepper <drepper@redhat.com>
7148 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7149 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7150 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7151 * Makefile (tests): Add tst-cancel11.
7152 * tst-cancel11.c: New file.
7154 2003-04-01 Ulrich Drepper <drepper@redhat.com>
7156 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7157 round, not the first. Use specific_used flag instead of local
7158 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
7159 (__free_tcb): Don't call deallocate_tsd here.
7160 (start_thread): Call deallocate_tsd here.
7161 * pthread_setspecific.c: Set specific_used flag really only when
7163 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7164 * tst-tsd3.c: New file.
7165 * tst-tsd4.c: New file.
7167 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7169 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7170 Use atomic_exchange_and_add instead of __lll_add.
7171 (__lll_mutex_timedlock): Likewise.
7172 Patch by Ian Wienand.
7174 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
7176 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7177 (SINGLE_THREAD_P): Fix typo.
7178 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7180 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7182 * Makefile (tests): Add tst-align.
7183 * tst-align.c: New file.
7184 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7186 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7189 * tst-tsd2.c: Add casts to avoid warnings.
7191 2003-03-30 Ulrich Drepper <drepper@redhat.com>
7193 * descr.h (struct pthread): Move most often used elements to the front.
7195 2003-03-29 Ulrich Drepper <drepper@redhat.com>
7197 * Makefile (libpthread-routines): Add pthread_atfork.
7198 (libpthread-static-only-routines): Add pthread_atfork.
7200 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7202 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7204 (INSTALL_DTV): Add parens.
7205 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7206 Use passed descr instead of THREAD_SELF.
7207 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7208 (__lll_mutex_timedlock_wait): Correct expected value after
7210 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7211 Release lock before waking up the waiters.
7212 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7213 criteria. Reorderstruct passed to cleanup handler. Fix
7214 handling of cancellation and failung pthread_mutex_unlock call.
7215 Use __pthread_enable_asynccancel_2 instead of
7216 __pthread_enable_asynccancel.
7217 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7218 Return result of lock re-get if it fails.
7219 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7220 for __pthread_cleanup_push.
7221 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7222 completely broken rwlock implementation.
7223 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7224 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7225 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7226 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7227 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7228 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
7229 versioned_symbol macro.
7230 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7231 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7233 2003-03-27 Ulrich Drepper <drepper@redhat.com>
7235 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7236 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
7238 (struct timer): Remove th and bar field.
7239 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7240 debugging code. Create only one helper thread.
7241 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7243 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7244 Renamed. Define statically. Use thread info from siginfo.
7245 (__helper_once): New variable.
7246 (__helper_tid): New variable.
7247 (__reset_helper_control): New function.
7248 (__start_helper_thread): New function.
7250 * pthread_create.c (start_thread): Don't use setjmp inside
7251 __builtin_expect to work around gcc bug.
7253 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7254 timer_delete syscall fails, but not with ENOSYS, set
7257 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7258 (timer_settime): Fix typo.
7259 * sysdeps/unix/sysv/linux/timer_getoverr.c
7260 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7262 2003-03-27 Jakub Jelinek <jakub@redhat.com>
7264 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7265 offset of cleanupbuf.__prev.
7267 2003-03-26 Jakub Jelinek <jakub@redhat.com>
7269 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7272 2003-03-26 Ulrich Drepper <drepper@redhat.com>
7274 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7275 NULL provide default definition to syscall.
7277 2003-03-25 Roland McGrath <roland@redhat.com>
7279 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7280 (timer_id2ptr): Fix typo.
7282 2003-03-25 Ulrich Drepper <drepper@redhat.com>
7284 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7285 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7286 * sysdeps/ia64/pthreaddef.h: Likewise.
7287 * sysdeps/powerpc/pthreaddef.h: Likewise.
7288 * sysdeps/s390/pthreaddef.h: Likewise.
7289 * sysdeps/sh/pthreaddef.h: Likewise.
7290 * sysdeps/x86_64/pthreaddef.h: Likewise.
7291 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7292 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7294 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7295 SIGTIMER is not unblocked.
7296 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7298 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7300 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7301 pass pointer through as ID.
7302 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7303 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7304 * sysdeps/unix/sysv/linux/timer_create.c: New file.
7305 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7306 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7307 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7308 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7309 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7310 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7311 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7312 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7313 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7314 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7315 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7316 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7317 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7318 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7319 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7320 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7321 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7322 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7323 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7324 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7325 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7326 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7327 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7328 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7329 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7330 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7331 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7332 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7333 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7334 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7336 * pthreadP.h: Remove FRAME_LEFT definition.
7337 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7338 already left frame. Programs which have this problem are not POSIX
7340 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7342 2003-03-24 Ulrich Drepper <drepper@redhat.com>
7344 * sysdeps/pthread/tst-timer.c: Check return values of the
7347 2003-03-23 Roland McGrath <roland@redhat.com>
7349 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7350 * tst-tls3mod.c: Likewise.
7351 * tst-tls1.c: Likewise.
7352 * tst-tls2.c: Likewise.
7354 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7357 * tst-join5.c (tf1, tf2): Add a cast.
7359 * Makeconfig (includes): Append -I$(..)nptl to this variable.
7361 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7362 Don't test anything.
7363 * tst-cond4.c: Likewise.
7364 * tst-cond6.c: Likewise.
7365 * tst-flock2.c: Likewise.
7366 * tst-mutex4.c: Likewise.
7367 * tst-rwlock4.c: Likewise.
7368 * tst-signal1.c: Likewise.
7369 * tst-spin2.c: Likewise.
7370 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7372 * tst-mutex4.c: Use test-skeleton.c.
7373 * tst-spin2.c: Likewise.
7374 * tst-sysconf.c: Likewise.
7375 * tst-barrier2.c: Likewise.
7376 * tst-cond4.c: Likewise.
7377 * tst-cond6.c: Likewise.
7378 * tst-rwlock4.c: Likewise.
7379 * tst-unload.c: Likewise.
7380 * tst-flock2.c (do_test): Use return instead of exit.
7382 2003-03-22 Jakub Jelinek <jakub@redhat.com>
7384 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7386 2003-03-21 Ulrich Drepper <drepper@redhat.com>
7388 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7389 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7390 instead of __lll_compare_and_swap.
7391 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7393 Removed definition if __lll_compare_and_swap.
7395 * cancellation.c: Adjust for new form of compare&exchange macros.
7396 * cleanup_defer.c: Likewise.
7398 * libc-cancellation.c: Likewise.
7399 * old_pthread_cond_broadcast.c: Likewise.
7400 * old_pthread_cond_signal.c: Likewise.
7401 * old_pthread_cond_timedwait.c: Likewise.
7402 * old_pthread_cond_wait.c: Likewise.
7403 * pthread_cancel.c: Likewise.
7404 * pthread_create.c: Likewise.
7405 * pthread_detach.c: Likewise.
7406 * pthread_join.c: Likewise.
7407 * pthread_key_delete.c: Likewise.
7408 * pthread_setcancelstate.c: Likewise.
7409 * pthread_setcanceltype.c: Likewise.
7410 * pthread_timedjoin.c: Likewise.
7411 * pthread_tryjoin.c: Likewise.
7412 * sysdeps/pthread/createthread.c: Likewise.
7414 2003-03-20 Ulrich Drepper <drepper@redhat.com>
7416 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7417 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7418 definitions. Replace uses with calls to atomic_* functions.
7419 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7420 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7421 __lll_test_and_set calls with atomic_exchange_and_add and
7422 atomic_exchange calls respectively.
7423 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7424 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7425 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7426 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7427 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7428 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7429 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7431 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7432 returns the old value.
7434 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
7436 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7437 int for variable OLDVAL and correct inline assembler contraint.
7438 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7439 type int for variable OLD.
7441 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7443 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7444 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7445 instead of multiple_threads field in the TCB.
7447 2003-03-19 Ulrich Drepper <drepper@redhat.com>
7449 * sysdeps/i386/i686/bits/atomic.h: Removed.
7450 * sysdeps/i386/i586/bits/atomic.h: Removed.
7451 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
7452 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
7453 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
7454 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
7455 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
7456 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
7457 * atomic.h: Removed. Moved to glibc.
7459 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7460 support for clock selection.
7462 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7465 2003-03-18 Roland McGrath <roland@redhat.com>
7467 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7468 Add __lll_rel_instr first. Add memory clobber.
7469 (lll_mutex_unlock): Use __lll_test_and_set.
7470 From Paul Mackerras <paulus@samba.org>.
7472 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7474 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7475 (SINGLE_THREAD_P): Add `header.' prefix.
7476 From Paul Mackerras <paulus@samba.org>.
7478 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7479 pthread_timedjoin_np to ...
7480 (libpthread: GLIBC_2.3.3): ... here.
7481 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7483 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7484 Avoid shadowing VAL variable.
7486 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7489 2003-03-18 Ulrich Drepper <drepper@redhat.com>
7491 * Makefile (tests): Add tst-cond11.
7492 * tst-cond11.c: New file.
7494 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7495 struct passed to cleanup handler to eliminate one more
7497 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7499 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7500 (pthrad_cond_t): Replace __unused field with __clock.
7502 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7503 waken all waiters in cleanup handler.
7504 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7505 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7507 * pthread_condattr_getclock.c: New file.
7508 * pthread_condattr_setclock.c: New file.
7509 * sysdeps/pthread/pthread.h: Declare these new functions.
7510 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7511 * Makefile (libpthread-routines): Add the new functions.
7512 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7513 Renamed field to value. Document use of the bits.
7514 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7516 * pthread_condattr_setpshared.c: Likewise.
7517 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7518 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7519 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7521 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7522 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7523 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7524 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7525 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7526 Implement clock selection.
7527 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7528 * pthread-errnos.sym: Add ENOSYS.
7529 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7530 _POSIX_CLOCK_SELECTION.
7531 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7533 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7534 invalid .size directive.
7536 2003-03-17 Roland McGrath <roland@redhat.com>
7538 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7541 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7543 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7544 Use __lll_add instead of spelling it out. Use protected symbol names.
7545 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7547 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7548 Renamed from lll_compare_and_swap. Use new name where necessary.
7549 (__lll_add): Defined.
7550 (__lll_dec_if_positive): Defined.
7551 (__lll_test_and_set): Defined.
7552 * sysdeps/ia64/pthread_spin_init.c: Removed.
7553 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7554 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7555 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7556 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7557 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7558 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7559 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7560 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7561 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7562 __sync_lock_release_si.
7563 Patch by Jakub Jelinek.
7565 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7566 Fix timeout handling.
7567 (__lll_timedwait_tid): Likewise.
7568 (lll_unlock_wake_cb): Wake up other waiters if necessary.
7569 Patch by Jakub Jelinek.
7571 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7573 2003-03-17 Roland McGrath <roland@redhat.com>
7575 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7576 * sysdeps/pthread/pthread_spin_init.c: New file.
7577 * sysdeps/pthread/pthread_spin_unlock.c: New file.
7578 * sysdeps/powerpc/Makefile: New file.
7579 * sysdeps/powerpc/pthread_spin_lock.c: New file.
7580 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7581 * sysdeps/powerpc/pthreaddef.h: New file.
7582 * sysdeps/powerpc/tcb-offsets.sym: New file.
7583 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7584 * sysdeps/powerpc/tls.h: New file.
7585 * sysdeps/powerpc/bits/atomic.h: New file.
7586 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7587 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7588 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7590 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7591 * sysdeps/unix/sysv/linux/sem_post.c: New file.
7592 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7593 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7594 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7595 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7596 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7597 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7598 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7599 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7600 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7601 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7602 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7603 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7604 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7606 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7608 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7609 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7610 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7611 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7612 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7614 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7616 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7617 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7618 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7619 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7620 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7622 2003-03-16 Roland McGrath <roland@redhat.com>
7624 * tst-fork4.c: Include <string.h>.
7625 * tst-signal2.c: Likewise.
7626 * tst-mutex5.c (do_test): exit -> return.
7627 * tst-mutex2.c: Include <stdlib.h>.
7629 2003-03-16 Ulrich Drepper <drepper@redhat.com>
7631 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7632 (__lll_mutex_timedlock_wait): Correct expected value after
7633 spurious wakeup. Otherwise we would never wait again.
7635 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7636 zone versus inline asm stupidity. Use correct instructions.
7638 * tst-rwlock6.c: Add some more status output.
7640 2003-03-15 Roland McGrath <roland@redhat.com>
7642 * sysdeps/pthread/configure.in: New file.
7643 * sysdeps/pthread/configure: New file (generated).
7645 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7647 * allocatestack.c (allocate_stack): Store the exact stack size of
7648 user allocated stacks.
7650 2003-03-15 Jakub Jelinek <jakub@redhat.com>
7652 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7653 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7654 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7655 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7656 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7657 Use `header.' prefix.
7658 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7660 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7662 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7663 __builtin_frame_address, use stack pointer.
7665 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7666 instead of __builtin_frame_pointer.
7668 2003-03-14 Ulrich Drepper <drepper@redhat.com>
7670 * tst-basic1.c (do_test): Add cast to avoid warning.
7671 * tst-basic2.c (do_test): Likewise.
7673 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7674 amount of stack correction.
7676 * tst-fork4.c: Use test-skeleton.c.
7678 2003-03-14 Roland McGrath <roland@redhat.com>
7680 * init.c: Fix typo "#eli" for "#else".
7682 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
7684 * allocatestack.c (__stack_user): Use hidden_data_def.
7685 * pthread_create.c (__pthread_keys): Likewise.
7687 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7689 2003-03-14 Roland McGrath <roland@redhat.com>
7691 * tst-fork4.c: New file.
7692 * Makefile (tests): Add it.
7694 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7695 we always define the padding space.
7696 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7697 stopped supporting its own extensions fully.
7698 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7699 struct also called `header', so `header.multiple_threads' is the field
7700 name to use on all machines.
7701 * allocatestack.c (allocate_stack): Use `header.' prefix.
7702 * sysdeps/pthread/createthread.c (create_thread): Likewise.
7703 * pthread_create.c (__pthread_create_2_1): Likewise.
7704 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7705 (THREAD_SELF): Likewise.
7706 * sysdeps/x86_64/tls.h: Likewise.
7707 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7708 (SINGLE_THREAD_P): Likewise.
7709 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7710 (SINGLE_THREAD_P): Likewise.
7711 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7712 (SINGLE_THREAD_P): Likewise.
7714 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7717 2003-03-14 Ulrich Drepper <drepper@redhat.com>
7719 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7720 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7722 * pthread_create.c (start_thread): setjmp is expected to return 0.
7724 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7725 (THREAD_GETMEM_NC): Likewise.
7727 2003-03-13 Ulrich Drepper <drepper@redhat.com>
7729 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7730 and the size of the stack which must be allocated is a multiple,
7731 allocate one more page.
7732 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7733 MULTI_PAGE_ALIASING.
7735 2003-03-13 Roland McGrath <roland@redhat.com>
7737 * pthread_create.c (start_thread): Set EXITING_BIT after the
7738 event-reporting (and destructors), not before.
7740 2003-03-13 Jakub Jelinek <jakub@redhat.com>
7742 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7743 lll_futex_wake): Declare register variables as long int instead of
7744 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7745 Make syscall arguments clobbered by the syscall.
7746 (lll_futex_wait): Define using lll_futex_timed_wait.
7748 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7751 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7754 * allocatestack.c (nptl_ncreated): Only declare if
7755 COLORING_INCREMENT != 0.
7757 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7758 (__libc_enable_asynccancel_2): Remove prototype.
7760 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7761 ctid to match kernel.
7763 2003-03-12 Ulrich Drepper <drepper@redhat.com>
7765 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7766 libc_multiple_threads.
7767 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7768 __libc_multiple_threads to...
7769 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
7771 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7773 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7774 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7776 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7777 (__pthread_once_internal): Define.
7779 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7780 macros instead of .symver directly.
7781 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7782 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7784 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7785 * sysdeps/x86_64/tcb-offsets.sym: New file.
7786 * sysdeps/x86_64/Makefile: New file.
7788 * sysdeps/i386/tcb-offsets.sym: Add SELF.
7789 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7790 to access own pthread_t in TCB.
7791 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7793 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7795 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7797 2003-03-12 Roland McGrath <roland@redhat.com>
7799 * pthread-errnos.sym: New file.
7800 * Makefile (gen-as-const-headers): New variable, list that file.
7801 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7802 header <pthread-errnos.h> instead of defining errno values here.
7803 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7804 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7805 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7806 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7807 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7809 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7811 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7812 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7813 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7814 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7815 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7816 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7817 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7818 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7819 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7820 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7821 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7822 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7823 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7824 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7825 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7826 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7827 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7828 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7829 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7830 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7831 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7832 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7833 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7834 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7835 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7836 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7837 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7839 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7840 CLONE_CHILD_SETTID worked.
7842 2003-03-12 Ulrich Drepper <drepper@redhat.com>
7844 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7846 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7849 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7850 (pthread_cond_t): Add padding.
7852 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7853 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7854 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7856 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7857 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7858 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7859 (__pthread_rwlock_timedrdlock): Likewise.
7860 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7861 (__pthread_rwlock_wrlock): Likewise.
7862 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7863 (__pthread_rwlock_rdlock): Likewise.
7865 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7867 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7868 result of lock re-get if it fails.
7870 2003-03-11 Ulrich Drepper <drepper@redhat.com>
7872 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7873 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7874 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7875 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7876 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7877 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7878 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7879 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7880 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7881 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7883 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7884 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7886 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7887 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7888 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7889 (create_thread): Likewise.
7890 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7891 * init.c (__pthread_initialize_minimal_internal): Initialize
7892 __libc_multiple_threads_ptr if necessary.
7893 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
7894 __pthread_multiple_threads and __libc_multiple_threads_ptr.
7895 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7896 __libc_multiple_threads.
7897 (__libc_pthread_init): Return pointer to __libc_pthread_init if
7900 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7901 (THREAD_SETMEM_NC): Likewise.
7903 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7904 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7905 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7906 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7908 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7909 Eliminate one entire instruction.
7911 * cancellation.c (__pthread_enable_asynccancel_2): New function.
7912 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7913 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7914 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7915 instead of __pthread_enable_asynccancel.
7916 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7917 (__pthread_cond_wait): Likewise.
7918 * sysdeps/pthread/pthread_cond_timedwait.c
7919 (__pthread_cond_timedwait): Likewise.
7920 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7922 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7923 (__condvar_cleanup): Wake up all waiters in case we got signaled
7924 after being woken up but before disabling asynchronous
7926 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7927 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7928 (__condvar_cleanup): Likewise.
7930 * init.c (__NR_set_tid_address): If already defined, don't redefine.
7931 Make it an error if architecture has no #if case. Add x86-64.
7933 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
7934 pt-initfini.s generation.
7936 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
7937 (TLS_INIT_TP): Fix typo.
7939 2003-03-11 Jakub Jelinek <jakub@redhat.com>
7941 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
7942 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
7944 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
7945 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7946 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
7947 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
7948 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
7949 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7950 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7951 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7953 2003-03-11 Ulrich Drepper <drepper@redhat.com>
7955 * sysdeps/pthread/pthread_cond_timedwait.c
7956 (__pthread_cond_timedwait): Return the result of the final
7957 locking. If it succeeds, the regular function return value.
7959 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
7960 Return result of the final locking.
7961 * version.c (__nptl_main): Work around problems with the strange
7962 INTERNAL_SYSCALL macro on ppc32.
7963 * init.c (__pthread_initialize_minimal_internal): Unblock
7964 SIGCANCEL in case the parent blocked it.
7965 Reported by Paul Mackerras <paulus@samba.org>.
7967 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
7968 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
7969 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
7971 2003-03-11 Jakub Jelinek <jakub@redhat.com>
7973 * sysdeps/pthread/pthread_cond_timedwait.c
7974 (__pthread_cond_timedwait): Unlock and fail if
7975 __pthread_mutex_unlock_internal failed.
7977 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
7978 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
7980 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
7981 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
7982 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
7983 ALLOCATE_STACK): New macros.
7984 (TLS_TPADJ): New macro.
7985 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
7986 (allocate_stack): Handle TLS_DTV_AT_TP and
7987 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
7988 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
7990 * init.c [__ia64__] (__NR_set_tid_address): Define.
7992 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
7993 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
7994 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
7995 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
7996 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
7997 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
7998 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
7999 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8000 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8001 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8002 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8003 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8004 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8005 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8006 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8007 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8008 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8009 * sysdeps/ia64/bits/atomic.h: New file.
8010 * sysdeps/ia64/Makefile: New file.
8011 * sysdeps/ia64/pthread_spin_init.c: New file.
8012 * sysdeps/ia64/pthread_spin_lock.c: New file.
8013 * sysdeps/ia64/pthread_spin_trylock.c: New file.
8014 * sysdeps/ia64/pthread_spin_unlock.c: New file.
8015 * sysdeps/ia64/pthreaddef.h: New file.
8016 * sysdeps/ia64/tcb-offsets.sym: New file.
8017 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8018 * sysdeps/ia64/tls.h: New file.
8020 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8021 to syscall instead of no arguments.
8023 2003-03-10 Ulrich Drepper <drepper@redhat.com>
8025 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8026 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8027 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8028 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8030 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8033 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8035 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8036 lowlevelbarrier.sym.
8037 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8038 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8039 Include lowlevelbarrier.h and don't define offsets locally.
8040 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8042 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8043 (__lll_mutex_lock_wait): Reverse order of first two parameters.
8044 (__lll_mutex_timedlock_wait): Likewise.
8045 (lll_mutex_lock): Adjust asm for that.
8046 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
8047 (lll_lock): Adjust asm for operand order change.
8048 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8049 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8051 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8052 Reverse order of parameters.
8053 (__lll_timedwait_tid): Remove regparms attribute.
8054 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8055 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8057 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8058 (__lll_timedwait_tid): Remove one unnecessary instruction.
8060 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8061 __lll_mutex_timedlock_wait only for NOT_IN_libc.
8062 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8065 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8066 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8068 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8071 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8072 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
8074 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8075 define LOCK here (if UP is not defined). The actual code is in
8078 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8079 LOCK is already defined. Don't define lll_unlock_wake_cb and
8080 __lll_timedwait_tid for libc.so.
8081 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8082 define LOCK here (if UP is not defined). The actual code is in
8085 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8086 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8087 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8088 instead of lowlevelsem.h.
8089 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8090 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8091 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8093 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8095 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8096 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8097 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8099 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8101 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8104 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8106 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8107 of __libc_locking_needed.
8108 (lll_trylock): Initialize %eax to zero.
8110 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8111 pthread_cond_t definition.
8113 2003-03-10 Roland McGrath <roland@redhat.com>
8115 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8116 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8117 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8118 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8119 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8121 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8122 Instead of setting PD->multiple_threads, set globals
8123 __pthread_multiple_threads and __libc_multiple_threads.
8124 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8125 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8126 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8128 * descr.h (struct pthread): Conditionalize first member on
8129 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
8130 containing an anonymous tcbhead_t. Move `list' member out.
8131 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8132 * allocatestack.c: Remove use of `header.data.' prefix.
8133 * pthread_create.c: Likewise.
8134 * init.c (__pthread_initialize_minimal_internal): Likewise.
8135 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8136 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8137 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8138 * sysdeps/x86_64/tls.h: Likewise.
8139 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8140 (SINGLE_THREAD_P): Likewise.
8141 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8142 (SINGLE_THREAD_P): Likewise.
8143 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8144 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8146 2003-03-09 Ulrich Drepper <drepper@redhat.com>
8148 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8150 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8151 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8153 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8154 leftovers from the ia32 code.
8156 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8158 (clear_once_control): Don't load %esi.
8160 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8163 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8165 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8166 * sysdeps/unix/sysv/linux/createthread.c: ...here.
8168 * Makefile (tests): Add tst-cond10.
8169 * tst-cond10.c: New file.
8171 2003-03-08 Ulrich Drepper <drepper@redhat.com>
8173 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8174 * tst-signal3.c (do_test): Likewise.
8175 * tst-sem5.c (do_test): Likewise.
8176 * tst-kill6.c (do_test): Likewise.
8177 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
8179 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8181 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8182 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8183 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8184 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8185 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8186 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8187 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8189 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8191 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8192 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8193 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8194 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8195 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8196 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8197 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8198 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8200 * allocatestack.c (allocate_stack): If mprotect() fails free the
8203 2003-03-07 Ulrich Drepper <drepper@redhat.com>
8205 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8207 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8208 lll_wake_tid. This was used only to work around kernel limits in
8210 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8211 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8212 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8213 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8215 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8216 (__pthread_initialize_minimal_internal): Change initialization of
8217 __static_tls_align_m1 appropriately.
8218 * pthreadP.h (__static_tls_align_m1): Renamed from
8220 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8221 instead of __static_tls_align-1.
8223 2003-03-04 Ulrich Drepper <drepper@redhat.com>
8225 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8227 * pthread_create.c: Define __pthread_keys using nocommon
8228 attribute, not by placing it explicitly in bss.
8229 Remove DEFINE_DEALLOC definition. Not needed anymore.
8231 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8232 Use it in mmap call to allocate stacks.
8234 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8236 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8237 result of the thread function.
8239 2003-03-03 Ulrich Drepper <drepper@redhat.com>
8241 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
8242 version is just fine.
8244 * sysdeps/unix/sysv/linux/libc_pthread_init.c
8245 (__pthread_child_handler): Renamed from pthread_child_handler,
8246 exported, and marked hidden. Change all users.
8247 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8248 free __pthread_child_handler from child list.
8250 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
8252 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8254 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8255 Fix handling of cancellation and failing pthread_mutex_unlock call.
8256 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8257 (__pthread_cond_wait): Likewise.
8259 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8260 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8261 lll_futex_timed_wait call.
8262 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8263 (pthread_rwlock_timedwrlock): Likewise.
8265 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8266 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8267 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8269 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8270 check of lll_futex_wake return value.
8272 2003-03-03 Roland McGrath <roland@redhat.com>
8274 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8276 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8277 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8278 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8280 2003-03-02 Ulrich Drepper <drepper@redhat.com>
8282 * sysdeps/pthread/timer_create.c (timer_create): Return correct
8283 error for CPU clocks.
8285 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8286 _POSIX_MONOTONIC_CLOCK.
8287 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8289 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8292 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8294 * descr.h (struct pthread): Move cleanup field to the front.
8296 2003-03-01 Roland McGrath <roland@redhat.com>
8298 * sem_open.c (sem_open): Braino fix.
8300 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8302 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8303 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8304 __pthread_cleanup_pop functionality.
8305 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8307 * descr.h (struct pthread): Move tid field to the front now that
8310 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8311 (__lll_mutex_timedlock_wait): Remove.
8312 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8313 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8314 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8315 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8316 (lll_unlock_wake_cb): Don't save and restore %esi.
8317 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8319 (__lll_timedwait_tid): Add alignment.
8320 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8321 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8323 (__lll_timedwait_tid): Removed.
8324 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8325 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8326 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8327 (pthread_barrier_wait): Don't save, load, and restore %esi for
8329 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8330 (__pthread_cond_signal): Don't save, load, and restore %esi.
8331 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8332 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8333 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8334 Don't save, load, and restore %esi.
8336 2003-02-27 Ulrich Drepper <drepper@redhat.com>
8338 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8339 Release lock before waking up the waiters.
8341 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8343 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8344 (reader_thread): Likewise.
8346 * sysdeps/pthread/pthread_rwlock_unlock.c
8347 (__pthread_rwlock_unlock): Release internal lock early. Don't try
8348 to wake up readers if there are none.
8350 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8351 Release internal lock before wake threads.
8353 2003-02-26 Ulrich Drepper <drepper@redhat.com>
8355 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8356 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
8358 * tst-rwlock9.c: Likewise.
8359 * tst-rwlock10.c: New file.
8360 * tst-rwlock11.c: New file.
8362 * Makefile (tests): Add tst-dlsym1.
8363 * tst-dlsym1.c: New file.
8365 * init.c (__pthread_initialize_minimal_internal): Set
8366 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8367 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8369 2003-02-24 Ulrich Drepper <drepper@redhat.com>
8371 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8373 * tst-cond2.c: Fix sychronization with child.
8375 * tst-rwlock8.c (reader_thread): Remove unused variable.
8377 * Makefile: Add rules to build and run tst-tls3.
8378 * tst-tls3.c: New file.
8379 * tst-tls3mod.c: New file.
8381 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8382 * tst-rwlock8.c: New file.
8383 * tst-rwlock9.c: New file.
8384 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8385 complete broken rwlock implementation.
8386 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8388 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8390 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8391 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8392 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8393 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8394 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8395 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8396 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8398 2003-02-23 Roland McGrath <roland@redhat.com>
8400 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8402 2003-02-23 Ulrich Drepper <drepper@redhat.com>
8404 * Makefile (tests): Add tst-context1.
8405 * tst-context1.c: New file.
8407 * Makefile (tests): Add tst-tls1 and tst-tls2.
8408 * tst-tls1.c: New file.
8409 * tst-tls2.c: New file.
8411 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8414 * pthread_create.c (start_thread): Set EXITING_BIT early.
8416 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8417 (THREAD_GETMEM_NC): Likewise.
8419 2003-02-22 Ulrich Drepper <drepper@redhat.com>
8421 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8422 off 3 more bytes by using offset-less instructions when possible.
8424 * Makefile: Add dependency for $(objpfx)version.d.
8426 * eintr.c (eintr_source): Add unnecessary return but the compiler
8429 * tst-kill3.c: Include <unistd.h>.
8431 2003-02-21 Roland McGrath <roland@redhat.com>
8433 * pthread_create.c (start_thread): Call __libc_thread_freeres.
8435 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8437 * Makefile (tests): Add tst-eintr1.
8438 (distribute): Add eintr.c.
8439 * tst-eintr1.c: New file.
8440 * eintr.c: New file.
8442 * pthread_cancel.c (pthread_cancel): Use tkill directly.
8444 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8445 Disallow sending SIGCANCEL.
8447 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
8448 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8449 * tst-kill1.c: New file.
8450 * tst-kill2.c: New file.
8451 * tst-kill3.c: New file.
8452 * tst-kill5.c: New file.
8453 * tst-kill6.c: New file.
8454 * tst-basic7.c: Renamed to...
8455 * tst-kill4.c: ...this.
8457 2003-02-21 Roland McGrath <roland@redhat.com>
8459 * Makefile (install-lib-ldscripts): New variable.
8461 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8463 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8464 * pthread_cancel.c: Use INVALID_TD_P.
8465 * pthread_detach.c: Likewise.
8466 * pthread_getschedparam.c: Likewise.
8467 * pthread_setschedparam.c: Likewise.
8468 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8469 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8470 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8471 * pthread_timedjoin.c: Likewise.
8473 * tst-basic7.c: Include <signal.h>.
8475 * pthread_join.c (pthread_join): Limited checking for invalid
8477 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8479 2003-02-20 Ulrich Drepper <drepper@redhat.com>
8481 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8482 beginning of the loop. Clear the entire first block of TSD.
8483 * Makefile (tests): Add tst-key4.
8484 * tst-key4.c: New file.
8486 2003-02-18 Ulrich Drepper <drepper@redhat.com>
8488 * Makefile (tests): Add tst-basic7.
8489 * tst-basic7.c: New file.
8491 * pthread_create.c (deallocate_tsd): Mark as internal_function.
8492 Add some more __builtin_expect.
8494 * pthreadP.h: Define dummy version of DEBUGGING_P.
8496 2003-02-17 Ulrich Drepper <drepper@redhat.com>
8498 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8499 _POSIX_THREAD_PRIORITY_SCHEDULING.
8500 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8501 _XOPEN_REALTIME_THREADS.
8502 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8504 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8505 kernel returns EINVAL for PID <= 0, work around it.
8507 * Makefile (tests): Add tst-signal5.
8508 * tst-signal5.c: New file.
8510 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8513 * tst-cancel1.c (tf): Block all signals.
8515 * Makefile (tests): Add tst-basic6.
8516 * tst-basic6.c: New file.
8518 * tst-basic1.c: Add test for process ID.
8520 * Makefile (tests): Add tst-cancel10.
8521 * tst-cancel10.c: New file.
8523 * Makefile (tests): Add tst-signal4.
8524 * tst-signal4.c: New file.
8526 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8527 __sigismember instead of sigismember. Add __builtin_expect.
8529 2003-02-16 Ulrich Drepper <drepper@redhat.com>
8531 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8532 pthread_setcancelstate, and pthread_rwlock_setpshared.
8534 * tst-cancel7.c (do_test): Make sure the pid file exists before
8535 canceling the thread.
8537 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8538 pthread_rwlock_timedrdlock tests.
8539 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8540 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8541 Check for invalid tv_nsec field.
8542 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8545 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8546 recursive mutex of overflow.
8548 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8550 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8551 going into an endless loop.
8552 * Makefile (tests): Add tst-cancel9.
8553 * tst-cancel9.c: New file.
8555 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8557 2003-02-15 Ulrich Drepper <drepper@redhat.com>
8559 * tst-mutex5.c (do_test): Add more timedlock tests.
8561 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8562 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8564 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8565 use INLINE_SYSCALL. Error number is returned, not -1.
8567 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8568 and __deallocate_stack with internal_function.
8569 * pthread_create.c: Adjust definitions appropriately.
8570 * allocatestack.c: Likewise.
8572 * pthread_join.c: Add one more __builtin_expect.
8573 * pthread_timedjoin.c: Likewise.
8575 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8576 not data of sequence number does not match.
8577 Add one __builtin_expect.
8579 * Makefile (tests): Add tst-clock1.
8580 * tst-clock1.c: New file.
8582 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8584 * Makefile (tests): Add tst-basic5.
8585 * tst-basic5.c: New file.
8587 2003-02-14 Ulrich Drepper <drepper@redhat.com>
8589 * Makefile (tests): Add tst-basic4.
8590 * tst-basic4.c: New file.
8592 * pthreadP.h: Add declaraction for __nptl_nthreads.
8593 * pthread_create.c: Define __nptl_nthreads
8594 (start_thread): Increment __nptl_nthreads at beginning. Decrement
8595 after thread is done. If then zero, call exit(0).
8596 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8597 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
8598 * init.c (pthread_functions): Initialize ptr_nthreads.
8599 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8600 (__reclaim_stacks): Decrement __nptl_nthreads.
8601 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8603 * Makefile (tests): Add tst-basic3.
8604 * tst-basic3.c: New file.
8606 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
8607 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
8608 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8609 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
8610 if asynchronous canceling is enabled.
8611 * pthread_join.c (pthread_join): When recognizing circular joins,
8612 take into account the other thread might be already canceled.
8613 * Makefile (tests): Add tst-join5.
8614 * tst-join5.c: New file.
8616 * Makefile (tests): Add tst-join4.
8617 * tst-join4.c: New file.
8619 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8621 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8623 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
8625 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8626 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8627 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8629 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8631 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8632 error if lll_futex_wake failed.
8634 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8636 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8637 handling of cancellation and failung pthread_mutex_unlock call.
8638 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8639 * Makefile (tests): Add tst-cond8 and tst-cond9.
8640 * tst-cond8.c: New file.
8641 * tst-cond9.c: New file.
8643 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8645 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
8646 non-standard initializers with __USE_GNU.
8648 * Makefile (tests): Add tst-cleanup3.
8649 * tst-cleanup3.c: New file.
8651 2003-02-12 Ulrich Drepper <drepper@redhat.com>
8653 * Makefile (tests): Add tst-attr1 and tst-attr2.
8654 * tst-attr1.c: New file.
8655 * tst-attr2.c: New file.
8657 * Makefile: Add rules to build and run tst-atfork2 test.
8658 * tst-atfork2.c: New file.
8659 * tst-atfork2mod.c: New file.
8661 * sysdeps/unix/sysv/linux/unregister-atfork.c
8662 (__unregister_atfork): Free the memory allocated for the handlers
8663 after removing them from the lists.
8665 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8668 * tst-atfork1.c (do_test): Wait for the child we forked.
8669 Report error in child.
8671 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8673 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8675 2003-02-10 Ulrich Drepper <drepper@redhat.com>
8677 * Makefile (tests): Add tst-cancel8.
8678 * tst-cancel8.c: New file.
8680 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8681 clearing of control variable.
8682 * Makefile (tests): Add tst-once3 and tst-once4.
8683 * tst-once3.c: New file.
8684 * tst-once4.c: New file.
8686 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
8688 * sysdeps/sh/Makefile: New file.
8689 * sysdeps/sh/bits/atomic.h: New file.
8690 * sysdeps/sh/pthread_spin_init.c: New file.
8691 * sysdeps/sh/pthread_spin_lock.c: New file.
8692 * sysdeps/sh/pthread_spin_trylock.S: New file.
8693 * sysdeps/sh/pthread_spin_unlock.S: New file.
8694 * sysdeps/sh/pthreaddef.h: New file.
8695 * sysdeps/sh/tcb-offsets.sym: New file.
8696 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8697 * sysdeps/sh/tls.h: New file.
8698 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8699 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8700 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8701 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8702 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8703 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8704 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8705 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8706 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8707 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8708 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8709 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8710 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8711 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8712 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8713 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8714 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8715 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8716 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8717 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8718 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8719 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8720 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8721 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8722 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8723 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8724 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8725 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8726 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8727 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8729 2003-02-08 Ulrich Drepper <drepper@redhat.com>
8731 * tst-cond2.c: Rearrange code to not rely on behavior undefined
8734 * tst-basic2.c (do_test): Lock mutex before creating the thread.
8736 2003-02-07 Ulrich Drepper <drepper@redhat.com>
8738 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8739 (TLS_GET_FS): New #define.
8740 (TLS_SET_FS): New #define.
8741 Correct value of __NR_set_thread_area.
8743 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8745 2003-02-06 Ulrich Drepper <drepper@redhat.com>
8747 * Makefile (tests): Add tst-popen1.
8748 * tst-popen1.c: New file.
8750 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8751 but inactive generalization.
8752 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8753 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8754 Minor optimization, remove one instruction.
8755 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8757 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
8759 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8761 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
8763 * init.c (__NR_set_tid_address): Add #ifdef for s390.
8764 * sysdeps/pthread/pthread_barrier_wait.c: New file.
8765 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8766 * sysdeps/pthread/pthread_cond_signal.c: New file.
8767 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8768 * sysdeps/pthread/pthread_cond_wait.c: New file.
8769 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8770 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8771 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8772 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8773 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8774 * sysdeps/s390/Makefile: New file.
8775 * sysdeps/s390/bits/atomic.h: New file.
8776 * sysdeps/s390/pthread_spin_init.c: New file.
8777 * sysdeps/s390/pthread_spin_lock.c: New file.
8778 * sysdeps/s390/pthread_spin_trylock.c: New file.
8779 * sysdeps/s390/pthread_spin_unlock.c: New file.
8780 * sysdeps/s390/pthreaddef.h: New file.
8781 * sysdeps/s390/tcb-offsets.sym: New file.
8782 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8783 * sysdeps/s390/tls.h: New file.
8784 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8785 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8786 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8787 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8788 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8789 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8790 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8791 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8792 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8793 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8794 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8795 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8796 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8797 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8798 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8799 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8800 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8801 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8802 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8803 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8804 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8805 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8806 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8808 2003-02-04 Ulrich Drepper <drepper@redhat.com>
8810 * atomic.h: Add a couple more default implementations.
8811 (atomic_compare_and_exchange_acq): Use
8812 __arch_compare_and_exchange_32_acq in return value definition. It
8814 (atomic_bit_set): Renamed from atomic_set_bit.
8815 Add missing atomic_ prefixes.
8817 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8818 thread library is available, use correct value to mark initialized
8821 2003-02-03 Ulrich Drepper <drepper@redhat.com>
8823 * allocatestack.c (allocate_stack): Use __getpagesize instead of
8824 __sysconf to determine pagesize.
8826 * pthread_create.c: Include <atomic.h>.
8827 * allocatestack.c (allocate_stack): Implement coloring of the
8828 allocated stack memory. Rename pagesize to pagesize_m1. It's the
8829 size minus one. Adjust users.
8830 * sysdeps/i386/i686/Makefile: New file.
8832 2003-02-02 Ulrich Drepper <drepper@redhat.com>
8834 * allocatestack.c: Improve comment throughout the file.
8836 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8837 (__lll_lock_wait): Add branch prediction.
8838 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8839 (__lll_lock_wait): Likewise.
8840 (lll_unlock_wake_cb): Removed.
8842 2003-01-31 Ulrich Drepper <drepper@redhat.com>
8844 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8845 _POSIX_THREAD_PRIORITY_SCHEDULING.
8847 2003-01-30 Jakub Jelinek <jakub@redhat.com>
8849 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8850 Fix return type of ptr___pthread_getspecific.
8852 2003-01-29 Ulrich Drepper <drepper@redhat.com>
8854 * Makefile (tests): Add tst-umask1.
8855 (tst-umask1-ARGS): Define.
8856 * tst-umask1.c: New file.
8858 2003-01-28 Ulrich Drepper <drepper@redhat.com>
8860 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
8861 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8862 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8863 pthread_rwlock_unlock.
8864 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8865 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8866 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8867 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8868 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8870 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8871 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8873 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8874 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8875 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8877 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8878 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8880 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8881 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8882 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8884 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8885 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8887 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8889 * Makefile (libpthread-routines): Remove lowlevelcond and
8890 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8891 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8892 and pthread_cond_broadcast.
8893 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8894 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8895 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8896 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8897 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8898 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8899 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8900 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8901 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8902 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8903 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8904 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8905 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8906 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8907 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8908 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8909 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8910 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8911 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8912 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8913 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8914 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8915 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8916 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8917 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8918 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8919 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8920 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8921 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
8922 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
8923 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
8925 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
8926 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
8927 of the code is moved to ...
8928 * sysdeps/pthread/createthread.c: ...here. New file.
8930 2003-01-27 Ulrich Drepper <drepper@redhat.com>
8932 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
8933 (__new_sem_post): Clear %eax before returning.
8934 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
8936 * Makefile (tests): Add tst-cleanup2.
8937 * tst-cleanup2.c: New file.
8939 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8940 Interpret first parameter correctly.
8942 2003-01-17 Ulrich Drepper <drepper@redhat.com>
8944 * Makefile (headers): Add bits/semaphore.h.
8946 2003-01-16 Jakub Jelinek <jakub@redhat.com>
8948 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
8951 2003-01-14 Ulrich Drepper <drepper@redhat.com>
8953 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
8954 must be used and mapping failed.
8955 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
8957 * Makefile (CFLAGS-pthread_self.os): Define this, not
8958 CFLAGS-pthread_self.c.
8960 2003-01-13 Ulrich Drepper <drepper@redhat.com>
8962 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
8965 * Makefile (libpthread-routines): Add version. Add rules to build
8966 version.os and banner.h.
8967 * version.c: New file.
8969 2003-01-13 Jakub Jelinek <jakub@redhat.com>
8971 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
8972 the alias unconditional.
8973 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
8975 2003-01-13 Ulrich Drepper <drepper@redhat.com>
8977 * Makefile (CFLAGS-pthread_self.c): New definition.
8979 2003-01-06 Jakub Jelinek <jakub@redhat.com>
8981 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
8982 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
8983 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
8984 * init.c (__pthread_initialize_minimal_internal): Likewise.
8986 2003-01-07 Jakub Jelinek <jakub@redhat.com>
8988 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
8990 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8991 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8992 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8993 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8994 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8995 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8997 2003-01-06 Jakub Jelinek <jakub@redhat.com>
8999 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9000 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9001 * tst-cancel-wrappers.sh: Remove all exceptions.
9003 2003-01-05 Ulrich Drepper <drepper@redhat.com>
9005 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9006 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
9008 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9009 Use __libc_pthread_functions array if SHARED.
9011 * pthreadP.h: Move pthread_cond_2_0_t definition to...
9012 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9014 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9015 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9016 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9017 __libc_ptf_call instead of __libc_maybe_call.
9019 (__libc_cleanup_region_start): Wrap function name with PTF call.
9020 (__libc_cleanup_region_end): Likewise.
9021 (__libc_cleanup_end): Likewise.
9023 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9024 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9025 * pthread_key_create.c: Add __pthread_key_create_internal alias.
9026 * pthreadP.h: Add prototypes.
9028 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9029 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9030 __pthread_rwlock_unlock aliases.
9031 * pthreadP.h: Add prototypes for new aliases.
9033 * pthreadP.h (struct pthead_functions): Moved to...
9034 * sysdeps/pthread/pthread-functions.h: ...here. New file.
9035 * init.c (pthread_functions): Add initializers for new elements.
9037 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9038 __pthread_cleanup_pop_restore aliases.
9039 * pthreadP.h: Add prototypes.
9041 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9042 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9043 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9044 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9045 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9046 * pthreadP.h: Adjust prototypes and callers.
9048 2003-01-04 Ulrich Drepper <drepper@redhat.com>
9050 * Makefile (tests): Add tst-cancel7.
9051 (tst-cancel7-ARGS): New variable.
9052 * tst-cancel7.c: New file.
9054 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9055 around gcc defficiencies.
9056 * old_pthread_cond_signal.c: Likewise.
9057 * old_pthread_cond_timedwait.c: Likewise.
9058 * old_pthread_cond_wait.c: Likewise.
9060 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9062 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9064 * Makefile (tests): Add tst-cond7.
9065 * tst-cond7.c: New file.
9067 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9068 (condvar_cleanup): Get condvar address from the right place.
9070 * atomic.h: Correct definitions of atomic_full_barrier,
9071 atomic_read_barrier, atomic_write_barrier.
9073 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9075 * old_pthread_cond_signal.c: Likewise.
9076 * old_pthread_cond_timedwait.c: Likewise.
9077 * old_pthread_cond_wait.c: Likewise.
9079 2003-01-03 Jakub Jelinek <jakub@redhat.com>
9081 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9083 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9085 * pthreadP.h (pthread_cond_2_0_t): New type.
9086 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9087 Use new type for the 2.0 condvar function prototypes.
9088 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9089 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9091 * old_pthread_cond_destroy.c: Likewise.
9092 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
9093 * old_pthread_cond_signal.c: Likewise.
9094 * old_pthread_cond_timedwait.c: Likewise.
9095 * old_pthread_cond_wait.c: Likewise.
9097 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9098 (__pthread_cond_wait): Don't save cancellation mode and seq value
9101 * herrno.c (__h_errno_location): Don't define as weak.
9103 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9105 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9106 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9107 and pthread_cond_wait.
9108 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9110 (__pthread_cond_broadcast_2_0): ... this.
9111 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9113 (__pthread_cond_destroy_2_0): ... this.
9114 * old_pthread_cond_init.c (__old_pthread_cond_init):
9116 (__pthread_cond_init_2_0): ... this.
9117 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9119 (__pthread_cond_signal_2_0): ... this.
9120 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9122 (__pthread_cond_wait_2_0): ... this.
9123 * pthread_cond_destroy.c: Include shlib-compat.h.
9124 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9125 * pthread_cond_init.c: Include shlib-compat.h.
9126 (pthread_cond_init): Change strong_alias into versioned_symbol.
9127 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9128 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9130 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9131 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9132 __pthread_cond_wait_2_0): New prototypes.
9133 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9134 __old_pthread_cond_init, __old_pthread_cond_signal,
9135 __old_pthread_cond_wait): Removed.
9136 * init.c: Include shlib-compat.h.
9137 (pthread_functions): Guard ptr___pthread_attr_init_2_0
9138 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9139 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9140 ptr___pthread_cond_*_2_0 fields.
9141 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9142 pthread_cond_*@GLIBC_2.0 compatibility symbols.
9144 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9145 LIBC_SIGACTION was not yet defined.
9146 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9147 [!defined LIBC_SIGACTION] (__sigaction): New function and
9149 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9150 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9152 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9154 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9156 2003-01-02 Ulrich Drepper <drepper@redhat.com>
9158 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9159 New, larger type definition.
9160 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9162 * Versions [libpthread]: Add definitions for new pthread_cond_*
9163 interfaces for version GLIBC_2.3.2.
9164 * pthread_cond_init.c: Update initialization for new type definition.
9165 * Makefile (libpthread-routines): Remove pthread_cond_wait,
9166 pthread_cond_timedwait, pthread_cond_signal, and
9167 pthread_cond_broadcast. Add old_pthread_cond_init,
9168 old_pthread_cond_destroy, old_pthread_cond_wait,
9169 old_pthread_cond_timedwait, old_pthread_cond_signal, and
9170 old_pthread_cond_broadcast.
9171 * old_pthread_cond_broadcast.c: New file.
9172 * old_pthread_cond_destroy.c: New file.
9173 * old_pthread_cond_init.c: New file.
9174 * old_pthread_cond_signal.c: New file.
9175 * old_pthread_cond_timedwait.c: New file.
9176 * old_pthread_cond_wait.c: New file.
9177 * pthreadP.h: Add prototypes for the compatibility interfaces.
9179 * pthread_cond_destroy.c: Don't include <errno.h>.
9181 2003-01-01 Ulrich Drepper <drepper@redhat.com>
9183 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9184 unnecessary zero offset when addressing MUTEX.
9186 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9188 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9190 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9191 for __register_atfork.
9193 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9195 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9196 instead of ASSEMBLER test macro.
9198 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9199 __libc_current_sigrtmax): Add libc_hidden_def.
9201 * sysdeps/pthread/list.h: Remove assert.h include.
9203 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9205 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9206 __pthread_initialize_minimal_internal not
9207 __pthread_initialize_minimal.
9209 2002-12-30 Ulrich Drepper <drepper@redhat.com>
9211 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9212 __pthread_initialize_minimal as hidden.
9214 * init.c (__pthread_initialize_minimal_internal): Don't mark as
9217 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9219 * Makefile ($(inst_libdir)/libpthread.so): Depend on
9220 $(common-objpfx)format.lds, include that into the output script.
9222 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9224 2002-12-28 Andreas Jaeger <aj@suse.de>
9226 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9227 nsec resolution changes.
9228 (xstat64_conv): Likewise.
9229 (xstat32_conv): Likewise.
9230 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9232 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9233 structs stat and stat64.
9234 * time/time.h (__timespec_defined): Define for __USE_MISC.
9235 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9237 2002-12-30 Jakub Jelinek <jakub@redhat.com>
9239 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
9241 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9242 (pthread_exit): Use strong_alias to avoid warnings.
9243 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9244 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9245 ptr___pthread_attr_init_2_*.
9246 * init.c (pthread_functions): Adjust.
9248 2002-12-29 Ulrich Drepper <drepper@redhat.com>
9250 * forward.c: Make all functions available by default again. It
9251 caused too much trouble.
9253 * pt-siglongjmp.c: Removed.
9255 2002-12-28 Jakub Jelinek <jakub@redhat.com>
9257 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9258 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9259 * sysdeps/i386/Makefile: New file.
9260 * sysdeps/i386/tcb-offsets.sym: New file.
9261 * sysdeps/pthread/tcb-offsets.h: New file.
9262 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9263 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9265 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9266 __register_atfork...
9267 (GLIBC_2.3.2): ...here.
9269 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9271 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9272 pthread_attr_setstackaddr with __attribute_deprecated__.
9274 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9276 * pt-system.c (system): Remove cancellation handling.
9277 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9278 cancellation routines.
9280 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9282 * descr.h: Include <dl-sysdep.h>.
9283 (struct pthread): Move header.data.list to the back of the struct.
9284 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9285 (MULTIPLE_THREADS_OFFSET): Adjust offset.
9286 (SYSINFO_OFFSEET): Likewise.
9288 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9290 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9292 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9293 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9294 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9295 (USE_DL_SYSINFO): Undef.
9297 2002-12-22 Jakub Jelinek <jakub@redhat.com>
9299 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9300 $(common-objpfx)libc.so.
9301 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9302 it is bigger than pipe buffer size even on arches with bigger
9304 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9306 2002-12-25 Ulrich Drepper <drepper@redhat.com>
9308 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9309 correct errno access for case that USE___THREAD is not defined.
9311 2002-12-24 Ulrich Drepper <drepper@redhat.com>
9313 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9314 Patch by Marijn Ros <marijn@mad.scientist.com>.
9316 2002-12-22 Roland McGrath <roland@redhat.com>
9318 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9320 2002-12-20 Ulrich Drepper <drepper@redhat.com>
9322 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9324 2002-12-19 Ulrich Drepper <drepper@redhat.com>
9326 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9327 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9328 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9330 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9332 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9333 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9334 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9335 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9336 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9337 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9338 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9339 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9341 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9343 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9345 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9347 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9349 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9350 that sysinfo is properly initialized.
9351 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9352 to 1 only for ld.so.
9354 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9355 RTLD_CORRECT_DYNAMIC_WEAK.
9357 2002-12-19 Jakub Jelinek <jakub@redhat.com>
9359 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9360 Use return 0 as 6th argument to FORWARD4.
9361 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9363 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9365 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9366 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9367 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9368 (INIT_SYSINFO): New #define.
9369 (TLS_TP_INIT): Use INIT_SYSINFO.
9370 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9371 At test to make sure SYSINFO_OFFSET value is correct.
9372 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9374 2002-12-18 Jakub Jelinek <jakub@redhat.com>
9376 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9377 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9378 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9379 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9380 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9381 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9382 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9384 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9386 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9387 macro instead of using int $0x80 directly.
9389 * sysdeps/pthread/bits/stdio-lock.h: New file.
9390 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9391 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9392 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9393 * Makefile (routines): Add libc-lowlevelmutex.
9395 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9396 __i686.get_pc_thunk.dx.
9398 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9400 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9401 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9402 ($(objpfx)tst-cancel-wrappers.out): New rule.
9403 * tst-cancel-wrappers.sh: New test.
9404 * tst-locale1.c: Include signal.h.
9405 (uselocale): Test static linking of __libc_current_sigrt*.
9407 2002-12-17 Ulrich Drepper <drepper@redhat.com>
9409 * Makefile (tests): Add tst-cancel6.
9410 * tst-cancel6.c: New file
9412 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9414 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9415 Define meaningfully for assembler as well.
9416 * pthreadP.h (struct pthread_functions): Remove
9417 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
9418 and ptr_pthread_attr_init_2_1 fields.
9419 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9420 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9421 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9422 (FORWARD3): Define using FORWARD4.
9423 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9425 * pt-system.c: Remove duplicate stdlib.h include.
9427 2002-12-16 Ulrich Drepper <drepper@redhat.com>
9429 * sem_init.c: Define sem_init@GLIBC_2.0.
9430 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9431 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9433 * flockfile.c: Moved to...
9434 * sysdeps/pthread/flockfile.c: ...here. New file.
9435 * funlockfile.c: Moved to...
9436 * sysdeps/pthread/funlockfile.c: ...here. New file.
9437 * ftrylockfile.c: Moved to...
9438 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
9440 2002-12-16 Jakub Jelinek <jakub@redhat.com>
9442 * libc-cancellation.c: Guard both function with
9443 #if !defined NOT_IN_libc.
9444 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9445 automatically provided pthread wrappers.
9446 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9447 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9449 * pt-open.c: Removed.
9450 * pt-fcntl.c: Removed.
9451 * pt-fsync.c: Removed.
9452 * pt-lseek.c: Removed.
9453 * pt-msgrcv.c: Removed.
9454 * pt-msgsnd.c: Removed.
9455 * pt-msync.c: Removed.
9456 * pt-nanosleep.c: Removed.
9457 * pt-open64.c: Removed.
9458 * pt-pause.c: Removed.
9459 * pt-pread.c: Removed.
9460 * pt-pread64.c: Removed.
9461 * pt-pwrite.c: Removed.
9462 * pt-pwrite64.c: Removed.
9463 * pt-read.c: Removed.
9464 * pt-recv.c: Removed.
9465 * pt-recvfrom.c: Removed.
9466 * pt-recvmsg.c: Removed.
9467 * pt-send.c: Removed.
9468 * pt-sendto.c: Removed.
9469 * pt-sigtimedwait.c: Removed.
9470 * pt-sigwait.c: Removed.
9471 * pt-wait.c: Removed.
9472 * pt-waitpid.c: Removed.
9473 * pt-write.c: Removed.
9474 * pt-accept.c: Removed.
9475 * pt-close.c: Removed.
9476 * pt-connect.c: Removed.
9477 * pt-lseek64.c: Removed.
9478 * pt-sendmsg.c: Removed.
9479 * pt-tcdrain.c: Removed.
9481 2002-12-15 Ulrich Drepper <drepper@redhat.com>
9483 * init.c (__pthread_initialize_minimal_internal): Renamed from
9484 __pthread_initialize_minimal. Make old name an alias. This
9485 converts a normal relocation into a relative relocation.
9487 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9489 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9490 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9491 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9492 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9493 pt-sigwaitinfo, pt-waitid, and pt-writev.
9494 * pt-creat.c: Removed.
9495 * pt-poll.c: Removed.
9496 * pt-pselect.c: Removed.
9497 * pt-readv.c: Removed.
9498 * pt-select.c: Removed.
9499 * pt-sigpause.c: Removed.
9500 * pt-sigsuspend.c: Removed.
9501 * pt-sigwaitinfo.c: Removed.
9502 * pt-waitid.c: Removed.
9503 * pt-writev.c: Removed.
9505 * init.c (pthread_functions): New variable.
9506 (__pthread_initialize_minimal): Pass pointer to pthread_functions
9507 (or NULL) to __libc_pthread_init.
9508 * forward.c: Rewrite to use __libc:pthread_functions array to get
9510 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9512 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9513 Take new parameter. Copy content of variable pointed to by it
9514 to __libc_pthread_init.
9516 * pthreadP.h (struct pthread_functions): New type.
9517 (__libc_pthread_init): Declare.
9519 * pthread_attr_destroy.c: Add namespace protected alias.
9520 * pthread_attr_getdetachstate.c: Likewise.
9521 * pthread_attr_getinheritsched.c: Likewise.
9522 * pthread_attr_getschedparam.c: Likewise.
9523 * pthread_attr_getschedpolicy.c: Likewise.
9524 * pthread_attr_getscope.c: Likewise.
9525 * pthread_attr_setdetachstate.c: Likewise.
9526 * pthread_attr_setinheritsched.c: Likewise.
9527 * pthread_attr_setschedparam.c: Likewise.
9528 * pthread_attr_setschedpolicy.c: Likewise.
9529 * pthread_attr_setscope.c: Likewise.
9530 * pthread_cond_broadcast.c: Likewise.
9531 * pthread_cond_destroy.c: Likewise.
9532 * pthread_cond_init.c: Likewise.
9533 * pthread_cond_signal.c: Likewise.
9534 * pthread_cond_wait.c: Likewise.
9535 * pthread_condattr_destroy.c: Likewise.
9536 * pthread_condattr_init.c: Likewise.
9537 * pthread_equal.c: Likewise.
9538 * pthread_exit.c: Likewise.
9539 * pthread_getschedparam.c: Likewise.
9540 * pthread_self.c: Likewise.
9541 * pthread_setcancelstate.c: Likewise.
9542 * pthread_setschedparam.c: Likewise.
9543 * pthread_mutex_destroy.c: Likewise.
9544 * pthread_mutex_init.c: Likewise.
9545 * pthreadP.h: Add prototypes for the aliases.
9547 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9548 multiple_threads member in correct TCB to 1.
9550 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9551 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
9552 member of thread decriptor, otherwise return unconditionally 1.
9554 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9556 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9557 regular Linux version. Remove file.
9558 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
9559 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
9560 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
9561 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
9562 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
9563 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
9564 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
9565 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
9566 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
9567 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
9568 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
9569 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
9570 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
9571 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
9572 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
9573 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
9574 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
9575 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
9576 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
9577 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
9578 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
9579 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
9580 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
9581 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
9582 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
9583 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
9584 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
9585 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
9586 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
9587 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
9589 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9591 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9592 * sysdeps/unix/sysv/linux/open.c: Removed.
9593 * sysdeps/unix/sysv/linux/fsync.c: Removed.
9594 * sysdeps/unix/sysv/linux/lseek.c: Removed.
9595 * sysdeps/unix/sysv/linux/msync.c: Removed.
9596 * sysdeps/unix/sysv/linux/read.c: Removed.
9597 * sysdeps/unix/sysv/linux/close.c: Removed.
9598 * sysdeps/unix/sysv/linux/creat.c: Removed.
9599 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9600 * sysdeps/unix/sysv/linux/pause.c: Removed.
9601 * sysdeps/unix/sysv/linux/select.c: Removed.
9602 * sysdeps/unix/sysv/linux/write.c: Removed.
9604 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9606 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9607 element in TCB to see whether locking is needed.
9609 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9610 MULTIPLE_THREADS_OFFSET value is correct.
9612 * sysdeps/unix/sysv/linux/close.c: New file.
9613 * sysdeps/unix/sysv/linux/connect.S: New file.
9614 * sysdeps/unix/sysv/linux/creat.c: New file.
9615 * sysdeps/unix/sysv/linux/fsync.c: New file.
9616 * sysdeps/unix/sysv/linux/llseek.c: New file.
9617 * sysdeps/unix/sysv/linux/lseek.c: New file.
9618 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9619 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9620 * sysdeps/unix/sysv/linux/msync.c: New file.
9621 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9622 * sysdeps/unix/sysv/linux/open.c: New file.
9623 * sysdeps/unix/sysv/linux/open64.c: New file.
9624 * sysdeps/unix/sysv/linux/pause.c: New file.
9625 * sysdeps/unix/sysv/linux/poll.c: New file.
9626 * sysdeps/unix/sysv/linux/pread.c: New file.
9627 * sysdeps/unix/sysv/linux/pread64.c: New file.
9628 * sysdeps/unix/sysv/linux/pselect.c: New file.
9629 * sysdeps/unix/sysv/linux/pwrite.c: New file.
9630 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9631 * sysdeps/unix/sysv/linux/readv.c: New file.
9632 * sysdeps/unix/sysv/linux/recv.S: New file.
9633 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9634 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9635 * sysdeps/unix/sysv/linux/select.c: New file.
9636 * sysdeps/unix/sysv/linux/send.S: New file.
9637 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9638 * sysdeps/unix/sysv/linux/sendto.S: New file.
9639 * sysdeps/unix/sysv/linux/sigpause.c: New file.
9640 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9641 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9642 * sysdeps/unix/sysv/linux/sigwait.c: New file.
9643 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9644 * sysdeps/unix/sysv/linux/system.c: New file.
9645 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9646 * sysdeps/unix/sysv/linux/wait.c: New file.
9647 * sysdeps/unix/sysv/linux/waitid.c: New file.
9648 * sysdeps/unix/sysv/linux/waitpid.c: New file.
9649 * sysdeps/unix/sysv/linux/writev.c: New file.
9650 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9652 * pt-readv.c: Fix comment.
9654 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9656 * tst-cleanup1.c: Include stdlib.h.
9658 * tst-cancel5.c: New test.
9659 * Makefile (tests): Add tst-cancel5.
9660 (tst-cancel5): Link against libc.so libpthread.so in that order.
9662 2002-12-13 Ulrich Drepper <drepper@redhat.com>
9664 * forward.c (test_loaded): Prevent recursive calls.
9666 * Makefile (routines): Add libc-cancellation.
9667 * libc-cancellation.c: New file.
9668 * descr.h (struct pthread): Add multiple_threads field.
9669 * allocatestack.c (allocate_stack): Initialize multiple_header field of
9670 new thread descriptor to 1.
9671 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9672 Initialize multiple_thread field after successful thread creation.
9673 * cancellation.c (__do_cancel): Move to pthreadP.h.
9674 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9675 (__pthread_disable_asynccancel): Add internal_function attribute.
9676 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9677 * pthread_setcancelstate.c: Likewise.
9678 * pthread_setcanceltype.c: Likewise.
9679 * pthread_exit.c: Likewise.
9680 * pthreadP.h (CANCELLATION_P): Likewise.
9681 (__do_cancel): Define as static inline.
9682 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9683 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9685 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9686 fields. Define MULTIPLE_THREADS_OFFSET.
9687 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9689 * sysdeps/unix/sysv/linux/accept.S: New file.
9690 * sysdeps/unix/sysv/linux/read.c: New file.
9691 * sysdeps/unix/sysv/linux/write.c: New file.
9692 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9693 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9694 initialization of __libc_locking_needed.
9695 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9696 __libc_locking_needed, use multiple_threads field in TCB.
9697 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9699 2002-12-12 Ulrich Drepper <drepper@redhat.com>
9701 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9703 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9705 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9706 access to __libc_locking_needed for PIC.
9708 2002-12-12 Jakub Jelinek <jakub@redhat.com>
9710 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9711 declare for libc.so.
9712 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9714 (__libc_lock_lock): Put into statement expression.
9715 (__libc_lock_unlock): Remove trailing semicolon.
9716 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9718 2002-12-12 Roland McGrath <roland@redhat.com>
9720 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9721 "m" constraint to refer to __libc_locking_needed. Declare it here.
9723 2002-12-12 Ulrich Drepper <drepper@redhat.com>
9725 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9726 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9727 Initialize __libc_locking_needed.
9728 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9729 instead of __register_pthread_fork_handler.
9730 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9731 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9732 fork-gen with libc_pthread_init.
9733 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9734 of __register_pthread_fork_handler.
9735 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9736 of __register_pthread_fork_handler.
9737 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9738 __libc_locking_needed to determine whether lock prefix can be avoided.
9739 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9741 2002-12-11 Ulrich Drepper <drepper@redhat.com>
9743 * Makefile (tests): Add tst-cleanup1.
9744 * tst-cleanup1.c: New file.
9745 * cancellation.c (__cleanup_thread): Removed.
9746 (__do_cancel): Remove call to __cleanup_thread.
9747 * pthreadP.h: Remove __cleanup_thread prorotype.
9749 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9750 Remember function and argument even if cancellation handler
9751 function is not available.
9752 (__libc_cleanup_region_end): Execute registered function directly if
9753 pthread functions are not available.
9754 (__libc_cleanup_end): Likewise.
9756 * init.c (__pthread_initialize_minimal): Fix initialization in
9757 static lib by preventing gcc from being too clever.
9759 2002-12-10 Ulrich Drepper <drepper@redhat.com>
9761 * init.c (__pthread_initialize_minimal): Remove unneccesary
9764 * Makefile (tests): We can run tst-locale2 now.
9766 2002-12-09 Ulrich Drepper <drepper@redhat.com>
9768 * Versions: Remove duplicated sigwait entry.
9770 2002-12-08 Ulrich Drepper <drepper@redhat.com>
9772 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9775 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9777 * pthreadP.h: Declare __pthread_enable_asynccancel and
9778 __pthread_disable_asynccancel.
9779 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9780 (CANCEL_RESET): Use __pthread_disable_asynccancel.
9781 * cancellation.c (__pthread_enable_asynccancel): New function.
9782 (__pthread_disable_asynccancel): New function.
9783 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9784 * pt-close.c: Likewise.
9785 * pt-connect.c: Likewise.
9786 * pt-creat.c: Likewise.
9787 * pt-fcntl.c: Likewise.
9788 * pt-fsync.c: Likewise.
9789 * pt-lseek.c: Likewise.
9790 * pt-lseek64.c: Likewise.
9791 * pt-msgrcv.c: Likewise.
9792 * pt-msgsnd.c: Likewise.
9793 * pt-msync.c: Likewise.
9794 * pt-nanosleep.c: Likewise.
9795 * pt-open.c: Likewise.
9796 * pt-open64.c: Likewise.
9797 * pt-pause.c: Likewise.
9798 * pt-poll.c: Likewise.
9799 * pt-pread.c: Likewise.
9800 * pt-pread64.c: Likewise.
9801 * pt-pselect.c: Likewise.
9802 * pt-pwrite.c: Likewise.
9803 * pt-pwrite64.c: Likewise.
9804 * pt-read.c: Likewise.
9805 * pt-readv.c: Likewise.
9806 * pt-recv.c: Likewise.
9807 * pt-recvfrom.c: Likewise.
9808 * pt-recvmsg.c: Likewise.
9809 * pt-select.c: Likewise.
9810 * pt-send.c: Likewise.
9811 * pt-sendmsg.c: Likewise.
9812 * pt-sendto.c: Likewise.
9813 * pt-sigpause.c: Likewise.
9814 * pt-sigsuspend.c: Likewise.
9815 * pt-sigtimedwait.c: Likewise.
9816 * pt-sigwait.c: Likewise.
9817 * pt-sigwaitinfo.c: Likewise.
9818 * pt-system.c: Likewise.
9819 * pt-tcdrain.c: Likewise.
9820 * pt-wait.c: Likewise.
9821 * pt-waitid.c: Likewise.
9822 * pt-waitpid.c: Likewise.
9823 * pt-write.c: Likewise.
9824 * pt-writev.c: Likewise.
9825 * pthread_join.c: Likewise.
9826 * pthread_timedjoin.c: Likewise.
9828 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9829 (__xpg_sigpause): New function.
9830 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9832 2002-12-07 Ulrich Drepper <drepper@redhat.com>
9834 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9836 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9837 _GI_pthread_cleanup_pop to pthreadP.h.
9839 * ftrylockfile.c: Use _IO_lock_trylock instead of
9840 pthread_mutex_trylock.
9842 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9843 (CANCEL_RESET): Likewise.
9844 (__pthread_setcanceltype_): Declare.
9845 (__pthread_mutex_lock_internal): Declare.
9846 (__pthread_mutex_unlock_internal): Declare.
9847 (__pthread_once_internal): Declare.
9848 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9849 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9851 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9852 and pthread_mutex_unlock.
9853 * pthread_cond_wait.c: Likewise.
9854 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9855 * pthread_mutex_unlock.c: Likewise.
9857 * pthread_setcanceltype.c: Add additional alias
9858 __pthread_setcanceltype.
9860 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9861 * sem_open.c (sem_open): Likewise.
9862 Use __libc_open, __libc_write, and __libc_close instead of
9863 open, write, and close respectively.
9865 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9866 Rewrite as statement expression since it must return a value.
9868 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9869 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9872 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9873 alias __pthread_once_internal.
9875 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9877 2002-12-06 Ulrich Drepper <drepper@redhat.com>
9879 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9880 * tst-stdio1.c: New file.
9881 * tst-stdio2.c: New file.
9883 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9885 * Makefile (tests): Comment out tst-locale2 for now.
9886 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9888 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9890 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9891 Use _IO_lock_init instead of explicit assignment.
9893 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9894 Define __libc_lock_* and __libc_lock_recursive macros with
9895 lowlevellock macros, not pthread mutexes.
9897 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
9898 of pthread_mutex_lock.
9899 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
9900 instead of pthread_mutex_unlock.
9902 2002-12-06 Roland McGrath <roland@redhat.com>
9904 * allocatestack.c (__stack_user): Use uninitialized defn.
9905 * init.c (__pthread_initialize_minimal): Initialize it here.
9907 2002-12-05 Roland McGrath <roland@redhat.com>
9909 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9911 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9913 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9916 2002-12-05 Ulrich Drepper <drepper@redhat.com>
9918 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9920 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9921 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
9922 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
9923 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
9924 for __libc_lock_* macros.
9925 * Makefile (routines): Add libc-lowlevellock.
9927 2002-10-09 Roland McGrath <roland@redhat.com>
9929 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
9930 Under [__PIC__], call the function via the pointer fetched for
9931 comparison rather than a call by name that uses the PLT.
9932 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
9933 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
9934 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
9935 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
9936 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
9938 2002-12-04 Roland McGrath <roland@redhat.com>
9940 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
9942 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
9943 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
9945 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
9947 2002-12-04 Ulrich Drepper <drepper@redhat.com>
9949 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
9950 a completely opaque, non-integer type.
9951 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9953 2002-12-05 Jakub Jelinek <jakub@redhat.com>
9955 * sysdeps/i386/tls.h: Include stdlib.h.
9956 * sysdeps/x86_64/tls.h: Likewise.
9958 2002-12-04 Ulrich Drepper <drepper@redhat.com>
9960 * Makefile (tests): Add tst-locale2.
9961 (tests-static): Likewise.
9962 * tst-locale2.c: New file.
9964 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
9965 volatile and add memory clobbers to lock operations.
9967 2002-12-03 Ulrich Drepper <drepper@redhat.com>
9969 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
9970 * sysdeps/i386/i486/bits/atomic.h: New file.
9971 * sysdeps/i386/i586/bits/atomic.h: New file.
9972 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
9973 include i486 version.
9974 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
9975 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
9976 Patch by Marijn Ros <marijn@mad.scientist.com>.
9978 * allocatestack.c (get_cached_stack): Don't crash if we first
9979 found a stack with a larger size then needed.
9980 Reported by Hui Huang <hui.huang@sun.com>.
9982 * Makefile (tests): Add tst-sysconf.
9983 * tst-sysconf.c: New file.
9985 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
9986 PTHREAD_THREADS_MAX.
9988 2002-12-02 Roland McGrath <roland@redhat.com>
9990 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
9991 Declare using hidden_proto instead of attribute_hidden, so there are
9992 non-.hidden static symbols for gdb to find.
9993 (__pthread_keys): Likewise.
9994 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
9995 * allocatestack.c (__stack_user): Likewise.
9996 * pthread_create.c (__pthread_keys): Likewise.
9997 (__nptl_threads_events, __nptl_last_event): Make these static instead
9999 * pthread_key_create.c (__pthread_pthread_keys_max,
10000 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10002 2002-12-02 Ulrich Drepper <drepper@redhat.com>
10004 * Makefile (tests): Add tst-locale1. If buid-static is yes link
10006 * tst-locale1.c: New file.
10008 * pthread_cond_timedwait.c: Include <stdlib.h>.
10010 * Makefile (tests): Add tst-fork2 and tst-fork3.
10011 * tst-fork2.c: New file.
10012 * tst-fork3.c: New file.
10014 2002-11-28 Ulrich Drepper <drepper@redhat.com>
10016 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10018 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10019 require it to 200112L.
10021 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10022 instruction only if HAVE_CMOV is defined.
10023 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10025 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10027 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10029 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10031 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10033 2002-11-27 Ulrich Drepper <drepper@redhat.com>
10035 * sysdeps/x86_64/bits/atomic.h: New file.
10037 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10040 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10041 possible since gettid cannot fail.
10043 * sysdeps/x86_64/pthreaddef.h: New file.
10045 * sysdeps/i386/pthreaddef.h (gettid): Removed.
10047 * sysdeps/x86_64/pthread_spin_init.c: New file.
10048 * sysdeps/x86_64/pthread_spin_lock.c: New file.
10049 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10050 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10052 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10053 Add missing lock prefix. Minute optimization.
10055 * tst-spin2.c (main): Also check successful trylock call.
10057 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10058 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
10060 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10061 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
10063 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
10064 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10065 value in case of an error. Add support for INTERNAL_SYSCALL.
10067 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10068 value in case of an error.
10070 * sysdeps/x86_64/tls.h: New file.
10072 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10074 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
10075 takes the array member name and the index as parameters.
10076 (THREAD_SETMEM_NC): Likewise.
10077 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10078 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10081 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10082 to decide which code to use.
10083 (THREAD_SETMEM_NC): Likewise.
10085 * allocatestack.c (queue_stack): Don't remove stack from list here.
10086 Do it in the caller. Correct condition to prematurely terminate
10087 loop to free stacks.
10088 (__deallocate_stack): Remove stack from list here.
10090 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10092 * Makefile (tests): Add tst-stack1.
10093 * tst-stack1.c: New file.
10095 * allocatestack.c (allocate_stack): Initialize the TCB on a user
10098 * pthread_attr_getstack.c: Return bottom of the thread area.
10100 2002-11-25 Ulrich Drepper <drepper@redhat.com>
10102 * Makefile (libpthread-routines): Add pt-allocrtsig and
10103 pthread_kill_other_threads.
10104 * pt-allocrtsig.c: New file.
10105 * pthread_kill_other_threads.c: New file.
10106 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10107 all three functions.
10108 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10110 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10111 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10112 and __libc_allocate_rtsig_private.
10113 * Versions (libpthread): Export pthread_kill_other_threads_np,
10114 __libc_current_sigrtmin, and __libc_current_sigrtmax.
10116 2002-11-24 Ulrich Drepper <drepper@redhat.com>
10118 * allocatestack.c (allocate_stack): stackaddr in attribute points to
10119 the end of the stack. Adjust computations.
10120 When mprotect call fails dequeue stack and free it.
10121 * pthread_attr_setstack.c: Store top of the stack in stackaddr
10123 * pthread_getattr_np.c: Likewise.
10125 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10128 2002-11-23 Ulrich Drepper <drepper@redhat.com>
10130 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10131 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10133 2002-11-22 Ulrich Drepper <drepper@redhat.com>
10135 * pthread_getspecific.c: Optimize access to first 2nd-level array.
10136 * pthread_setspecific.c: Likewise.
10138 2002-11-21 Ulrich Drepper <drepper@redhat.com>
10140 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10141 definitions. Get them from the official place.
10142 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10144 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10145 Use new CLONE_ flags in clone() calls.
10147 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10148 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10150 * Versions: Add pthread_* functions for libc.
10151 * forward.c: New file.
10153 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10155 * herrno.c: New file.
10158 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10159 sem_trywait, and sem_timedwait. Add herrno and res.
10160 * sem_init.c: Don't initialize lock and waiters members.
10161 * sem_open.c: Likewise.
10162 * sem_post.c: Removed.
10163 * sem_wait.c: Removed.
10164 * sem_trywait.c: Removed.
10165 * sem_timedwait.c: Removed.
10166 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10167 Includes full implementations of sem_post, sem_wait, sem_trywait,
10169 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10170 for new implementation.
10171 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10172 and waiters fields.
10174 * tst-sem3.c: Improve error message.
10175 * tst-signal3.c: Likewise.
10177 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10178 to tell the kernel about the termination futex and to initialize tid
10179 member. Don't initialize main_thread.
10180 * descr.h (struct pthread): Remove main_thread member.
10181 * cancelllation.c (__do_cancel): Remove code handling main thread.
10182 The main thread is not special anymore.
10184 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
10185 size of the stacks to stack_cache_actsize.
10187 * pt-readv.c: Add missing "defined".
10188 * pt-sigwait.c: Likewise.
10189 * pt-writev.c: Likewise.
10191 2002-11-09 Ulrich Drepper <drepper@redhat.com>
10193 * Versions: Export __connect from libpthread.
10194 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10196 * Makefile (libpthread-routines): Add pt-raise.
10197 * sysdeps/unix/sysv/linux/raise.c: New file.
10198 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10199 * sysdeps/generic/pt-raise.c: New file.
10201 * pthread_cond_init.c: Initialize all data elements of the condvar
10202 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10204 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10205 * pthread_create.c: Likewise.
10207 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10208 * tst-key1.c: New file.
10209 * tst-key2.c: New file.
10210 * tst-key3.c: New file.
10212 * Versions: Export pthread_detach for version GLIBC_2.0.
10213 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10215 2002-11-08 Ulrich Drepper <drepper@redhat.com>
10217 * pthread_key_create.c: Terminate search after an unused key was found.
10218 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10220 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10221 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10223 2002-10-10 Ulrich Drepper <drepper@redhat.com>
10225 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10226 dynamic lookup for errno in PIC.
10228 * allocatestack.c (get_cached_stack): Rearrange code slightly to
10229 release the stack lock as soon as possible.
10230 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10231 the static TLS block.
10232 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10234 * cancellation.c: Renamed from cancelation.c.
10235 * Makefile: Adjust accordingly.
10236 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10237 * cleanup_defer.c: Use CANCELLATION_P.
10238 * pthread_testcancel.c: Likewise.
10239 * descr.h: Fix spelling in comments.
10240 * init.c: Likewise.
10241 * pthread_getattr_np.c: Likewise.
10242 * pthread_getschedparam.c: Likewise.
10243 * pthread_setschedparam.c: Likewise.
10244 * Versions: Likewise.
10246 * pt-pselect.c: New file.
10247 * Makefile (libpthread-routines): Add pt-pselect.
10248 * Versions: Add pselect.
10250 * tst-cancel4.c: New file.
10251 * Makefile (tests): Add tst-cancel4.
10253 2002-10-09 Ulrich Drepper <drepper@redhat.com>
10255 * pthread_mutex_lock.c: Always record lock ownership.
10256 * pthread_mutex_timedlock.c: Likewise.
10257 * pthread_mutex_trylock.c: Likewise.
10259 * pt-readv.c: New file.
10260 * pt-writev.c: New file.
10261 * pt-creat.c: New file.
10262 * pt-msgrcv.c: New file.
10263 * pt-msgsnd.c: New file.
10264 * pt-poll.c: New file.
10265 * pt-select.c: New file.
10266 * pt-sigpause.c: New file.
10267 * pt-sigsuspend.c: New file.
10268 * pt-sigwait.c: New file.
10269 * pt-sigwaitinfo.c: New file.
10270 * pt-waitid.c: New file.
10271 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10272 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10273 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10274 * Versions: Add all the new functions.
10276 * tst-exit1.c: New file.
10277 * Makefile (tests): Add tst-exit1.
10279 * sem_timedwait.c: Minor optimization for more optimal fastpath.
10281 2002-10-08 Ulrich Drepper <drepper@redhat.com>
10283 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10285 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10286 call. pthread_join is an official cancellation point.
10287 * pthread_timedjoin.c: Likewise.
10289 * pthread_cond_wait.c: Revert order in which internal lock are dropped
10290 and the condvar's mutex are retrieved.
10291 * pthread_cond_timedwait.c: Likewise.
10292 Reported by dice@saros.East.Sun.COM.
10294 2002-10-07 Ulrich Drepper <drepper@redhat.com>
10296 * pthreadP.h: Cut out all type definitions and move them...
10297 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
10298 * pthreadP.h: Include <internaltypes.h>.
10300 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10301 performance tweaks.
10303 * sem_trywait.c: Shuffle #includes around to get right order.
10304 * sem_timedwait.c: Likewise.
10305 * sem_post.c: Likewise.
10306 * sem_wait.c: Likewise.
10308 * nptl 0.3 released.
10310 * Makefile (tests): Add tst-signal3.
10311 * tst-signal3.c: New file.
10313 2002-10-05 Ulrich Drepper <drepper@redhat.com>
10315 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10316 the asms modify the sem object.
10317 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10319 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10320 the actual members.
10321 * pthreadP.h (struct sem): New type. Actual semaphore type.
10322 * semaphoreP.h: Include pthreadP.h.
10323 * sem_getvalue.c: Adjust to sem_t change.
10324 * sem_init.c: Likewise.
10325 * sem_open.c: Likewise.
10326 * sem_post.c: Likewise.
10327 * sem_timedwait.c: Likewise.
10328 * sem_trywait.c: Likewise.
10329 * sem_wait.c: Likewise.
10331 2002-10-04 Ulrich Drepper <drepper@redhat.com>
10333 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10334 * tst-basic2.c: New file.
10335 * tst-exec1.c: New file.
10336 * tst-exec2.c: New file.
10337 * tst-exec3.c: New file.
10339 * tst-fork1.c: Remove extra */.
10341 * nptl 0.2 released. The API for IA-32 is complete.