1 2007-12-12 Ulrich Drepper <drepper@redhat.com>
3 * tst-basic7.c: Allocate memory for the stack.
6 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
7 (__pthread_cond_timedwait): Don't use VDSO.
8 Patch by Michal Januszewski.
10 2007-12-07 Ulrich Drepper <drepper@redhat.com>
13 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
14 Allow label before pthread_cleanup_pop.
15 (pthread_cleanup_pop_restore_np): Likewise.
17 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
19 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
20 Store 2 before returning ETIMEDOUT.
22 2007-11-23 Ulrich Drepper <drepper@redhat.com>
24 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
25 Store 2 before returning ETIMEDOUT.
26 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
27 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
28 (__lll_lock_wait_private): Optimize.
29 (__lll_lock_wait): Likewise.
31 2007-11-20 Jakub Jelinek <jakub@redhat.com>
33 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
34 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
35 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
37 2007-11-08 Ulrich Drepper <drepper@redhat.com>
40 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
41 If we time out, try one last time to lock the futex to avoid
42 losing a wakeup signal.
43 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
44 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
47 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
50 2007-11-07 Ulrich Drepper <drepper@redhat.com>
53 * allocatestack.c (allocate_stack): Change ENOMEM error in case
54 mmap failed to EAGAIN.
55 * Makefile (tests): Add tst-basic7.
56 * tst-basic7.c: New file.
58 2007-11-05 Ulrich Drepper <drepper@redhat.com>
60 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
63 2007-11-03 Mike Frysinger <vapier@gentoo.org>
65 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
66 missing line continuations.
67 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
68 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
70 2007-10-28 Ulrich Drepper <drepper@redhat.com>
73 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
74 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
75 (struct timer): Add next element.
76 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
77 enqueue timer structure into __active_timer_sigev_thread list.
78 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
79 remove timer struct from __active_timer_sigev_thread.
80 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
81 Before using timer structure make sure it is still on the
82 __active_timer_sigev_thread list. Keep lock until done.
83 Define __active_timer_sigev_thread and
84 __active_timer_sigev_thread_lock.
86 2007-10-27 Ulrich Drepper <drepper@redhat.com>
88 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
89 Redefine thread_atfork for use of ATFORK_MEM.
90 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
91 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
93 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
94 Use atomic operation when removing first element of list.
96 2007-10-17 Jakub Jelinek <jakub@redhat.com>
98 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
99 routine instead of an alias to __new_sem_post.
101 2007-10-15 Jakub Jelinek <jakub@redhat.com>
103 * init.c (__pthread_initialize_minimal): Initialize word to appease
106 2007-10-10 Jakub Jelinek <jakub@redhat.com>
108 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
109 libc.so just clear NAME.
110 (__libc_rwlock_fini): Nop inside of libc.so.
111 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
114 2007-09-02 Ulrich Drepper <drepper@redhat.com>
116 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
117 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
119 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
121 2007-08-21 Ulrich Drepper <drepper@redhat.com>
124 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
125 reclaimed stack if necessary.
126 * Makefile (tests): Add tst-tsd6.
127 * tst-tsd6.c: New file.
129 2007-08-21 Jakub Jelinek <jakub@redhat.com>
131 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
132 Add private argument.
134 2007-08-20 Ulrich Drepper <drepper@redhat.com>
136 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
137 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
139 2007-08-16 Jakub Jelinek <jakub@redhat.com>
141 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
142 (__lll_robust_timedlock): Pass private as last argument to
143 __lll_robust_timedlock_wait.
144 (__lll_unlock): Fix a pasto.
146 2007-08-15 Jakub Jelinek <jakub@redhat.com>
148 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
149 sparc_old_sem): New structs.
150 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
151 (__sem_wait_cleanup): New function.
152 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
153 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
154 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
156 (__old_sem_wait): New function.
157 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
158 nptl/sysdeps/unix/sysv/linux/sparc version.
159 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
161 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
162 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
163 (__new_sem_trywait): Use sparc_old_sem structure.
164 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
165 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
166 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
167 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
168 lll_futex_timed_wait.
169 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
170 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
171 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
173 (__old_sem_post): New function.
174 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
175 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
176 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
177 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
178 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
179 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
181 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
183 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
184 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
185 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
186 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
187 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
188 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
189 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
191 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
192 kernel-features.h and tcb-offsets.h.
193 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
194 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
196 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
198 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
199 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
201 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
202 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
203 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
204 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
205 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
206 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
207 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
209 2007-08-14 Jakub Jelinek <jakub@redhat.com>
211 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
212 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
213 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
214 lll_futex_timed_wait.
216 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
217 __lll_robust_unlock): Rewrite as macros instead of inline functions.
218 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
219 __lll_robust_unlock, __lll_wait_tid): Likewise.
221 2007-08-13 Jakub Jelinek <jakub@redhat.com>
223 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
225 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
226 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
227 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
228 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
229 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
230 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
231 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
232 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
234 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
235 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
236 process private. Switch DW_CFA_advance_loc1 and some
237 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
238 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
239 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
240 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
241 process private. Switch DW_CFA_advance_loc{1,2} and some
242 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
243 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
244 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
245 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
247 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
248 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
249 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
251 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
252 (__pthread_cond_broadcast): Compare %r8 instead of
253 dep_mutex-cond_*(%rdi) with $-1.
254 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
255 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
258 2007-08-13 Ulrich Drepper <drepper@redhat.com>
260 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
262 2007-08-13 Jakub Jelinek <jakub@redhat.com>
264 * allocatestack.c: Include kernel-features.h.
265 * pthread_create.c: Likewise.
266 * pthread_mutex_init.c: Likewise.
268 * pthread_cond_timedwait.c: Likewise.
269 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
270 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
271 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
272 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
273 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
274 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
275 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
277 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
279 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
280 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
281 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
282 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
284 2007-08-12 Jakub Jelinek <jakub@redhat.com>
286 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
287 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
288 byte elements. One of them is the new __shared element.
289 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
290 adjust names of other padding elements.
291 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
292 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
293 byte elements. One of them is the new __shared element.
294 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
295 adjust names of other padding elements.
296 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
297 Renamed __pad1 element to __shared, adjust names of other padding
299 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
300 (pthread_rwlock_t): Likewise.
301 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
304 2007-08-09 Anton Blanchard <anton@samba.org>
306 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
308 2007-08-12 Ulrich Drepper <drepper@redhat.com>
310 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
312 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
314 2007-08-11 Ulrich Drepper <drepper@redhat.com>
316 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
317 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
318 dealing with robust mutexes.
319 * pthread_mutex_timedlock.c: Likewise.
320 * pthread_mutex_trylock.c: Likewise.
321 * pthread_mutex_unlock.c: Likewise.
322 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
324 2007-08-06 Jakub Jelinek <jakub@redhat.com>
326 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
327 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
328 (PTHREAD_MUTEX_PSHARED): Define.
329 * pthread_mutex_init.c (__pthread_mutex_init): Set
330 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
332 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
333 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
334 as second argument to lll_lock.
335 (LLL_MUTEX_TRYLOCK): Take mutex as argument
336 instead of its __data.__lock field.
337 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
338 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
340 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
341 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
342 instead of mutex->__data.__kind directly, pass
343 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
344 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
345 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
346 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
347 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
348 to lll_timedlock, lll_robust_timedlock, lll_unlock and
349 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
350 of mutex->__data.__kind directly.
351 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
352 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
353 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
354 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
355 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
356 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
358 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
359 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
360 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
362 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
363 Take mutex as argument instead of its __data.__lock field, pass
364 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
365 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
367 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
368 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
369 to lll_robust_cond_lock.
370 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
371 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
372 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
373 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
374 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
375 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
377 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
378 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
380 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
381 pshared variable, pass it to lll_lock, lll_unlock,
382 lll_futex_timedwait and lll_futex_wake.
383 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
384 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
386 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
387 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
389 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
390 lll_futex_wake_unlock): Likewise.
391 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
393 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
394 lll_futex_wake_unlock): Likewise.
395 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
397 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
398 lll_futex_wake_unlock): Likewise.
399 (lll_futex_wake): Fix a typo.
400 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
401 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
402 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
403 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
404 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
405 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
406 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
407 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
408 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
409 (__pthread_cond_timedwait): Likewise.
410 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
411 (__condvar_cleanup, __pthread_cond_wait): Likewise.
413 2007-08-05 Jakub Jelinek <jakub@redhat.com>
415 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
416 Don't use CGOTSETUP and CGOTRESTORE macros.
417 (CGOTSETUP, CGOTRESTORE): Remove.
418 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
421 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
423 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
424 definitions for private futexes.
425 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
426 kernel-features.h and lowlevellock.h. Use private futexes if
428 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
429 (__lll_mutex_lock_wait): Rename to
430 (__lll_lock_wait): ... this. Don't compile in for libc.so.
431 (__lll_mutex_timedlock_wait): Rename to ...
432 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
433 Don't compile in for libc.so.
434 (__lll_mutex_unlock_wake): Rename to ...
435 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
436 (__lll_timedwait_tid): Use __NR_gettimeofday.
437 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
438 the header from assembler. Renamed all lll_mutex_* resp.
439 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
440 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
441 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
443 (__lll_lock_wait_private): Add prototype.
444 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
445 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
446 __lll_unlock_wake): Likewise.
447 (lll_lock): Add private argument. Call __lll_lock_wait_private
448 if private is constant LLL_PRIVATE.
449 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
450 lll_timedlock, lll_robust_timedlock): Add private argument.
451 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
452 if private is constant LLL_PRIVATE.
453 (lll_robust_unlock, lll_robust_dead): Add private argument.
454 (lll_lock_t): Remove.
455 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
456 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
457 lll_cond_wake, lll_cond_broadcast): Remove.
458 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
459 kernel-features.h and lowlevellock.h.
460 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
461 (LOAD_FUTEX_WAIT): Define.
462 (__lll_robust_mutex_lock_wait): Rename to ...
463 (__lll_robust_lock_wait): ... this. Add private argument.
464 Use LOAD_FUTEX_WAIT macro.
465 (__lll_robust_mutex_timedlock_wait): Rename to ...
466 (__lll_robust_timedlock_wait): ... this. Add private argument.
467 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
468 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
470 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
471 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
472 __lll_mutex_{lock,unlock}_*.
473 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
474 lowlevellock.h and pthread-errnos.h.
475 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
476 FUTEX_CMP_REQUEUE, EINVAL): Remove.
477 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
478 __lll_mutex_{lock,unlock}_*.
479 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
480 lowlevellock.h and pthread-errnos.h.
481 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
482 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
483 __lll_mutex_{lock,unlock}_*.
484 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
486 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
487 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
488 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
489 (__condvar_tw_cleanup): Likewise.
490 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
492 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
493 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
494 __lll_mutex_{lock,unlock}_*.
495 ( __condvar_w_cleanup): Likewise.
496 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
497 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
498 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
500 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
501 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
502 __lll_mutex_{lock,unlock}_*.
503 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
505 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
506 FUTEX_PRIVATE_FLAG): Remove.
507 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
508 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
509 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
511 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
512 FUTEX_PRIVATE_FLAG): Remove.
513 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
514 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
515 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
517 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
518 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
519 __lll_mutex_{lock,unlock}_*.
520 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
522 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
523 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
524 __lll_mutex_{lock,unlock}_*.
525 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
526 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
527 (__new_sem_post): Use standard initial exec code sequences.
528 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
530 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
531 FUTEX_PRIVATE_FLAG): Remove.
532 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
534 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
535 (__new_sem_trywait): Use standard initial exec code sequences.
536 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
537 (__new_sem_wait): Use standard initial exec code sequences.
539 2007-07-31 Anton Blanchard <anton@samba.org>
541 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
542 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
545 2007-07-31 Jakub Jelinek <jakub@redhat.com>
547 * allocatestack.c (stack_cache_lock): Change type to int.
548 (get_cached_stack, allocate_stack, __deallocate_stack,
549 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
550 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
551 as second argument to lll_lock and lll_unlock macros on
553 * pthread_create.c (__find_in_stack_list): Likewise.
554 (start_thread): Similarly with pd->lock. Use lll_robust_dead
555 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
557 * descr.h (struct pthread): Change lock and setxid_futex field
559 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
560 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
561 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
562 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
564 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
565 * pthread_cond_init.c (__pthread_cond_init): Likewise.
566 * pthreadP.h (__attr_list_lock): Change type to int.
567 * pthread_attr_init.c (__attr_list_lock): Likewise.
568 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
569 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
571 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
572 also for lll_futex_{wake,wait}.
573 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
575 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
576 LLL_SHARED as second argument to lll_{,un}lock.
577 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
578 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
579 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
580 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
582 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
583 as second argument to lll_{,un}lock macros on pd->lock.
584 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
585 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
586 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
587 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
589 * sysdeps/pthread/createthread.c (do_clone, create_thread):
591 * pthread_once.c (once_lock): Change type to int.
592 (__pthread_once): Pass LLL_PRIVATE as second argument to
593 lll_{,un}lock macros on once_lock.
594 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
595 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
596 rwlock->__data.__shared as second argument to them and similarly
598 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
600 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
602 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
603 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
604 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
605 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
606 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
607 to lll_{,un}lock macros on __sem_mappings_lock.
608 * sem_open.c (check_add_mapping): Likewise.
609 (__sem_mappings_lock): Change type to int.
610 * semaphoreP.h (__sem_mappings_lock): Likewise.
611 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
612 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
613 instead of lll_*mutex_*, pass LLL_SHARED as last
615 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
616 pass LLL_SHARED as last argument.
617 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
618 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
619 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
620 pass LLL_SHARED as last argument.
621 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
622 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
623 LLL_SHARED as last argument.
624 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
625 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
627 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
628 __libc_lock_lock_recursive, __libc_lock_unlock,
629 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
630 argument to lll_{,un}lock.
631 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
632 _IO_lock_unlock): Likewise.
633 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
635 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
636 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
638 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
640 (__fork_lock): Change type to int.
641 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
642 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
643 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
645 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
646 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
647 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
649 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
650 pass it through to lll_futex_*wait, only compile in when
652 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
653 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
654 argument and pass it through to lll_futex_*wait.
655 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
656 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
657 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
658 inline functions to __lll_* resp. __lll_robust_*.
659 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
660 (lll_mutex_dead): Add private argument.
661 (__lll_lock_wait_private): New prototype.
662 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
663 __lll_robust_lock_timedwait): Add private argument to prototypes.
664 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
665 call __lll_lock_wait_private, otherwise pass private to
667 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
668 __lll_robust_timedlock): Add private argument, pass it to
669 __lll_*wait functions.
670 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
671 call __lll_unlock_wake_private, otherwise pass private to
673 (__lll_robust_unlock): Add private argument, pass it to
674 __lll_robust_unlock_wake.
675 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
676 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
677 argument, pass it through to __lll_* inline function.
678 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
679 (lll_lock_t): Remove.
680 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
681 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
682 lll_cond_wake, lll_cond_broadcast): Remove.
683 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
684 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
685 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
686 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
687 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
688 the header from assembler. Renamed all lll_mutex_* resp.
689 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
690 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
691 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
692 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
693 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
694 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
695 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
697 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
698 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
699 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
700 (lll_trylock): Likewise, use __lll_trylock_asm, pass
701 MULTIPLE_THREADS_OFFSET as another asm operand.
702 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
703 MULTIPLE_THREADS_OFFSET as last asm operand, call
704 __lll_lock_wait_private if private is constant LLL_PRIVATE,
705 otherwise pass private as another argument to __lll_lock_wait.
706 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
707 lll_timedlock, lll_robust_timedlock): Add private argument, pass
708 private as another argument to __lll_*lock_wait call.
709 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
710 MULTIPLE_THREADS_OFFSET as another asm operand, call
711 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
712 otherwise pass private as another argument to __lll_unlock_wake.
713 (lll_robust_unlock): Add private argument, pass private as another
714 argument to __lll_unlock_wake.
715 (lll_robust_dead): Add private argument, use __lll_private_flag
717 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
718 LLL_MUTEX_LOCK_INITIALIZER.
719 (lll_lock_t): Remove.
720 (LLL_LOCK_INITIALIZER_WAITERS): Define.
721 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
722 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
723 lll_cond_wake, lll_cond_broadcast): Remove.
724 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
725 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
726 2007-05-2{3,9} changes.
727 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
728 kernel-features.h and lowlevellock.h.
729 (LOAD_PRIVATE_FUTEX_WAIT): Define.
730 (LOAD_FUTEX_WAIT): Rewritten.
731 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
733 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
734 (__lll_mutex_lock_wait): Rename to ...
735 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
736 %ecx, %ecx is now private argument. Don't compile in for libc.so.
737 (__lll_mutex_timedlock_wait): Rename to ...
738 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
739 contains private argument. Don't compile in for libc.so.
740 (__lll_mutex_unlock_wake): Rename to ...
741 (__lll_unlock_wake): ... this. %ecx contains private argument.
742 Don't compile in for libc.so.
743 (__lll_timedwait_tid): Use __NR_gettimeofday.
744 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
745 kernel-features.h and lowlevellock.h.
746 (LOAD_FUTEX_WAIT): Define.
747 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
749 (__lll_robust_mutex_lock_wait): Rename to ...
750 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
751 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
753 (__lll_robust_mutex_timedlock_wait): Rename to ...
754 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
755 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
756 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
758 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
759 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
760 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
761 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
762 to __lll_lock_wait in %edx.
763 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
764 Include lowlevellock.h and pthread-errnos.h.
765 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
766 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
767 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
768 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
769 pass LLL_SHARED in %ecx to both __lll_lock_wait and
771 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
772 Include lowlevellock.h and pthread-errnos.h.
773 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
774 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
775 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
776 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
777 pass LLL_SHARED in %ecx to both __lll_lock_wait and
779 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
780 Include lowlevellock.h.
781 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
783 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
784 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
785 pass LLL_SHARED in %ecx to both __lll_lock_wait and
786 __lll_unlock_wake. Use __NR_gettimeofday.
787 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
788 Include lowlevellock.h.
789 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
790 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
791 to __lll_*, pass cond_lock address in %edx rather than %ecx to
792 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
793 and __lll_unlock_wake.
794 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
795 Include lowlevellock.h.
796 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
797 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
798 MUTEX(%ebx) address in %edx rather than %ecx to
799 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
800 and __lll_unlock_wake. Move return value from %ecx to %edx
802 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
803 Include lowlevellock.h.
804 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
806 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
807 MUTEX(%ebp) address in %edx rather than %ecx to
808 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
809 and __lll_unlock_wake. Move return value from %ecx to %edx
810 register. Use __NR_gettimeofday.
811 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
812 Include lowlevellock.h.
813 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
815 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
816 MUTEX(%ebp) address in %edx rather than %ecx to
817 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
818 and __lll_unlock_wake. Move return value from %ecx to %edx
819 register. Use __NR_gettimeofday.
820 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
821 Include lowlevellock.h.
822 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
823 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
824 MUTEX(%edi) address in %edx rather than %ecx to
825 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
826 and __lll_unlock_wake.
827 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
828 Include lowlevellock.h.
829 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
830 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
831 MUTEX(%ebx) address in %edx rather than %ecx to
832 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
833 and __lll_unlock_wake. Move return value from %ecx to %edx
835 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
837 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
839 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
840 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
841 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
843 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
844 (sem_timedwait): Use __NR_gettimeofday.
845 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
847 (LOCK): Don't define.
848 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
850 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
851 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
853 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
854 2007-05-2{3,9} changes.
855 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
856 kernel-features.h and lowlevellock.h.
857 (LOAD_PRIVATE_FUTEX_WAIT): Define.
858 (LOAD_FUTEX_WAIT): Rewritten.
859 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
860 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
861 (__lll_mutex_lock_wait): Rename to ...
862 (__lll_lock_wait): ... this. %esi is now private argument.
863 Don't compile in for libc.so.
864 (__lll_mutex_timedlock_wait): Rename to ...
865 (__lll_timedlock_wait): ... this. %esi contains private argument.
866 Don't compile in for libc.so.
867 (__lll_mutex_unlock_wake): Rename to ...
868 (__lll_unlock_wake): ... this. %esi contains private argument.
869 Don't compile in for libc.so.
870 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
871 kernel-features.h and lowlevellock.h.
872 (LOAD_FUTEX_WAIT): Define.
873 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
874 (__lll_robust_mutex_lock_wait): Rename to ...
875 (__lll_robust_lock_wait): ... this. %esi argument contains private.
876 Use LOAD_FUTEX_WAIT macro.
877 (__lll_robust_mutex_timedlock_wait): Rename to ...
878 (__lll_robust_timedlock_wait): ... this. %esi argument contains
879 private, use LOAD_FUTEX_WAIT macro.
880 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
882 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
883 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
884 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
885 __lll_lock_wait and __lll_unlock_wake.
886 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
887 Include lowlevellock.h and pthread-errnos.h.
888 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
889 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
890 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
891 pass LLL_SHARED in %esi to both __lll_lock_wait and
893 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
894 Include lowlevellock.h and pthread-errnos.h.
895 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
896 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
897 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
898 pass LLL_SHARED in %esi to both __lll_lock_wait and
900 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
901 Include lowlevellock.h.
902 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
903 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
904 pass LLL_SHARED in %esi to both __lll_lock_wait and
906 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
907 Include lowlevellock.h.
908 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
909 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
910 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
911 and __lll_unlock_wake.
912 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
913 Include lowlevellock.h.
914 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
916 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
917 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
918 and __lll_unlock_wake.
919 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
920 Include lowlevellock.h.
921 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
923 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
924 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
925 and __lll_unlock_wake.
926 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
927 Include lowlevellock.h.
928 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
930 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
931 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
932 and __lll_unlock_wake.
933 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
934 Include lowlevellock.h.
935 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
937 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
938 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
939 and __lll_unlock_wake.
940 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
941 Include lowlevellock.h.
942 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
944 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
945 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
946 and __lll_unlock_wake.
947 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
949 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
951 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
952 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
953 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
955 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
956 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
958 (LOCK): Don't define.
959 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
961 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
962 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
963 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
964 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
965 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
966 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
967 (__lll_lock_wait_private): New function.
968 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
969 it to lll_futex_*wait. Don't compile in for libc.so.
970 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
972 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
973 (struct sparc_pthread_barrier): Remove.
974 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
975 struct sparc_pthread_barrier. Pass
976 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
977 and lll_futex_wait macros.
978 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
980 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
981 Include sparc pthread_barrier_wait.c instead of generic one.
983 2007-07-30 Jakub Jelinek <jakub@redhat.com>
985 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
987 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
988 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
990 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
991 (pthread_rwlock_timedwrlock): Likewise.
992 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
993 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
995 2007-07-31 Jakub Jelinek <jakub@redhat.com>
997 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
999 2007-07-26 Jakub Jelinek <jakub@redhat.com>
1001 * tst-locale2.c (useless): Add return statement.
1003 2007-07-24 Jakub Jelinek <jakub@redhat.com>
1005 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1006 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1007 * pthread_create.c (start_thread): Likewise.
1008 * init.c (sighandler_setxid): Likewise.
1009 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1010 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1011 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1012 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1013 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1014 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1015 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1016 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1017 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1019 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1021 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1023 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1024 __rtld_notify): Likewise.
1025 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1026 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1027 __pthread_once): Likewise.
1028 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1029 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1030 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1031 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1032 (lll_futex_wait): Add private argument, define as wrapper around
1033 lll_futex_timed_wait.
1034 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1035 use __lll_private_flag macro.
1036 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1037 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1038 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1039 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1040 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1041 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1042 (lll_futex_wait): Add private argument, define as wrapper around
1043 lll_futex_timed_wait.
1044 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1045 use __lll_private_flag macro.
1046 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1047 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1048 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1050 (lll_futex_timed_wait, lll_futex_wake): Use it.
1051 (lll_private_futex_wait, lll_private_futex_timed_wait,
1052 lll_private_futex_wake): Removed.
1053 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1054 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1055 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1056 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1057 (lll_futex_wait): Add private argument, define as wrapper around
1058 lll_futex_timed_wait.
1059 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1060 use __lll_private_flag macro.
1061 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1062 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1064 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1065 (lll_private_futex_wait, lll_private_futex_timed_wait,
1066 lll_private_futex_wake): Removed.
1067 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1068 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1069 (lll_private_futex_wait, lll_private_futex_timed_wait,
1070 lll_private_futex_wake): Removed.
1071 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1072 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1073 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1074 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1075 (lll_futex_wait): Add private argument, define as wrapper around
1076 lll_futex_timed_wait.
1077 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1078 use __lll_private_flag macro.
1079 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1080 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1082 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1084 (lll_futex_timed_wait, lll_futex_wake): Use it.
1085 (lll_private_futex_wait, lll_private_futex_timed_wait,
1086 lll_private_futex_wake): Removed.
1088 2007-07-27 Jakub Jelinek <jakub@redhat.com>
1090 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1091 of the structure for sparc32.
1093 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
1095 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1097 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1099 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1100 code used when private futexes are assumed.
1101 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1104 2007-07-23 Jakub Jelinek <jakub@redhat.com>
1106 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1107 (__lll_private_flag): Define.
1108 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1109 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1111 (lll_private_futex_wait, lll_private_futex_timedwait,
1112 lll_private_futex_wake): Define as wrapper around non-_private
1114 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1115 (__lll_private_flag): Define.
1116 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1117 (lll_private_futex_wait, lll_private_futex_timedwait,
1118 lll_private_futex_wake): Define as wrapper around non-_private
1121 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
1123 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1124 parameter to lll_futex_wait call.
1125 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1127 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1128 Replace lll_futex_wait with lll_private_futex_wait.
1129 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1130 Add LLL_SHARED parameter to lll_futex_wake().
1132 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1133 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1134 lll_private_futex_wake.
1135 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1136 bit from private parm before syscall.
1137 (lll_futex_timed_wait): Likewise.
1138 (lll_futex_wake): Likewise.
1139 (lll_futex_wake_unlock): Likewise.
1140 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1141 (lll_robust_mutex_unlock): Likewise.
1142 (lll_mutex_unlock_force): Likewise.
1143 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1145 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1147 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1148 compilation when unconditionally using private futexes.
1149 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1150 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1152 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1153 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1155 2007-07-17 Jakub Jelinek <jakub@redhat.com>
1157 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1160 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1162 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1165 2007-05-16 Roland McGrath <roland@redhat.com>
1167 * init.c (__nptl_initial_report_events): New variable.
1168 (__pthread_initialize_minimal_internal): Initialize pd->report_events
1171 2007-06-22 Jakub Jelinek <jakub@redhat.com>
1173 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1174 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1176 2007-06-19 Ulrich Drepper <drepper@redhat.com>
1178 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1181 2007-06-18 Ulrich Drepper <drepper@redhat.com>
1183 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1184 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1185 * pthread_mutex_timedlock.c: Likewise.
1186 * pthread_mutex_trylock.c: Likewise.
1187 * pthread_mutex_unlock.c: Likewise.
1189 2007-06-17 Andreas Schwab <schwab@suse.de>
1191 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1194 2007-06-17 Ulrich Drepper <drepper@redhat.com>
1196 * allocatestack.c (allocate_stack): Make code compile if
1197 __ASSUME_PRIVATE_FUTEX is set.
1199 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1201 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1202 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1203 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1204 (__pthread_rwlock_wrlock): Likewise.
1205 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1206 (pthread_rwlock_timedrdlock): Likewise.
1207 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1208 (pthread_rwlock_timedwrlock): Likewise.
1209 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1210 (__pthread_rwlock_unlock): Likewise.
1212 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1214 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1215 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1216 Split __flags into __flags, __shared, __pad1 and __pad2.
1217 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1218 futexes if they are available.
1219 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1220 in libc-lowlevellock.S allow using private futexes.
1221 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1222 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
1223 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
1224 to call lll_futex_timed_wait. Add lll_private_futex_wait,
1225 lll_private_futex_timed_wait and lll_private_futex_wake.
1226 (lll_robust_mutex_unlock): Fix typo.
1227 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1228 field in futex command setup.
1229 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1230 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1231 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1232 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1233 if they are available. Remove clear_once_control.
1234 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1235 futexes if they are available.
1236 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1237 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1238 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1239 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1240 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1241 Wake only when there are waiters.
1242 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1243 support. Indicate that there are waiters. Remove unnecessary
1244 extra cancellation test.
1245 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
1246 left-over duplication of __sem_wait_cleanup.
1248 2007-06-07 Ulrich Drepper <drepper@redhat.com>
1250 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1251 parameter to lll_futex_wait, lll_futex_timed_wait, and
1252 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
1253 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1254 lll_private_futex_wake.
1255 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1256 * allocatestack.c: Adjust use of lll_futex_* macros.
1258 * lowlevellock.h: Likewise.
1259 * pthread_barrier_wait.c: Likewise.
1260 * pthread_cond_broadcast.c: Likewise.
1261 * pthread_cond_destroy.c: Likewise.
1262 * pthread_cond_signal.c: Likewise.
1263 * pthread_cond_timedwait.c: Likewise.
1264 * pthread_cond_wait.c: Likewise.
1265 * pthread_create.c: Likewise.
1266 * pthread_mutex_lock.c: Likewise.
1267 * pthread_mutex_setprioceiling.c: Likewise.
1268 * pthread_mutex_timedlock.c: Likewise.
1269 * pthread_mutex_unlock.c: Likewise.
1270 * pthread_rwlock_timedrdlock.c: Likewise.
1271 * pthread_rwlock_timedwrlock.c: Likewise.
1272 * pthread_rwlock_unlock.c: Likewise.
1273 * sysdeps/alpha/tls.h: Likewise.
1274 * sysdeps/i386/tls.h: Likewise.
1275 * sysdeps/ia64/tls.h: Likewise.
1276 * sysdeps/powerpc/tls.h: Likewise.
1277 * sysdeps/pthread/aio_misc.h: Likewise.
1278 * sysdeps/pthread/gai_misc.h: Likewise.
1279 * sysdeps/s390/tls.h: Likewise.
1280 * sysdeps/sh/tls.h: Likewise.
1281 * sysdeps/sparc/tls.h: Likewise.
1282 * sysdeps/unix/sysv/linux/fork.c: Likewise.
1283 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1284 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1285 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1286 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1287 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1288 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1289 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1290 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1291 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1293 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1294 * sysdeps/x86_64/tls.h: Likewise.
1296 2007-05-29 Ulrich Drepper <drepper@redhat.com>
1298 * pthread_getattr_np.c: No need to install a cancellation handler,
1299 this is no cancellation point.
1300 * pthread_getschedparam.c: Likewise.
1301 * pthread_setschedparam.c: Likewise.
1302 * pthread_setschedprio.c: Likewise.
1303 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1305 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1306 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1307 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1308 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1309 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1310 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1311 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1312 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1313 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1314 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1315 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1316 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1318 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1319 whether there are more than one thread makes no sense here since
1320 we only call the slow path if the locks are taken.
1321 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1323 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1324 COND_NWAITERS_SHIFT.
1325 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1327 * pthread_cond_init.c: Likewise.
1328 * pthread_cond_timedwait.c: Likewise.
1329 * pthread_cond_wait.c: Likewise.
1330 * pthread_condattr_getclock.c: Likewise.
1331 * pthread_condattr_setclock.c: Likewise.
1332 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1333 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1334 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1335 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1336 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1338 2007-05-28 Jakub Jelinek <jakub@redhat.com>
1340 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1343 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1345 (THREAD_GSCOPE_GET_FLAG): Remove.
1346 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1347 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1349 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1350 (THREAD_GSCOPE_GET_FLAG): Remove.
1351 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1352 instead of THREAD_GSCOPE_GET_FLAG.
1353 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
1355 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1356 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1357 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1358 THREAD_GSCOPE_WAIT): Define.
1359 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1360 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1361 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1362 THREAD_GSCOPE_WAIT): Define.
1363 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1364 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1365 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1366 THREAD_GSCOPE_WAIT): Define.
1367 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1368 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1369 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1370 THREAD_GSCOPE_WAIT): Define.
1372 2007-05-24 Richard Henderson <rth@redhat.com>
1374 * descr.h (struct pthread): Add header.gscope_flag.
1375 * sysdeps/alpha/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.
1380 2007-05-27 Ulrich Drepper <drepper@redhat.com>
1382 * init.c: Make it compile with older kernel headers.
1384 * tst-initializers1.c: Show through exit code which test failed.
1386 * pthread_rwlock_init.c: Also initialize __shared field.
1387 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1388 element in rwlock structure into four byte elements. One of them is
1389 the new __shared element.
1390 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1392 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1393 __shared, adjust names of other padding elements.
1394 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1395 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1396 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1397 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1399 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1400 futex to use private operations if possible.
1401 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1403 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1405 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1406 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1407 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1408 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1410 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1412 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1413 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1415 2007-05-26 Ulrich Drepper <drepper@redhat.com>
1417 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1418 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1419 * pthread_rwlock_timedrdlock.c: Likewise.
1420 * pthread_rwlock_tryrdlock.c: Likewise.
1422 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1425 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1426 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1427 duplication of __sem_wait_cleanup.
1429 * allocatestack.c: Revert last change.
1431 * sysdeps/i386/tls.h: Likewise.
1432 * sysdeps/x86_64/tls.h: Likewise.
1433 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1435 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1437 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1439 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1440 * pthread_barrier_init.c: Set private flag if pshared and private
1441 futexes are supported.
1442 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1443 private field in futex command setup.
1444 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1446 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1448 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1450 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1451 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1452 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1453 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1454 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1456 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1457 * sem_init.c (__new_sem_init): Rewrite to initialize all three
1458 fields in the structure.
1459 (__old_sem_init): New function.
1460 * sem_open.c: Initialize all fields of the structure.
1461 * sem_getvalue.c: Adjust for renamed element.
1462 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1463 (gen-as-const-headers): Add structsem.sym.
1464 * sysdeps/unix/sysv/linux/structsem.sym: New file.
1465 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1466 struct new_sem. Add struct old_sem.
1467 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1468 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1469 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1470 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1471 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1472 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1473 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1474 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1475 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1476 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1477 * tst-sem10.c: New file.
1478 * tst-sem11.c: New file.
1479 * tst-sem12.c: New file.
1480 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1483 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1484 Jakub Jelinek <jakub@redhat.com>
1486 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1487 Move __pthread_enable_asynccancel right before futex syscall.
1488 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1491 2007-05-24 Jakub Jelinek <jakub@redhat.com>
1493 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1494 THREAD_COPY_PRIVATE_FUTEX): Define.
1495 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1496 THREAD_COPY_PRIVATE_FUTEX): Define.
1497 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1498 * init.c (__pthread_initialize_minimal_internal): Use
1499 THREAD_SET_PRIVATE_FUTEX.
1501 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1502 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1503 THREAD_GSCOPE_FLAG_WAIT): Define.
1504 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1505 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1506 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1508 (THREAD_GSCOPE_GET_FLAG): Define.
1509 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1510 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1511 instead of ->header.gscope_flag directly.
1513 2007-05-23 Ulrich Drepper <drepper@redhat.com>
1515 * init.c (__pthread_initialize_minimal_internal): Check whether
1516 private futexes are available.
1517 * allocatestack.c (allocate_stack): Copy private_futex field from
1518 current thread into the new stack.
1519 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1520 futexes if they are available.
1521 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1522 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1523 in libc-lowlevellock.S allow using private futexes.
1524 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1525 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1527 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1528 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1529 if they are available.
1530 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1531 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1532 * sysdeps/i386/tcb-offsets.sym: Likewise.
1533 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1534 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1536 2007-05-21 Ulrich Drepper <drepper@redhat.com>
1538 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1539 Remove ptr_wait_lookup_done again.
1540 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1541 (__pthread_initialize_minimal_internal): Initialize
1542 _dl_wait_lookup_done pointer in _rtld_global directly.
1543 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1544 Remove code to code _dl_wait_lookup_done.
1545 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1548 2007-05-21 Jakub Jelinek <jakub@redhat.com>
1550 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1551 pthread_mutex_init failed with ENOTSUP.
1553 2007-05-19 Ulrich Drepper <drepper@redhat.com>
1555 * allocatestack.c (__wait_lookup_done): New function.
1556 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1557 Add ptr_wait_lookup_done.
1558 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1559 * pthreadP.h: Declare __wait_lookup_done.
1560 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1561 Define macros to implement reference handling of global scope.
1562 * sysdeps/x86_64/tls.h: Likewise.
1563 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1564 Initialize GL(dl_wait_lookup_done).
1566 2007-05-17 Ulrich Drepper <drepper@redhat.com>
1569 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1571 * pthread_mutex_timedlock.c: Likewise.
1572 * pthread_mutex_trylock.c: Likewise.
1573 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1575 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1576 * tst-robust9.c: New file.
1577 * tst-robustpi9.c: New file.
1579 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1580 unnecessary extra cancellation test.
1582 2007-05-14 Ulrich Drepper <drepper@redhat.com>
1584 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1585 extra cancellation test.
1586 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1588 2007-05-10 Ulrich Drepper <drepper@redhat.com>
1590 * descr.h (struct pthread): Rearrange members to fill hole in
1593 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1594 (__pthread_setaffinity_new): If syscall was successful and
1595 RESET_VGETCPU_CACHE is defined, use it before returning.
1596 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1598 2007-05-10 Jakub Jelinek <jakub@redhat.com>
1601 * tst-align2.c: Include stackinfo.h.
1602 * tst-getpid1.c: Likewise.
1604 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
1607 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1608 * tst-getpid1.c (do_test): Likewise.
1611 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1612 (allocate_stack): Likewise.
1614 2007-05-07 Ulrich Drepper <drepper@redhat.com>
1616 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1617 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1618 (__lll_robust_timedlock_wait): Likewise.
1619 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1621 2007-05-06 Mike Frysinger <vapier@gentoo.org>
1624 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1625 * tst-cancel4.c (tf_fdatasync): New test.
1627 2007-04-27 Ulrich Drepper <drepper@redhat.com>
1630 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1631 check mutexes like normal mutexes.
1634 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1635 Initialize the whole sigevent structure to appease valgrind.
1637 2007-04-25 Ulrich Drepper <drepper@redhat.com>
1639 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1640 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1642 2007-04-06 Ulrich Drepper <drepper@redhat.com>
1644 * tst-locale1.c: Avoid warnings.
1645 * tst-locale2.c: Likewise.
1647 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
1649 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1650 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1652 2007-03-16 Jakub Jelinek <jakub@redhat.com>
1654 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1655 __extern_always_inline where appropriate.
1656 * sysdeps/pthread/pthread.h: Likewise.
1658 2007-03-13 Richard Henderson <rth@redhat.com>
1660 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1661 separate cfi regions for the two subsections.
1663 2007-02-25 Ulrich Drepper <drepper@redhat.com>
1665 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1666 new thread, don't just decrement it.
1667 Patch by Suzuki K P <suzuki@in.ibm.com>.
1669 2007-02-21 Ulrich Drepper <drepper@redhat.com>
1671 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1672 PTHFCT_CALL definition.
1674 2007-02-18 Ulrich Drepper <drepper@redhat.com>
1676 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1677 available, don't use it.
1679 2007-02-09 Jakub Jelinek <jakub@redhat.com>
1681 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1682 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1683 call into the kernel to delay.
1685 2007-01-18 Ulrich Drepper <drepper@redhat.com>
1687 * tst-initializers1.c: We want to test the initializers as seen
1688 outside of libc, so undefined _LIBC.
1690 * pthread_join.c (cleanup): Avoid warning.
1692 2007-01-17 Ulrich Drepper <drepper@redhat.com>
1694 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1695 (__lll_timedwait_tid): Add unwind info.
1697 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1698 function table, mangle the pointers.
1699 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1700 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1701 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1702 demangle pointers before use.
1703 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1705 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1706 * sysdeps/pthread/setxid.h: Likewise.
1708 2007-01-12 Ulrich Drepper <drepper@redhat.com>
1710 * tst-rwlock7.c: Show some more information in case of correct
1713 2007-01-11 Ulrich Drepper <drepper@redhat.com>
1715 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1716 (lll_futex_timed_wait): Undo part of last change, don't negate
1719 2007-01-10 Ulrich Drepper <drepper@redhat.com>
1721 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
1722 FUTEX_CMP_REQUEUE and lll_futex_requeue.
1724 2006-12-28 David S. Miller <davem@davemloft.net>
1726 * shlib-versions: Fix sparc64 linux target specification.
1728 2007-01-10 Jakub Jelinek <jakub@redhat.com>
1730 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1731 Adjust include path for pthread_barrier_wait.c move.
1733 2006-12-21 Jakub Jelinek <jakub@redhat.com>
1735 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1736 tid isn't reread from pd->tid in between ESRCH test and the syscall.
1738 2006-12-06 Jakub Jelinek <jakub@redhat.com>
1740 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1741 6 argument cancellable syscalls.
1742 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1743 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1744 6 argument cancellable syscalls.
1745 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1747 2006-12-09 Ulrich Drepper <drepper@redhat.com>
1749 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1750 (__rtld_mrlock_initialize): Add missing closing parenthesis.
1752 2006-10-30 Jakub Jelinek <jakub@redhat.com>
1754 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1755 __sync_lock_release instead of __sync_lock_release_si.
1757 2006-10-29 Jakub Jelinek <jakub@redhat.com>
1759 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1761 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1762 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1763 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1764 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1765 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1766 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1767 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1768 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1769 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1770 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1771 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1773 2006-10-27 Ulrich Drepper <drepper@redhat.com>
1775 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1776 * pthread_barrier_wait.c: ...here.
1777 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1778 * pthread_cond_broadcast.c: ...here.
1779 * sysdeps/pthread/pthread_cond_signal.c: Move to...
1780 * pthread_cond_signal.c: ...here.
1781 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1782 * pthread_cond_timedwait.c: ...here.
1783 * sysdeps/pthread/pthread_cond_wait.c: Move to...
1784 * pthread_cond_wait.c: ...here.
1785 * sysdeps/pthread/pthread_once.c: Move to...
1786 * pthread_once.c: ...here.
1787 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1788 * pthread_rwlock_rdlock.c: ...here.
1789 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1790 * pthread_rwlock_timedrdlock.c: ...here.
1791 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1792 * pthread_rwlock_timedwrlock.c: ...here.
1793 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1794 * pthread_rwlock_unlock.c: ...here.
1795 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1796 * pthread_rwlock_wrlock.c: ...here.
1797 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1798 * pthread_spin_destroy.c: ...here.
1799 * sysdeps/pthread/pthread_spin_init.c: Move to...
1800 * pthread_spin_init.c: ...here.
1801 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1802 * pthread_spin_unlock.c: ...here.
1803 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1804 * pthread_getcpuclockid.c: ...here.
1806 * init.c: USE_TLS support is now always enabled.
1807 * tst-tls5.h: Likewise.
1808 * sysdeps/alpha/tls.h: Likewise.
1809 * sysdeps/i386/tls.h: Likewise.
1810 * sysdeps/ia64/tls.h: Likewise.
1811 * sysdeps/powerpc/tls.h: Likewise.
1812 * sysdeps/s390/tls.h: Likewise.
1813 * sysdeps/sh/tls.h: Likewise.
1814 * sysdeps/sparc/tls.h: Likewise.
1815 * sysdeps/x86_64/tls.h: Likewise.
1817 2006-10-27 Jakub Jelinek <jakub@redhat.com>
1819 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1820 __rtld_mrlock_change): Update oldval if atomic compare and exchange
1823 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1824 Define to THREAD_SELF->header.multiple_threads.
1825 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1827 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1829 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1830 (SINGLE_THREAD_P): Likewise.
1831 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1832 (SINGLE_THREAD_P): Likewise.
1833 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1834 (SINGLE_THREAD_P): Likewise.
1835 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1836 (SINGLE_THREAD_P): Likewise.
1837 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1839 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1840 (SINGLE_THREAD_P): Likewise.
1841 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1842 (SINGLE_THREAD_P): Likewise.
1843 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1846 2006-10-26 Jakub Jelinek <jakub@redhat.com>
1848 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1849 by default rather than 2_3_3.
1851 2006-10-17 Jakub Jelinek <jakub@redhat.com>
1853 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1854 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1855 atomic_* instead of catomic_* macros.
1857 2006-10-12 Ulrich Drepper <drepper@redhat.com>
1860 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1861 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1862 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1863 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1864 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1865 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1866 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1867 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1868 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1869 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1870 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1871 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1872 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1874 2006-10-11 Ulrich Drepper <drepper@redhat.com>
1876 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1877 cancelable syscalls with six parameters.
1879 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1880 operations instead of atomic_*.
1882 2006-10-09 Ulrich Drepper <drepper@redhat.com>
1884 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
1886 2006-10-07 Ulrich Drepper <drepper@redhat.com>
1888 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1889 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1890 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1892 * pthread_attr_setstack.c: Allow overwriting the version number of the
1894 * pthread_attr_setstacksize.c: Likewise.
1895 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1897 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1898 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
1900 2006-09-24 Ulrich Drepper <drepper@redhat.com>
1903 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
1904 Patch by Petr Baudis.
1906 2006-09-18 Jakub Jelinek <jakub@redhat.com>
1908 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
1910 * tst-cancel2.c (tf): Loop as long as something was written.
1912 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1914 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
1915 mutexes wake all mutexes.
1916 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
1917 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1918 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1920 2006-09-12 Ulrich Drepper <drepper@redhat.com>
1922 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
1923 to guarantee the thread is always canceled.
1925 2006-09-08 Jakub Jelinek <jakub@redhat.com>
1927 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
1929 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
1930 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
1931 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1932 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1933 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1935 2006-09-08 Ulrich Drepper <drepper@redhat.com>
1938 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
1939 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1940 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1941 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1942 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1943 * Makefile (tests): Add tst-cond22.
1944 * tst-cond22.c: New file.
1946 2006-09-05 Ulrich Drepper <drepper@redhat.com>
1949 * descr.h (struct pthread): Add parent_cancelhandling.
1950 * sysdeps/pthread/createthread.c (create_thread): Pass parent
1951 cancelhandling value to child.
1952 * pthread_create.c (start_thread): If parent thread was canceled
1953 reset the SIGCANCEL mask.
1954 * Makefile (tests): Add tst-cancel25.
1955 * tst-cancel25.c: New file.
1957 2006-09-05 Jakub Jelinek <jakub@redhat.com>
1958 Ulrich Drepper <drepper@redhat.com>
1960 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
1961 counterp if it is already zero.
1962 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
1964 2006-03-04 Jakub Jelinek <jakub@redhat.com>
1965 Roland McGrath <roland@redhat.com>
1967 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
1968 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1969 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
1970 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1971 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1972 lll_robust_mutex_timedlock, lll_mutex_unlock,
1973 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1974 Add _L_*_ symbols around the subsection.
1975 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
1976 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
1978 2006-03-03 Jakub Jelinek <jakub@redhat.com>
1979 Roland McGrath <roland@redhat.com>
1981 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1982 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1983 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
1984 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1985 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1986 lll_robust_mutex_timedlock, lll_mutex_unlock,
1987 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1988 Add _L_*_ symbols around the subsection.
1989 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
1990 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1992 2006-08-31 Ulrich Drepper <drepper@redhat.com>
1994 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
1995 change because it can disturb too much existing code. If real hard
1996 reader preference is needed we'll introduce another type.
1997 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1998 (pthread_rwlock_timedwrlock): Likewise.
1999 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2002 2006-08-30 Ulrich Drepper <drepper@redhat.com>
2004 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2006 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2007 (pthread_rwlock_timedwrlock): Likewise.
2008 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2011 2006-08-25 Jakub Jelinek <jakub@redhat.com>
2013 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2014 Only define ifdef SHARED.
2016 2006-08-23 Ulrich Drepper <drepper@redhat.com>
2018 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2019 (free_stacks): ...here.
2020 (__free_stack_cache): New function.
2021 * pthreadP.h: Declare __free_stack_cache.
2022 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2024 * init.c (pthread_functions): Initialize ptr_freeres.
2025 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2026 New freeres function.
2028 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
2031 * Makefile (extra-objs): Add modules to extra-test-objs instead.
2033 2006-08-20 Ulrich Drepper <drepper@redhat.com>
2035 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2036 _XOPEN_REALTIME_THREADS.
2038 2006-08-15 Jakub Jelinek <jakub@redhat.com>
2040 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2041 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2042 HAVE_CLOCK_GETTIME_VSYSCALL.
2043 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2045 2006-08-14 Jakub Jelinek <jakub@redhat.com>
2047 * sysdeps/unix/sysv/linux/bits/posix_opt.h
2048 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2049 * descr.h (struct priority_protection_data): New type.
2050 (struct pthread): Add tpp field.
2051 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2052 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2053 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2054 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2056 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2057 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2058 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2059 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2061 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2063 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2064 * pthread_mutexattr_getprioceiling.c
2065 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2066 in the SCHED_FIFO priority range.
2067 * pthread_mutexattr_setprioceiling.c
2068 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2069 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2070 if mutex is not TPP. Ceiling is now in __data.__lock.
2071 * pthread_mutex_setprioceiling.c: Include stdbool.h.
2072 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
2073 is now in __data.__lock. Add locking.
2074 * pthread_create.c (__free_tcb): Free pd->tpp structure.
2075 * Makefile (libpthread-routines): Add tpp.
2076 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2077 * tst-tpp.h: New file.
2078 * tst-mutexpp1.c: New file.
2079 * tst-mutexpp6.c: New file.
2080 * tst-mutexpp10.c: New file.
2081 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2082 * tst-mutex6.c (TEST_FUNCTION): Likewise.
2084 2006-08-12 Ulrich Drepper <drepper@redhat.com>
2087 * pthread_join.c (pthread_join): Account for self being canceled
2088 when checking for deadlocks.
2089 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
2090 (tf1): Don't print anything after pthread_join returns, this would be
2091 another cancellation point.
2093 * tst-join6.c: New file.
2094 * Makefile (tests): Add tst-join6.
2096 2006-08-03 Ulrich Drepper <drepper@redhat.com>
2099 * pthread_setspecific.c (__pthread_setspecific): Check
2100 out-of-range index before checking for unused key.
2102 * sysdeps/pthread/gai_misc.h: New file.
2104 2006-08-01 Ulrich Drepper <drepper@redhat.com>
2106 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
2107 file. Don't use sysctl.
2108 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
2109 overwrite the file if this is likely not true.
2111 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
2113 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2114 * Makefile (tests): Add tst-getpid3.
2115 * tst-getpid3.c: New file.
2117 2006-07-30 Roland McGrath <roland@redhat.com>
2119 * Makefile (libpthread-routines): Add ptw-sigsuspend.
2121 * sysdeps/unix/sysv/linux/i386/not-cancel.h
2122 (pause_not_cancel): New macro.
2123 (nanosleep_not_cancel): New macro.
2124 (sigsuspend_not_cancel): New macro.
2125 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2126 nanosleep_not_cancel macro from <not-cancel.h>.
2127 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2128 macro from <not-cancel.h>.
2130 2006-07-28 Ulrich Drepper <drepper@redhat.com>
2131 Jakub Jelinek <jakub@redhat.com>
2133 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2134 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
2135 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2136 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2137 * pthread_mutex_init.c: Add support for priority inheritance mutex.
2138 * pthread_mutex_lock.c: Likewise.
2139 * pthread_mutex_timedlock.c: Likewise.
2140 * pthread_mutex_trylock.c: Likewise.
2141 * pthread_mutex_unlock.c: Likewise.
2142 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2144 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2145 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2146 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2147 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2148 pthread-pi-defines.sym.
2149 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2150 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2151 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2152 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2153 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2154 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2155 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2156 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2157 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2158 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2159 _POSIX_THREAD_PRIO_INHERIT to 200112L.
2160 * tst-mutex1.c: Adjust to allow use in PI mutex test.
2161 * tst-mutex2.c: Likewise.
2162 * tst-mutex3.c: Likewise.
2163 * tst-mutex4.c: Likewise.
2164 * tst-mutex5.c: Likewise.
2165 * tst-mutex6.c: Likewise.
2166 * tst-mutex7.c: Likewise.
2167 * tst-mutex7a.c: Likewise.
2168 * tst-mutex8.c: Likewise.
2169 * tst-mutex9.c: Likewise.
2170 * tst-robust1.c: Likewise.
2171 * tst-robust7.c: Likewise.
2172 * tst-robust8.c: Likewise.
2173 * tst-mutexpi1.c: New file.
2174 * tst-mutexpi2.c: New file.
2175 * tst-mutexpi3.c: New file.
2176 * tst-mutexpi4.c: New file.
2177 * tst-mutexpi5.c: New file.
2178 * tst-mutexpi6.c: New file.
2179 * tst-mutexpi7.c: New file.
2180 * tst-mutexpi7a.c: New file.
2181 * tst-mutexpi8.c: New file.
2182 * tst-mutexpi9.c: New file.
2183 * tst-robust1.c: New file.
2184 * tst-robust2.c: New file.
2185 * tst-robust3.c: New file.
2186 * tst-robust4.c: New file.
2187 * tst-robust5.c: New file.
2188 * tst-robust6.c: New file.
2189 * tst-robust7.c: New file.
2190 * tst-robust8.c: New file.
2191 * Makefile (tests): Add the new tests.
2193 * pthread_create.c (start_thread): Add some casts to avoid warnings.
2194 * pthread_mutex_destroy.c: Remove unneeded label.
2196 2006-07-01 Ulrich Drepper <drepper@redhat.com>
2198 * pthread_mutex_init.c (__pthread_mutex_init): Move some
2199 computations to compile time.
2201 2006-06-04 Ulrich Drepper <drepper@redhat.com>
2203 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2205 2006-05-15 Ulrich Drepper <drepper@redhat.com>
2207 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2209 2006-05-11 Ulrich Drepper <drepper@redhat.com>
2211 * pthread_key_create.c (__pthread_key_create): Do away with
2212 __pthread_keys_lock.
2214 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2215 (__kernel_cpumask_size): Mark as hidden.
2216 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2218 * sem_open.c (__sem_mappings_lock): Mark as hidden.
2219 * semaphoreP.h (__sem_mappings_lock): Likewise.
2221 2006-05-10 Ulrich Drepper <drepper@redhat.com>
2223 * pthread_atfork.c: Mark __dso_handle as hidden.
2225 2006-05-09 Ulrich Drepper <drepper@redhat.com>
2228 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2229 the reload problem. Change the one path in pthread_cancel_init
2230 which causes the problem. Force gcc to reload. Simplify callers.
2231 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2232 (_Unwind_GetBSP): Undo last patch.
2234 2006-05-07 Ulrich Drepper <drepper@redhat.com>
2236 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2237 function pointer is reloaded after pthread_cancel_init calls.
2240 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2241 pointers are reloaded after pthread_cancel_init calls.
2243 2006-05-01 Ulrich Drepper <drepper@redhat.com>
2245 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2248 2006-04-27 Ulrich Drepper <drepper@redhat.com>
2250 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2251 Allocate new object which is passed to timer_sigev_thread so that
2252 the timer can be deleted before the new thread is scheduled.
2254 2006-04-26 Roland McGrath <roland@redhat.com>
2256 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2258 2006-04-08 Ulrich Drepper <drepper@redhat.com>
2260 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2261 suffix for conditional jumps.
2262 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2263 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2264 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2265 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2266 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2267 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2269 * init.c (sigcancel_handler): Compare with correct PID even if the
2270 thread is in the middle of a fork call.
2271 (sighandler_setxid): Likewise.
2272 Reported by Suzuki K P <suzuki@in.ibm.com> .
2274 2006-04-07 Jakub Jelinek <jakub@redhat.com>
2276 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2278 2006-04-06 Ulrich Drepper <drepper@redhat.com>
2280 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2281 fails [Coverity CID 105].
2283 2006-04-05 Ulrich Drepper <drepper@redhat.com>
2285 * sysdeps/pthread/pthread.h: Add nonnull attributes.
2287 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
2290 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2291 Define __lll_rel_instr using lwsync.
2293 2006-03-27 Ulrich Drepper <drepper@redhat.com>
2295 * allocatestack.c (allocate_stack): Always initialize robust_head.
2296 * descr.h: Define struct robust_list_head.
2297 (struct pthread): Use robust_list_head in robust mutex list definition.
2298 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2299 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2300 (__pthread_initialize_minimal_internal): Register robust_list with
2302 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2303 Declare __set_robust_list_avail.
2304 * pthread_create.c (start_thread): Register robust_list of new thread.
2305 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2307 * pthread_mutex_destroy.c: For robust mutexes don't look at the
2308 number of users, it's unreliable.
2309 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2310 set_robust_list syscall is available.
2311 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2312 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2313 Set robust_head.list_op_pending before trying to lock a robust mutex.
2314 * pthread_mutex_timedlock.c: Likewise.
2315 * pthread_mutex_trylock.c: Likewise.
2316 * pthread_mutex_unlock.c: Likewise for unlocking.
2317 * Makefile (tests): Add tst-robust8.
2318 * tst-robust8.c: New file.
2320 2006-03-08 Andreas Schwab <schwab@suse.de>
2322 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2323 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2325 2006-03-05 Roland McGrath <roland@redhat.com>
2327 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2328 and $config_os doesn't match *linux*.
2330 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
2332 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2333 Use __syscall_error.
2334 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2335 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2336 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2337 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2338 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2339 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2341 2006-03-02 Ulrich Drepper <drepper@redhat.com>
2343 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2345 2006-03-01 Ulrich Drepper <drepper@redhat.com>
2347 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2348 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2350 (__lll_robust_timedlock_wait): Likewise.
2351 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2352 (__lll_robust_lock_wait): Likewise.
2353 (__lll_robust_timedlock_wait): Likewise.
2354 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2355 (__lll_robust_lock_wait): Likewise.
2356 (__lll_robust_timedlock_wait): Likewise.
2358 2006-03-01 Jakub Jelinek <jakub@redhat.com>
2360 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2361 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2362 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2363 lll_robust_mutex_unlock): Define.
2364 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2366 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
2368 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2369 instead of <clone.S>.
2371 2006-02-27 Jakub Jelinek <jakub@redhat.com>
2373 * Makefile (libpthread-routines): Add
2374 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2375 and pthread_mutex_[sg]etprioceiling.
2376 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2377 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2378 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2379 pthread_mutex_setprioceiling.
2380 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2381 PTHREAD_PRIO_PROTECT): New enum values.
2382 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2383 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2384 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2386 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2387 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2388 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2390 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2391 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2392 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2393 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2394 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2395 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2396 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2398 * pthread_mutex_getprioceiling.c: New file.
2399 * pthread_mutex_setprioceiling.c: New file.
2400 * pthread_mutexattr_getprioceiling.c: New file.
2401 * pthread_mutexattr_setprioceiling.c: New file.
2402 * pthread_mutexattr_getprotocol.c: New file.
2403 * pthread_mutexattr_setprotocol.c: New file.
2405 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2407 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2409 2006-02-27 Roland McGrath <roland@redhat.com>
2411 * sysdeps/pthread/Subdirs: List nptl here too.
2412 * configure (libc_add_on_canonical): New variable.
2414 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2416 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2417 self to get main source tree's file.
2418 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2419 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2420 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2421 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2422 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2423 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2424 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2425 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2426 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2427 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2428 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2429 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2430 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2432 * Makefile: Use $(sysdirs) in vpath directive.
2434 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2435 (CPPFLAGS-timer_routines.c): Likewise.
2437 * Makeconfig (includes): Variable removed.
2439 2006-02-26 Roland McGrath <roland@redhat.com>
2441 * sysdeps/generic/pt-raise.c: Moved to ...
2442 * pt-raise.c: ... here.
2443 * sysdeps/generic/lowlevellock.h: Moved to ...
2444 * lowlevellock.h: ... here.
2446 2006-02-23 Roland McGrath <roland@redhat.com>
2448 * descr.h (struct pthread): Add final member `end_padding'.
2449 (PTHREAD_STRUCT_END_PADDING): Use it.
2451 2006-02-20 Roland McGrath <roland@redhat.com>
2453 * sysdeps/mips: Directory removed, saved in ports repository.
2454 * sysdeps/unix/sysv/linux/mips: Likewise.
2456 2006-02-18 Ulrich Drepper <drepper@redhat.com>
2458 * tst-robust1.c: Add second mutex to check that the mutex list is
2461 2006-02-17 Jakub Jelinek <jakub@redhat.com>
2463 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2464 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2465 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2466 lll_robust_mutex_unlock): New macros.
2467 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2468 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2469 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2470 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2471 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2473 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2475 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2477 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2479 2006-02-17 Ulrich Drepper <drepper@redhat.com>
2481 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2482 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2483 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2484 (lll_robust_mutex_unlock): Likewise.
2486 2006-02-13 Jakub Jelinek <jakub@redhat.com>
2488 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2489 Set robust_list.__next rather than robust_list.
2490 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2491 (__pthread_list_t): New typedef.
2492 (pthread_mutex_t): Replace __next and __prev fields with __list.
2493 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2494 (__pthread_list_t): New typedef.
2495 (pthread_mutex_t): Replace __next and __prev fields with __list.
2496 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2497 (__pthread_list_t, __pthread_slist_t): New typedefs.
2498 (pthread_mutex_t): Replace __next and __prev fields with __list.
2499 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2500 (__pthread_list_t, __pthread_slist_t): New typedefs.
2501 (pthread_mutex_t): Replace __next and __prev fields with __list.
2502 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2503 (__pthread_list_t, __pthread_slist_t): New typedefs.
2504 (pthread_mutex_t): Replace __next and __prev fields with __list.
2505 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2506 (__pthread_slist_t): New typedef.
2507 (pthread_mutex_t): Replace __next field with __list.
2509 2006-02-15 Ulrich Drepper <drepper@redhat.com>
2511 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2512 PTHREAD_MUTEX_OWNERDEAD.
2513 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2514 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2515 * Makefile (libpthread-routines): Add lowlevelrobustlock.
2516 * pthread_create.c (start_thread): Very much simplify robust_list loop.
2517 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2518 to PTHREAD_MUTEX_INCONSISTENT.
2519 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2520 * pthread_mutex_lock.c: Reimplement robust mutex handling.
2521 * pthread_mutex_trylock.c: Likewise.
2522 * pthread_mutex_timedlock.c: Likewise.
2523 * pthread_mutex_unlock.c: Likewise.
2524 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2525 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2526 lowlevelrobustlock.sym.
2527 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2528 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2530 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2531 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2532 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2533 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2534 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2536 2006-02-12 Ulrich Drepper <drepper@redhat.com>
2538 * allocatestack.c (allocate_stack): Initialize robust_list.
2539 * init.c (__pthread_initialize_minimal_internal): Likewise.
2540 * descr.h (struct xid_command): Pretty printing.
2541 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2542 robust_list. Adjust macros.
2543 * pthread_create.c (start_thread): Adjust robust_list handling.
2544 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2545 but the owner for all robust mutex types.
2546 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2547 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
2548 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2549 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2551 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2552 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2554 2006-02-08 Jakub Jelinek <jakub@redhat.com>
2556 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2557 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2559 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2561 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2563 (lll_futex_timed_wait): Define.
2565 2006-01-19 Ulrich Drepper <drepper@redhat.com>
2567 * tst-cancel4.c: Test ppoll.
2569 2006-01-18 Andreas Jaeger <aj@suse.de>
2572 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2573 (pthread_mutex_t): Follow changes for other archs. Based on patch
2574 by Jim Gifford <patches@jg555.com>.
2576 2006-01-13 Richard Henderson <rth@redhat.com>
2578 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2580 2006-01-10 Roland McGrath <roland@redhat.com>
2582 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2583 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2584 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2585 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2586 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2587 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2588 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2589 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2590 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2591 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2593 2006-01-09 Roland McGrath <roland@redhat.com>
2595 * tst-initializers1-c89.c: New file.
2596 * tst-initializers1-c99.c: New file.
2597 * tst-initializers1-gnu89.c: New file.
2598 * tst-initializers1-gnu99.c: New file.
2599 * Makefile (tests): Add them.
2600 (CFLAGS-tst-initializers1-c89.c): New variable.
2601 (CFLAGS-tst-initializers1-c99.c): New variable.
2602 (CFLAGS-tst-initializers1-gnu89.c): New variable.
2603 (CFLAGS-tst-initializers1-gnu99.c): New variable.
2605 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2606 Use __extension__ on anonymous union definition.
2607 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2608 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2609 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2610 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2611 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2613 2006-01-08 Jakub Jelinek <jakub@redhat.com>
2615 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2616 Don't give the union a name because it changes the mangled name.
2617 Instead name the struct for __data.
2618 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2620 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2623 2006-01-09 Jakub Jelinek <jakub@redhat.com>
2625 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2626 stack bias to mc_ftp field.
2628 2006-01-07 Ulrich Drepper <drepper@redhat.com>
2630 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2631 being too clever and reloading the futex value where it shouldn't.
2633 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2635 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2638 2006-01-06 Jakub Jelinek <jakub@redhat.com>
2640 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2643 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2645 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2646 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2647 rename in tcbhead_t.
2649 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2650 Don't give the union a name because it changes the mangled name.
2651 Instead name the struct for __data.
2652 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2653 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2654 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2655 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2656 * pthread_create.c (start_thread): Adjust robust mutex free loop.
2657 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2659 2006-01-05 Ulrich Drepper <drepper@redhat.com>
2661 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2663 (lll_futex_timed_wait): Define.
2664 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2665 * sysdeps/pthread/aio_misc.h: New file.
2667 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
2669 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2671 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
2673 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2674 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2675 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2677 2006-01-04 Ulrich Drepper <drepper@redhat.com>
2679 * tst-cancel24.cc: Use C headers instead of C++ headers.
2681 2006-01-03 Jakub Jelinek <jakub@redhat.com>
2683 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2684 sparc-linux configured glibc.
2685 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2686 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2687 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2688 atomic_compare_and_exchange_val_24_acq instead of
2689 atomic_compare_and_exchange_val_acq.
2690 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2691 instead of atomic_exchange_rel.
2692 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2693 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2695 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2697 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2698 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2699 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2700 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2701 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2702 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2704 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2706 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2707 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2708 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2710 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2712 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2714 2006-01-03 Ulrich Drepper <drepper@redhat.com>
2716 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2719 2006-01-02 Jakub Jelinek <jakub@redhat.com>
2721 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2722 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2723 THREAD_COPY_POINTER_GUARD): Define.
2724 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2725 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2727 2006-01-01 Ulrich Drepper <drepper@redhat.com>
2729 * version.c: Update copyright year.
2731 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2733 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2734 .eh_frame section, use cfi_* directives.
2735 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2737 2005-12-30 Ulrich Drepper <drepper@redhat.com>
2739 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2742 2005-12-29 Ulrich Drepper <drepper@redhat.com>
2744 * sysdeps/pthread/sigaction.c: Removed.
2745 * sigaction.c: New file.
2746 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2748 2005-12-28 Ulrich Drepper <drepper@redhat.com>
2750 * Makefile (tests): Add tst-signal7.
2751 * tst-signal7.c: New file.
2753 2005-12-27 Roland McGrath <roland@redhat.com>
2755 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2756 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2757 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2758 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2759 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2760 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2761 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2762 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2763 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2764 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2765 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2767 2005-12-27 Jakub Jelinek <jakub@redhat.com>
2769 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2770 and __prev field to pthread_mutex_t.
2771 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2772 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2773 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2774 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2775 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2778 2005-12-26 Ulrich Drepper <drepper@redhat.com>
2780 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2781 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2782 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2783 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2784 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2785 and PTHREAD_MUTEXATTR_FLAG_BITS.
2786 * descr.h (struct pthread): Add robust_list field and define
2787 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2788 * pthread_mutexattr_getrobust.c: New file.
2789 * pthread_mutexattr_setrobust.c: New file.
2790 * pthread_mutex_consistent.c: New file.
2791 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2792 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2793 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2794 Adjust pthread_mutex_t initializers.
2795 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2796 field to pthread_mutex_t.
2797 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2798 and __prev field to pthread_mutex_t.
2799 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2800 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2801 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2802 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2803 * pthread_mutexattr_gettype.c: Likewise.
2804 * pthread_mutexattr_setpshared.c: Likewise.
2805 * pthread_mutexattr_settype.c: Likewise.
2806 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2807 Initialize mutex kind according to robust flag.
2808 * pthread_mutex_lock.c: Implement local robust mutex.
2809 * pthread_mutex_timedlock.c: Likewise.
2810 * pthread_mutex_trylock.c: Likewise.
2811 * pthread_mutex_unlock.c: Likewise.
2812 * pthread_create.c (start_thread): Mark robust mutexes which remained
2814 * tst-robust1.c: New file.
2815 * tst-robust2.c: New file.
2816 * tst-robust3.c: New file.
2817 * tst-robust4.c: New file.
2818 * tst-robust5.c: New file.
2819 * tst-robust6.c: New file.
2820 * tst-robust7.c: New file.
2821 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2822 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2823 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2824 tst-robust5, tst-robust6, and tst-robust7.
2826 * tst-typesizes.c: New file.
2827 * Makefile (tests): Add tst-typesizes.
2829 * tst-once3.c: More debug output.
2831 2005-12-24 Ulrich Drepper <drepper@redhat.com>
2833 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2834 missing after last change.
2836 * version.c: Update copyright year.
2838 2005-12-23 Ulrich Drepper <drepper@redhat.com>
2840 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2841 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2842 * pthread_mutex_trylock.c: Likewise.
2843 * pthread_mutex_timedlock.c: Likewise.
2844 * pthread_mutex_unlock.c: Likewise.
2846 2005-12-22 Roland McGrath <roland@redhat.com>
2848 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2849 so that #include_next's search location is not reset to the -I..
2850 directory where <nptl/...> can be found.
2852 2005-12-22 Ulrich Drepper <drepper@redhat.com>
2855 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2856 Fix unwind info. Remove useless branch prediction prefix.
2857 * tst-cancel24.cc: New file.
2858 * Makefile: Add rules to build and run tst-cancel24.
2860 2005-12-21 Roland McGrath <roland@redhat.com>
2862 * libc-cancellation.c: Use <> rather than "" #includes.
2863 * pt-cleanup.c: Likewise.
2864 * pthread_create.c: Likewise.
2865 * pthread_join.c: Likewise.
2866 * pthread_timedjoin.c: Likewise.
2867 * pthread_tryjoin.c: Likewise.
2868 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2869 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2870 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2871 * unwind.c: Likewise.
2873 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2875 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2876 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2877 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2878 THREAD_COPY_POINTER_GUARD): Define.
2880 2005-12-19 Jakub Jelinek <jakub@redhat.com>
2882 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2884 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2885 THREAD_COPY_POINTER_GUARD): Define.
2886 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2887 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2888 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2889 THREAD_COPY_POINTER_GUARD): Define.
2890 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2891 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2892 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2893 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2894 Use PTR_DEMANGLE for B0 if defined.
2896 2005-12-17 Ulrich Drepper <drepper@redhat.com>
2898 * pthread_create.c (__pthread_create_2_1): Use
2899 THREAD_COPY_POINTER_GUARD if available.
2900 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2901 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2902 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
2903 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
2904 * sysdeps/x86_64/tls.h: Likewise.
2906 2005-12-15 Roland McGrath <roland@redhat.com>
2908 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
2910 2005-12-13 Ulrich Drepper <drepper@redhat.com>
2912 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
2914 * errno-loc.c: New file.
2916 2005-12-12 Roland McGrath <roland@redhat.com>
2918 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
2919 adjustments before choosing stack size. Update minimum stack size
2920 calculation to match allocate_stack change.
2922 2005-12-12 Ulrich Drepper <drepper@redhat.com>
2924 * allocatestack.c (allocate_stack): Don't demand that there is an
2925 additional full page available on the stack beside guard, TLS, the
2928 2005-11-24 Ulrich Drepper <drepper@redhat.com>
2930 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2931 (__cleanup_fct_attribute): Use __regparm__ not regparm.
2933 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
2934 compiling 32-bit code we must define __cleanup_fct_attribute.
2936 005-11-24 Jakub Jelinek <jakub@redhat.com>
2939 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
2940 __attribute__ instead of __attribute.
2941 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2942 (__cleanup_fct_attribute): Likewise.
2944 2005-11-17 Jakub Jelinek <jakub@redhat.com>
2946 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
2947 a write barrier before writing libgcc_s_getcfa.
2949 2005-11-06 Ulrich Drepper <drepper@redhat.com>
2951 * sysdeps/unix/sysv/linux/configure: Removed.
2953 2005-11-05 Ulrich Drepper <drepper@redhat.com>
2955 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
2956 optional init_array/fini_array support.
2958 2005-10-24 Roland McGrath <roland@redhat.com>
2960 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
2961 versioned_symbol use.
2963 2005-10-16 Roland McGrath <roland@redhat.com>
2965 * init.c (__pthread_initialize_minimal_internal): Even when using a
2966 compile-time default stack size, apply the minimum that allocate_stack
2967 will require, and round up to page size.
2969 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
2971 * Makefile ($(test-modules)): Remove static pattern rule.
2973 2005-10-14 Jakub Jelinek <jakub@redhat.com>
2974 Ulrich Drepper <drepper@redhat.com>
2976 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
2977 alignment in callback function.
2978 * Makefile: Add rules to build and run tst-align3.
2979 * tst-align3.c: New file.
2981 2005-10-03 Jakub Jelinek <jakub@redhat.com>
2983 * allocatestack.c (setxid_signal_thread): Add
2984 INTERNAL_SYSCALL_DECL (err).
2986 2005-10-02 Jakub Jelinek <jakub@redhat.com>
2988 * allocatestack.c (setxid_signal_thread): Need to use
2989 atomic_compare_and_exchange_bool_acq.
2991 2005-10-01 Ulrich Drepper <drepper@redhat.com>
2992 Jakub Jelinek <jakub@redhat.com>
2994 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
2996 (struct pthread): Move specific_used field to avoid padding.
2997 Add setxid_futex field.
2998 * init.c (sighandler_setxid): Reset setxid flag and release the
3000 * allocatestack.c (setxid_signal_thread): New function. Broken
3001 out of the bodies of the two loops in __nptl_setxid. For undetached
3002 threads check whether they are exiting and if yes, don't send a signal.
3003 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3004 * pthread_create.c (start_thread): For undetached threads, check
3005 whether setxid bit is set. If yes, wait until signal has been
3008 * allocatestack.c (STACK_VARIABLES): Initialize them.
3009 * pthread_create.c (__pthread_create_2_1): Initialize pd.
3011 2004-09-02 Jakub Jelinek <jakub@redhat.com>
3013 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3014 waiters, awake all waiters on the associated mutex.
3016 2005-09-22 Roland McGrath <roland@redhat.com>
3018 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3019 ../sysdeps/x86_64/hp-timing.h).
3021 2005-08-29 Jakub Jelinek <jakub@redhat.com>
3023 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3024 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3025 (lll_futex_wake_unlock): Define.
3026 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3027 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3028 (lll_futex_wake_unlock): Define.
3029 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3030 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3031 (lll_futex_wake_unlock): Define.
3032 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3033 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3034 (lll_futex_wake_unlock): Define.
3035 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3036 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3037 (lll_futex_wake_unlock): Define.
3038 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3039 lll_futex_wake_unlock.
3040 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3041 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3042 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3043 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3044 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3045 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3047 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3049 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3050 Fix typo in register name.
3052 2005-08-23 Ulrich Drepper <drepper@redhat.com>
3054 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3055 Use __sigfillset. Document that sigfillset does the right thing wrt
3058 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3061 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3062 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3063 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3064 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3065 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3066 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3068 * Makefile (tests): Add tst-initializers1.
3069 (CFLAGS-tst-initializers1.c): Set.
3070 * tst-initializers1.c: New test.
3072 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3074 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3075 Make sure __flags are located at offset 48 from the start of the
3078 2005-07-02 Roland McGrath <roland@redhat.com>
3080 * Makeconfig: Comment fix.
3082 2005-07-05 Jakub Jelinek <jakub@redhat.com>
3084 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3085 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3086 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3087 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3088 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3089 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3090 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3091 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3092 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3093 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3095 2005-06-25 Jakub Jelinek <jakub@redhat.com>
3097 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3098 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3099 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3101 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3102 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3103 field. Put in sysinfo field unconditionally.
3104 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3105 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3106 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3107 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3109 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3110 * pthread_create.c (__pthread_create_2_1): Use
3111 THREAD_COPY_STACK_GUARD macro.
3112 * Makefile: Add rules to build and run tst-stackguard1{,-static}
3114 * tst-stackguard1.c: New file.
3115 * tst-stackguard1-static.c: New file.
3117 2005-06-14 Alan Modra <amodra@bigpond.net.au>
3119 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3120 Invoke CGOTSETUP and CGOTRESTORE.
3121 (CGOTSETUP, CGOTRESTORE): Define.
3123 2005-05-29 Richard Henderson <rth@redhat.com>
3125 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3126 (tf_write, tf_writev): Use it.
3127 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
3130 2005-05-23 Jakub Jelinek <jakub@redhat.com>
3132 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3133 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3134 __librt_*_asynccancel@local.
3136 2005-05-17 Alan Modra <amodra@bigpond.net.au>
3138 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3139 all occurrences of JUMPTARGET. Instead append @local to labels.
3141 2005-05-20 Jakub Jelinek <jakub@redhat.com>
3143 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3144 size/alignment of struct pthread rather than tcbhead_t.
3145 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3147 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3149 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3152 2005-05-19 Richard Henderson <rth@redhat.com>
3154 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3155 __sync_val_compare_and_swap, not explicit _si variant.
3156 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3158 2005-05-03 Ulrich Drepper <drepper@redhat.com>
3161 * sysdeps/pthread/pthread.h: Avoid empty initializers.
3163 2005-05-03 Jakub Jelinek <jakub@redhat.com>
3165 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3166 .eh_frame section, use cfi_* directives.
3168 2005-04-27 Jakub Jelinek <jakub@redhat.com>
3170 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3173 2005-04-27 Ulrich Drepper <drepper@redhat.com>
3176 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3179 2005-04-27 Roland McGrath <roland@redhat.com>
3181 * Makefile (tests): Remove tst-clock2.
3183 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3184 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3185 translating to the kernel clockid_t for our own process/thread clock.
3187 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3189 2005-04-15 Jakub Jelinek <jakub@redhat.com>
3191 * old_pthread_cond_init.c: Include <errno.h>.
3192 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3193 process shared or uses clock other than CLOCK_REALTIME.
3194 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3196 2005-04-13 David S. Miller <davem@davemloft.net>
3198 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3199 * sysdeps/sparc/sparc64/clone.S: New file.
3201 2005-04-05 Jakub Jelinek <jakub@redhat.com>
3204 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3205 __inline instead of inline.
3206 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3208 2005-03-31 Jakub Jelinek <jakub@redhat.com>
3210 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3211 functionally equivalent, but shorter instructions.
3212 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3213 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3214 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3216 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3217 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3218 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3219 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3220 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3221 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3222 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3224 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3225 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3226 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3227 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3228 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3230 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
3232 * sysdeps/mips/Makefile: New file.
3233 * sysdeps/mips/nptl-sysdep.S: New file.
3234 * sysdeps/mips/tcb-offsets.sym: New file.
3235 * sysdeps/mips/pthread_spin_lock.S: New file.
3236 * sysdeps/mips/pthread_spin_trylock.S: New file.
3237 * sysdeps/mips/pthreaddef.h: New file.
3238 * sysdeps/mips/tls.h: New file.
3239 * sysdeps/mips/jmpbuf-unwind.h: New file.
3240 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3241 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3242 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3243 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3244 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3245 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3246 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3247 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3248 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3249 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3251 2005-03-23 Ulrich Drepper <drepper@redhat.com>
3254 * pthread_create.c (__pthread_create_2_1): Rename syscall error
3257 2005-03-10 Jakub Jelinek <jakub@redhat.com>
3259 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3261 2005-02-25 Roland McGrath <roland@redhat.com>
3263 * alloca_cutoff.c: Correct license text.
3264 * tst-unload.c: Likewise.
3265 * sysdeps/pthread/allocalim.h: Likewise.
3266 * sysdeps/pthread/pt-initfini.c: Likewise.
3267 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3268 * sysdeps/pthread/bits/sigthread.h: Likewise.
3269 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3270 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3272 2005-02-16 Roland McGrath <roland@redhat.com>
3274 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3275 Use unsigned int * for ptr_nthreads.
3277 2005-02-14 Alan Modra <amodra@bigpond.net.au>
3280 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3283 2005-02-07 Richard Henderson <rth@redhat.com>
3286 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3289 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
3291 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3292 order of arguments in invocation of atomic_add_zero.
3294 2005-01-26 Jakub Jelinek <jakub@redhat.com>
3297 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3298 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3299 at least gotntpoff relocation and addition.
3300 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3302 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3304 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3307 2005-01-06 Ulrich Drepper <drepper@redhat.com>
3309 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3310 entry for static tls deallocation fix.
3311 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3312 also contains information whether the memory pointed to is static
3314 * sysdeps/i386/tls.h: Likewise.
3315 * sysdeps/ia64/tls.h: Likewise.
3316 * sysdeps/powerpc/tls.h: Likewise.
3317 * sysdeps/s390/tls.h: Likewise.
3318 * sysdeps/sh/tls.h: Likewise.
3319 * sysdeps/sparc/tls.h: Likewise.
3320 * sysdeps/x86_64/tls.h: Likewise.
3322 2004-12-27 Ulrich Drepper <drepper@redhat.com>
3324 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3326 2004-12-21 Jakub Jelinek <jakub@redhat.com>
3328 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3330 * Makefile (tests): Add tst-align2.
3331 * tst-align2.c: New test.
3332 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3333 -mpreferred-stack-boundary=4.
3335 2004-12-18 Roland McGrath <roland@redhat.com>
3337 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3338 New file removed withdrawn for the moment.
3340 2004-12-17 Richard Henderson <rth@redhat.com>
3342 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3343 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3345 2004-12-16 Ulrich Drepper <drepper@redhat.com>
3347 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3348 Increased PTHREAD_STACK_MIN.
3350 * tst-context1.c (stacks): Use bigger stack size.
3352 2004-12-16 Jakub Jelinek <jakub@redhat.com>
3354 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3355 * sysdeps/sparc/tcb-offsets.sym: Add TID.
3357 2004-12-15 Jakub Jelinek <jakub@redhat.com>
3359 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3360 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3361 * sysdeps/s390/tcb-offsets.sym (TID): Add.
3363 2004-12-15 Ulrich Drepper <drepper@redhat.com>
3365 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3367 2004-12-14 Ulrich Drepper <drepper@redhat.com>
3369 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3370 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3372 * tst-getpid1.c: If child crashes, report this first. Print which
3375 2004-12-09 Ulrich Drepper <drepper@redhat.com>
3377 * init.c (__pthread_initialize_minimal_internal): Also unblock
3380 2004-12-01 Jakub Jelinek <jakub@redhat.com>
3382 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3383 _POSIX_THREAD_CPUTIME): Define to 0.
3384 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3385 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3386 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3387 __timer_signal_thread_tclk): Remove.
3388 (init_module): Remove their initialization.
3389 (thread_cleanup): Remove their cleanup assertions.
3390 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3391 __timer_signal_thread_tclk): Remove.
3392 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3393 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3394 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3396 2004-12-07 Jakub Jelinek <jakub@redhat.com>
3398 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3399 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3401 * Makefile (tests): Add tst-getpid2.
3402 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3403 (do_test): Use it. Use __clone2 instead of clone on ia64.
3404 * tst-getpid2.c: New test.
3406 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3408 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3410 2004-12-04 Ulrich Drepper <drepper@redhat.com>
3412 * Makefile (tests): Add tst-getpid1.
3413 * tst-getpid1.c: New file.
3414 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3415 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3417 2004-12-02 Roland McGrath <roland@redhat.com>
3419 * Makefile (libpthread-nonshared): Variable removed.
3420 ($(objpfx)libpthread_nonshared.a): Target removed.
3421 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3422 These are now handled by generic magic from
3423 libpthread-static-only-routines being set.
3425 2004-11-27 Ulrich Drepper <drepper@redhat.com>
3427 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3428 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3429 _POSIX_THREAD_PRIO_PROTECT): Define.
3430 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3431 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3432 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3434 2004-11-26 Jakub Jelinek <jakub@redhat.com>
3436 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3437 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3438 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3439 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3440 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3441 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3442 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3444 2004-11-24 Ulrich Drepper <drepper@redhat.com>
3446 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3448 * Makefile (libpthread-routines): Add pthread_setschedprio.
3449 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3450 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3451 * pthread_setschedprio.c: New file.
3453 2004-11-20 Jakub Jelinek <jakub@redhat.com>
3455 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3456 * pthread_cancel.c (pthread_create): Likewise.
3458 * Makefile (libpthread-routines): Add vars.
3459 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3460 * init.c (__default_stacksize, __is_smp): Remove.
3462 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3463 and define a wrapper macro.
3464 (PTHREAD_STATIC_FN_REQUIRE): Define.
3465 * allocatestack.c (__find_thread_by_id): Undefine.
3466 * pthread_create (__pthread_keys): Remove.
3467 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3468 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3469 PTHREAD_STATIC_FN_REQUIRE.
3471 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3473 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3474 parameter to REGISTER macro.
3476 2004-11-17 Roland McGrath <roland@redhat.com>
3478 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3479 Make sure SIGCANCEL is blocked as well.
3481 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3483 * sysdeps/pthread/setxid.h: New file.
3484 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3485 (struct xid_command): Add forward decl.
3486 (struct pthread_functions): Change return type of __nptl_setxid hook
3488 * pthreadP.h (__nptl_setxid): Change return type to int.
3489 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3490 calling thread, return its return value and set errno on failure.
3491 * descr.h (struct xid_command): Change id type to long array.
3493 * Makefile: Add rules to build and test tst-setuid1 and
3495 * tst-setuid1.c: New test.
3496 * tst-setuid1-static.c: New test.
3498 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3500 * Makefile (tests): Add tst-exit3.
3501 * tst-exit3.c: New test.
3503 2004-11-09 Ulrich Drepper <drepper@redhat.com>
3505 * Makefile (tests): Add tst-exit2.
3506 * tst-exit2.c: New file.
3508 2004-11-09 Roland McGrath <roland@redhat.com>
3511 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3512 here, before calling clone.
3513 * pthread_create.c (start_thread): Don't do it here.
3515 2004-11-02 Jakub Jelinek <jakub@redhat.com>
3517 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3519 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3521 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3522 Set ETIMEDOUT to errno when time is up. Tweak to avoid
3525 2004-10-28 Jakub Jelinek <jakub@redhat.com>
3527 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3528 if sched_priority is not between minprio and maxprio.
3530 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3532 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3533 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3535 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3536 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3538 2004-10-24 Ulrich Drepper <drepper@redhat.com>
3540 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3541 not-cancelable I/O functions.
3543 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3545 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3546 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3547 make sure 2 is stored in the futex and we looked at the old value.
3548 Fix a few other problems to return the correct value.
3550 2004-10-14 Richard Henderson <rth@redhat.com>
3552 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3555 2004-10-06 Jakub Jelinek <jakub@redhat.com>
3557 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3558 of pthread-functions.h and pthreaddef.h.
3559 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3561 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3562 Change __data.__nwaiters from int to unsigned int.
3564 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3565 sysconf (_SC_THREAD_CPUTIME) returns negative value.
3567 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3570 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3571 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3573 2004-10-06 Ulrich Drepper <drepper@redhat.com>
3575 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
3576 test fails, remove message queue.
3577 (tf_msgsnd): Likewise.
3579 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3581 * tst-clock1.c: Change #ifdef to #if defined.
3582 * tst-clock2.c: Likewise.
3583 * tst-cond11.c: Likewise.
3585 * sysdeps/pthread/timer_create.c (timer_create): Use
3586 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3587 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3590 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3592 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3593 _POSIX_THREAD_CPUTIME): Define to 0.
3595 2004-10-04 Ulrich Drepper <drepper@redhat.com>
3597 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3598 and _POSIX_THREAD_CPUTIME to zero.
3599 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3600 * tst-barrier2.c: Fix testing for POSIX feature.
3601 * tst-clock1.c: Likewise.
3602 * tst-clock2.c: Likewise.
3603 * tst-cond11.c: Likewise.
3604 * tst-cond4.c: Likewise.
3605 * tst-cond6.c: Likewise.
3606 * tst-flock2.c: Likewise.
3607 * tst-mutex4.c: Likewise.
3608 * tst-mutex9.c: Likewise.
3609 * tst-rwlock12.c: Likewise.
3610 * tst-rwlock4.c: Likewise.
3611 * tst-signal1.c: Likewise.
3612 * tst-spin2.c: Likewise.
3613 * sysdeps/pthread/posix-timer.h: Likewise.
3614 * sysdeps/pthread/timer_create.c: Likewise.
3615 * sysdeps/pthread/timer_routines.c: Likewise.
3617 2004-10-01 Ulrich Drepper <drepper@redhat.com>
3619 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3620 (__lll_mutex_timedlock_wait): Address futex correctly.
3622 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3623 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3624 make sure 2 is stored in the futex and we looked at the old value.
3625 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3626 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
3627 which might very well made the code not working at all before.
3630 2004-09-28 Ulrich Drepper <drepper@redhat.com>
3632 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3633 allow SIGSETXID to be sent.
3634 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3635 for SIGSETXID to be defined.
3636 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3637 SIGSETXID cannot be blocked.
3639 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3640 Add __extension__ to long long types.
3641 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3642 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3643 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3644 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3645 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3646 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3647 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3649 2004-09-25 Ulrich Drepper <drepper@redhat.com>
3651 * descr.h (struct pthread): Add stopped_start field.
3652 * sysdeps/pthread/createthread.c (create_thread): Set
3653 start_stopped flag in descriptor for new thread appropriately.
3654 * pthread_create.c (start_thread): Only take lock to be stopped on
3655 startup if stopped_start flag says so.
3657 2004-09-24 Ulrich Drepper <drepper@redhat.com>
3659 * pthread_create.c (__pthread_create_2_1): Remember whether thread
3660 is created detached and if yes, do not try to free the stack in case
3661 the thread creation failed.
3662 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3663 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3664 case there has been no error. [BZ #405]
3666 * pthread_create.c (start_thread): Don't wait for scheduler data
3667 etc to be set at the beginning of the function. The cancellation
3668 infrastructure must have been set up. And enable async
3669 cancellation before potentially going to sleep. [BZ #401]
3671 2004-09-20 Ulrich Drepper <drepper@redhat.com>
3673 * Versions: Remove exports for pthread_set*id_np functions.
3674 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3676 * Makefile: Don't build pthread_set*id code for now.
3678 2004-09-19 Ulrich Drepper <drepper@redhat.com>
3680 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3682 * allocatestack.c (__nptl_setxid): New function.
3683 * descr.h (struct xid_command): Define type.
3684 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3685 (sighandler_setxid): New function.
3686 (__pthread_initialize_minimal): Register sighandler_setxid for
3688 * pt-allocrtsig.c: Update comment.
3689 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
3690 Declare __nptl_setxid.
3691 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3692 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3693 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3694 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3695 and pthread_setresuid_np.
3696 * pthread_setgid_np.c: New file.
3697 * pthread_setuid_np.c: New file.
3698 * pthread_setegid_np.c: New file.
3699 * pthread_seteuid_np.c: New file.
3700 * pthread_setregid_np.c: New file.
3701 * pthread_setreuid_np.c: New file.
3702 * pthread_setresgid_np.c: New file.
3703 * pthread_setresuid_np.c: New file.
3704 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3705 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3706 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3707 and pthread_setresuid_np.
3708 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3709 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3710 pthread_setregid, and pthread_setresgid.
3712 2004-09-18 Ulrich Drepper <drepper@redhat.com>
3714 * allocatestack.c (allocate_stack): Return EAGAIN instead of
3715 ENOMEM when out of memory.
3717 2004-09-10 Roland McGrath <roland@redhat.com>
3720 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3721 code, since we don't try to use the broken CLONE_STOPPED any more.
3722 * pthread_create.c (start_thread): Likewise.
3724 2004-09-15 Richard Henderson <rth@redhat.com>
3726 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3728 2004-09-01 David Mosberger <davidm@hpl.hp.com>
3730 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3731 (__libc_unwind_longjmp): Delete macro and declare as function.
3732 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3733 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3735 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3736 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3737 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3739 2004-09-12 Ulrich Drepper <drepper@redhat.com>
3741 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3743 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3744 types also for __USE_XOPEN2K.
3745 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3746 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3747 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3748 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3749 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3750 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3751 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3754 2004-09-08 Ulrich Drepper <drepper@redhat.com>
3756 * sysdeps/pthread/pthread.h
3757 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3758 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3759 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3760 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3763 2004-09-07 Ulrich Drepper <drepper@redhat.com>
3765 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3766 PSEUDO to be used with . prefix.
3768 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3769 Use atomic_increment instead of atomic_exchange_and_add.
3770 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3772 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3774 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3777 * allocatestack.c (allocate_stack): Use atomic_increment_val
3778 instead of atomic_exchange_and_add.
3779 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3780 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3782 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3785 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3786 the initialization function might throw.
3788 2005-09-05 Richard Henderson <rth@redhat.com>
3790 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3791 Move definition inside libpthread, libc, librt check. Provide
3792 definition for rtld.
3794 2004-09-02 Ulrich Drepper <drepper@redhat.com>
3796 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3797 * sysdeps/i386/jmpbuf-unwind.h: Likewise
3798 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3799 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3800 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3801 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3802 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3803 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3806 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3807 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3808 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3810 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3811 Decrement __nwaiters. If pthread_cond_destroy has been called and
3812 this is the last waiter, signal pthread_cond_destroy caller and
3813 avoid using the pthread_cond_t structure after unlock.
3814 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3815 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3816 Read clock type from the least significant bits of __nwaiters instead
3818 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3819 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3821 2004-08-31 Jakub Jelinek <jakub@redhat.com>
3824 * Makefile (tests): Add tst-cond20 and tst-cond21.
3825 * tst-cond20.c: New test.
3826 * tst-cond21.c: New test.
3827 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3828 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3830 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3832 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3833 (pthread_cond_t): Likewise.
3834 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3836 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3838 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3840 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3841 (cond_nwaiters): New.
3843 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3844 if there are waiters not signalled yet.
3845 Wait until all already signalled waiters wake up.
3846 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3847 __nwaiters. If pthread_cond_destroy has been called and this is the
3848 last waiter, signal pthread_cond_destroy caller and avoid using
3849 the pthread_cond_t structure after unlock.
3850 (__pthread_cond_wait): Increment __nwaiters in the beginning,
3851 decrement it when leaving. If pthread_cond_destroy has been called
3852 and this is the last waiter, signal pthread_cond_destroy caller.
3853 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3854 Likewise. Read clock type from the least significant bits of
3855 __nwaiters instead of __clock.
3856 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3857 whether clock ID can be encoded in COND_CLOCK_BITS bits.
3858 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3859 clock type just from the last COND_CLOCK_BITS bits of value.
3860 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3861 instead of __clock, just from second bit of condattr's value.
3863 2004-08-30 Jakub Jelinek <jakub@redhat.com>
3865 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3866 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
3868 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3870 2004-08-15 Roland McGrath <roland@frob.com>
3872 * pthread_atfork.c: Update copyright terms including special exception
3873 for these trivial files, which are statically linked into executables
3874 that use dynamic linking for the significant library code.
3876 2004-08-09 Jakub Jelinek <jakub@redhat.com>
3878 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3879 pthread_rwlock_rdlock.
3880 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3881 Decrease __nr_readers_queued after reacquiring lock.
3882 * sysdeps/pthread/pthread_rwlock_timedrdlock
3883 (pthread_rwlock_timedrdlock): Likewise.
3884 Reported by Bob Cook <bobcook47@hotmail.com>.
3886 2004-08-11 Jakub Jelinek <jakub@redhat.com>
3888 * tst-rwlock14.c (tf): Read main thread handle from *ARG
3889 before pthread_barrier_wait.
3891 2004-08-07 Ulrich Drepper <drepper@redhat.com>
3893 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3894 Remove unnecessary exception handling data.
3896 2004-07-23 Jakub Jelinek <jakub@redhat.com>
3899 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3900 instead of clockid_t.
3902 2004-07-21 Roland McGrath <roland@redhat.com>
3904 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
3906 2004-07-19 Roland McGrath <roland@redhat.com>
3908 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
3910 2004-07-02 Roland McGrath <roland@redhat.com>
3912 * configure: Don't exit.
3914 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3916 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3917 (__pthread_cond_timedwait): Check for invalid nanosecond in
3920 2004-07-07 Ulrich Drepper <drepper@redhat.com>
3922 * Makefile: Add rules to build and run tst-fini1.
3923 * tst-fini1.c: New file.
3924 * tst-fini1mod.c: New file.
3926 2004-07-05 Ulrich Drepper <drepper@redhat.com>
3928 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
3929 if no cancellation support is needed.
3930 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3931 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3932 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3933 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3934 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3935 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3936 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3937 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3938 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3940 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
3941 only if not already defined.
3943 2004-07-05 Jakub Jelinek <jakub@redhat.com>
3945 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
3946 constraint "m" instead of "0" for futex.
3948 * shlib-versions: Add powerpc64-.*-linux.*.
3950 2004-07-04 Jakub Jelinek <jakub@redhat.com>
3952 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
3953 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
3955 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
3956 1 billion and 64-bit tv_nsec which is valid when truncated to 32
3959 2004-06-29 Roland McGrath <roland@redhat.com>
3961 * Banner: NPTL no longer has its own version number.
3962 * Makefile (nptl-version): Variable removed.
3963 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
3964 using $(version), the glibc version number.
3966 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3968 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
3969 Fix branch offset for a PLT entry.
3970 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
3972 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3974 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
3976 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
3979 2004-06-28 Jakub Jelinek <jakub@redhat.com>
3981 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
3984 2004-06-28 Jakub Jelinek <jakub@redhat.com>
3986 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3987 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
3989 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
3990 (pthread_rwlock_timedrdlock): Likewise.
3992 2004-06-22 Jakub Jelinek <jakub@redhat.com>
3994 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3995 Set __r7 to val, not mutex.
3997 2004-06-27 Ulrich Drepper <drepper@redhat.com>
3999 * Makefile: Add rules to build tst-rwlock14.
4000 * tst-rwlock14.c: New file.
4002 2004-06-24 Boris Hu <boris.hu@intel.com>
4004 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4006 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4008 2004-06-19 Andreas Jaeger <aj@suse.de>
4010 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4011 assembler in last patch.
4013 2004-06-17 Ulrich Drepper <drepper@redhat.com>
4015 * sysdeps/pthread/pthread_cond_timedwait.c
4016 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4017 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4018 (__pthread_cond_timedwait): Check for invalid nanosecond in
4020 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4021 * tst-cond19.c: New file.
4022 * Makefile: Add rules to build and run tst-cond19.
4024 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
4026 * tst-context1.c (GUARD_PATTERN): Defined.
4027 (tst_context_t): Define struct containing ucontext_t & guard words.
4028 (ctx): Declare as an array of tst_context_t.
4029 (fct): Verify uc_link & guard words are still valid.
4030 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
4032 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4034 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4035 Add __data.__futex field, reshuffle __data.__clock.
4036 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4037 (__pthread_cond_signal): Increment __futex at the same time as
4038 __wakeup_seq or __total_seq. Pass address of __futex instead of
4039 address of low 32-bits of __wakeup_seq to futex syscall.
4040 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4041 (__pthread_cond_wait): Likewise. Pass __futex value from before
4042 releasing internal lock to FUTEX_WAIT.
4043 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4044 (__pthread_cond_timedwait): Likewise.
4045 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4046 (FUTEX_CMP_REQUEUE): Define.
4047 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4048 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4049 Pass __futex value from before the unlock and __futex address instead
4050 of address of low 32-bits of __wakeup_seq to futex syscall.
4051 Fallback to FUTEX_WAKE all on any errors.
4053 2004-06-08 Jakub Jelinek <jakub@redhat.com>
4055 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4057 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4058 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4059 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4060 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4061 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
4063 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
4065 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4066 Add memory clobber to inline assembly.
4067 (__lll_mutex_trylock): Likewise.
4068 (__lll_mutex_cond_trylock): Likewise.
4070 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
4072 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4073 Pass val argument as 6th system call argument in %r7.
4075 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4077 * Makefile (tests): Add tst-cond16.
4078 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4079 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4080 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4081 Add __data.__futex field, reshuffle __data.__clock.
4082 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4083 (__pthread_cond_signal): Increment __futex at the same time as
4084 __wakeup_seq or __total_seq. Pass address of __futex instead of
4085 address of low 32-bits of __wakeup_seq to futex syscall.
4086 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4087 (__pthread_cond_wait): Likewise. Pass __futex value from before
4088 releasing internal lock to FUTEX_WAIT.
4089 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4090 (__pthread_cond_timedwait): Likewise.
4091 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4092 (FUTEX_CMP_REQUEUE): Define.
4093 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4094 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4095 Pass __futex value from before the unlock and __futex address instead
4096 of address of low 32-bits of __wakeup_seq to futex syscall.
4097 Fallback to FUTEX_WAKE all on any errors.
4098 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4100 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4101 internally. Return non-zero if error, zero if success.
4102 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4103 Add __data.__futex field, reshuffle __data.__clock.
4104 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4106 (lll_futex_requeue): Add val argument, return 1 unconditionally
4108 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4109 Add __data.__futex field, reshuffle __data.__clock.
4110 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4112 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4113 internally. Return non-zero if error, zero if success.
4114 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4115 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4116 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4118 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4119 internally. Return non-zero if error, zero if success.
4120 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4121 Add __data.__futex field, reshuffle __data.__clock.
4122 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4124 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4125 internally. Return non-zero if error, zero if success.
4126 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4127 Add __data.__futex field, reshuffle __data.__clock.
4128 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4129 Add __data.__futex field, reshuffle __data.__clock.
4130 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4131 Increment __futex at the same time as __wakeup_seq or __total_seq.
4132 Pass address of __futex instead of address of low 32-bits of
4133 __wakeup_seq to futex syscall.
4134 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4135 Pass __futex value from before releasing internal lock
4137 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4138 Likewise. Avoid unnecessary shadowing of variables.
4139 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4140 Set __futex to 2 * __total_seq. Pass __futex value from before the
4141 unlock and __futex address instead of address of low 32-bits of
4142 __wakeup_seq to futex_requeue macro, adjust for new return value
4144 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4145 (__pthread_cond_signal): Increment __futex at the same time as
4146 __wakeup_seq or __total_seq. Pass address of __futex instead of
4147 address of low 32-bits of __wakeup_seq to futex syscall.
4148 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4149 (__pthread_cond_wait): Likewise. Pass __futex value from before
4150 releasing internal lock to FUTEX_WAIT.
4151 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4152 (__pthread_cond_timedwait): Likewise.
4153 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4154 (FUTEX_CMP_REQUEUE): Define.
4155 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4156 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4157 Pass __futex value from before the unlock and __futex address instead
4158 of address of low 32-bits of __wakeup_seq to futex syscall.
4159 Fallback to FUTEX_WAKE all on any errors.
4161 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4163 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4164 Add nop to align the end of critical section.
4165 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4167 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4169 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4170 Add __broadcast_seq field.
4171 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4172 all waiters as woken with woken_seq and bump broadcast counter.
4173 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4174 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
4175 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4176 Comment typo fixes. Avoid returning -ETIMEDOUT.
4178 2004-06-01 Ulrich Drepper <drepper@redhat.com>
4180 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4181 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4182 Reported by Kaz Kojima.
4184 2004-05-25 Jakub Jelinek <jakub@redhat.com>
4186 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4188 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4190 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4191 __broadcast_seq with bc_seq after acquiring internal lock instead of
4194 2004-05-18 Jakub Jelinek <jakub@redhat.com>
4196 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4198 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4199 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4200 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4201 (pthread_cond_t): Add __data.__broadcast_seq field.
4202 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4203 (FRAME_SIZE): Define.
4204 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
4206 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4208 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
4210 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4211 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
4214 2004-05-18 Ulrich Drepper <drepper@redhat.com>
4216 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4217 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4218 Add __broadcast_seq field.
4219 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4220 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4221 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4222 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4223 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4224 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4225 all waiters as woken with woken_seq and bump broadcast counter.
4226 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4227 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4228 __broadcast_seq field.
4229 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4230 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4231 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4232 * pthread_cond_init.c: Initialize __broadcast_seq field.
4233 * Makefile (tests): Add tst-cond17 and tst-cond18.
4234 Add .NOTPARALLEL goal.
4235 * tst-cond16.c: New file. From Jakub.
4236 * tst-cond17.c: New file. From Jakub.
4237 * tst-cond18.c: New file. From Jakub.
4239 2004-05-16 Ulrich Drepper <drepper@redhat.com>
4241 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4244 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4245 Parametrize frame size. Correct some unwind info.
4246 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4248 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4250 * tst-stack3.c: Note testing functionality beyond POSIX.
4252 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4254 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4255 Change conditional from ifdef to if.
4257 2004-04-23 Jakub Jelinek <jakub@redhat.com>
4259 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4260 SYSDEP_CANCEL_ERROR): Define.
4263 2004-05-01 Jakub Jelinek <jakub@redhat.com>
4265 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4267 2004-04-20 Jakub Jelinek <jakub@redhat.com>
4269 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4271 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4273 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4274 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4275 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4276 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4278 2004-04-19 Ulrich Drepper <drepper@redhat.com>
4280 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4281 thread has all signals blocked.
4283 2004-04-18 Andreas Jaeger <aj@suse.de>
4285 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4286 (SEM_VALUE_MAX): Add missing brace.
4288 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4290 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4292 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4293 * sysdeps/pthread/tst-mqueue8x.c: New test.
4294 * tst-cancel4.c: Update comment about message queues.
4296 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4297 return it_value { 0, 0 }.
4298 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4300 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4301 assertion for SIGEV_NONE.
4302 (thread_attr_compare): Compare all attributes, not just a partial
4305 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4307 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4309 2004-04-17 Ulrich Drepper <drepper@redhat.com>
4311 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4312 Just use a plain number.
4313 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4314 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4315 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4316 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4317 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4318 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4319 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4321 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4323 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4325 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4327 2004-04-15 Jakub Jelinek <jakub@redhat.com>
4329 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4330 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4331 of calling sigwaitinfo.
4333 2004-04-16 Ulrich Drepper <drepper@redhat.com>
4335 * allocatestack.c (allocate_stack): Set reported_guardsize
4337 * pthread_getattr_np.c (pthread_getattr_np): Use
4338 reported_guardsize instead of guardsize.
4339 * descr.h (struct pthread): Add reported_guardsize field.
4341 2004-04-13 Jakub Jelinek <jakub@redhat.com>
4343 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4345 2004-04-12 Ulrich Drepper <drepper@redhat.com>
4347 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4349 2004-04-08 Jakub Jelinek <jakub@redhat.com>
4351 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4352 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4353 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4354 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4355 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4357 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4358 (_POSIX_MESSAGE_PASSING): Define.
4359 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4360 (_POSIX_MESSAGE_PASSING): Define.
4361 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4362 (_POSIX_MESSAGE_PASSING): Define.
4364 2004-04-04 Ulrich Drepper <drepper@redhat.com>
4366 * tst-context1.c (fct): Check whether correct stack is used.
4368 2004-04-03 Ulrich Drepper <drepper@redhat.com>
4370 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4371 matching constraints for asm mem parameters.
4373 * tst-clock2.c (tf): Don't define unless needed.
4375 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
4377 * Makefile (link-libc-static): Use $(static-gnulib) instead of
4380 2004-03-30 Ulrich Drepper <drepper@redhat.com>
4382 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4383 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4384 * pthreadP.h: Declare __nptl_deallocate_tsd.
4385 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4388 * Makefile (tests): Add tst-tsd5.
4389 * tst-tsd5.c: New file.
4391 2004-03-29 Ulrich Drepper <drepper@redhat.com>
4393 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4394 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4395 is SHLIB_COMPAT check.
4396 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4397 (__pthread_attr_getaffinity_old): Likewise.
4398 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4399 (__pthread_getaffinity_old): Likewise.
4400 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4401 (__pthread_setaffinity_old): Likewise.
4403 2004-03-26 Ulrich Drepper <drepper@redhat.com>
4405 * allocatestack.c (_make_stacks_executable): Call
4406 _dl_make_stack_executable first.
4408 2004-03-24 Roland McGrath <roland@redhat.com>
4410 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4411 constraint instead of "0".
4413 2004-03-24 Ulrich Drepper <drepper@redhat.com>
4415 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4416 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4418 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4419 code to avoid warning.
4421 2004-03-24 Andreas Jaeger <aj@suse.de>
4423 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4424 (__pthread_attr_setaffinity_old): Remove const.
4426 2004-03-23 Ulrich Drepper <drepper@redhat.com>
4428 * sysdeps/unix/sysv/linux/smp.h: New file.
4429 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4430 * init.c: Define __is_smp.
4431 (__pthread_initialize_minimal_internal): Call is_smp_system to
4432 initialize __is_smp.
4433 * pthreadP.h: Declare __is_smp.
4434 Define MAX_ADAPTIVE_COUNT is necessary.
4435 * pthread_mutex_init.c: Add comment regarding __spins field.
4436 * pthread_mutex_lock.c: Implement adaptive mutex type.
4437 * pthread_mutex_timedlock.c: Likewise.
4438 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4439 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4441 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4442 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4443 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4444 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4445 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4446 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4447 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4448 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4449 lll_mutex_cond_trylock.
4450 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4451 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4452 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4453 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4454 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4455 Define BUSY_WAIT_NOP.
4456 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4457 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4459 * tst-mutex5.c: Add support for testing adaptive mutexes.
4460 * tst-mutex7.c: Likewise.
4461 * tst-mutex5a.c: New file.
4462 * tst-mutex7a.c: New file.
4463 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4465 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4466 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4467 vgettimeofday call might destroy the content.
4469 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4472 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4473 No need to restrict type of ret. Make it int. Add comment.
4475 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4476 Remove unnecessary setne instruction.
4478 2004-03-22 Jakub Jelinek <jakub@redhat.com>
4480 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4481 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4482 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4483 If realloc fails, break out of the loop.
4485 2004-03-20 Andreas Jaeger <aj@suse.de>
4487 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4488 (__pthread_setaffinity_old): Fix interface.
4489 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4490 (__pthread_getaffinity_old): Likewise.
4492 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4493 (__pthread_setaffinity_new): Remove duplicate declaration.
4495 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4497 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4498 the return value to a safe register.
4499 (CDISABLE): Set the function argument correctly.
4501 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4503 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4504 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4505 Rewrite so that only one locked memory operation per round is needed.
4506 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4507 (pthread_barrier_wait): After wakeup, release lock only when the
4508 last thread stopped using the barrier object.
4509 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4510 (__pthread_cond_wait): Don't store mutex address if the current
4511 value is ~0l. Add correct cleanup support and unwind info.
4512 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4513 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4514 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4515 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4516 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4517 Add correct cleanup support and unwind info.
4518 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4519 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4520 information for syscall wrappers.
4522 2004-03-18 Ulrich Drepper <drepper@redhat.com>
4524 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4525 cpusetsize field, remove next.
4526 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4527 parameter for size of the CPU set.
4528 (pthread_setaffinity_np): Likewise.
4529 (pthread_attr_getaffinity_np): Likewise.
4530 (pthread_attr_setaffinity_np): Likewise.
4531 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4532 interface change, keep compatibility code.
4533 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4534 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4535 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4536 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
4537 __pthread_getaffinity_np.
4538 * Versions: Add version for changed interfaces.
4539 * tst-attr3.c: Adjust test for interface change.
4540 * pthread_getattr_np.c: Query the kernel about the affinity mask with
4541 increasing buffer sizes.
4542 * pthread_attr_destroy.c: Remove unused list handling.
4543 * pthread_attr_init.c: Likewise.
4545 2004-03-17 Roland McGrath <roland@redhat.com>
4547 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4548 first argument to clock_getres so we ever enable kernel timers.
4550 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
4552 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4554 2004-03-12 Richard Henderson <rth@redhat.com>
4556 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4557 oldvalue from CENABLE to CDISABLE.
4559 2004-03-12 Ulrich Drepper <drepper@redhat.com>
4561 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4562 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4563 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4564 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4566 2004-03-11 Richard Henderson <rth@redhat.com>
4568 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4569 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4570 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4572 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4574 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4575 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4576 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4578 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4580 * forward.c (__pthread_cond_broadcast_2_0,
4581 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4582 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4583 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4585 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4587 * sysdeps/sh/tcb-offsets.sym: Add PID.
4588 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4589 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4591 2004-03-10 Ulrich Drepper <drepper@redhat.com>
4593 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4594 include <sysdep-cancel.h>, vfork is no cancellation point.
4595 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4596 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4597 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4599 2004-03-10 Jakub Jelinek <jakub@redhat.com>
4601 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4603 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4604 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4606 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4608 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4609 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4610 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4611 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4612 of DO_CALL_VIA_BREAK. Work around a gas problem.
4614 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4615 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4616 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4617 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4618 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4619 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4621 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4622 a local register for saving old PID. Negate PID in parent upon exit.
4624 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4626 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4627 before syscall, set to the old value in the parent afterwards.
4628 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4629 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4631 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4632 before syscall, set to the old value in the parent afterwards.
4633 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4634 * sysdeps/s390/tcb-offsets.sym: Add PID.
4636 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4637 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4638 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4639 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4640 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4641 * sysdeps/sparc/tcb-offsets.sym: Add PID.
4643 2004-03-10 Andreas Schwab <schwab@suse.de>
4645 * sysdeps/ia64/tcb-offsets.sym: Add PID.
4646 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4647 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4649 2004-03-09 Jakub Jelinek <jakub@redhat.com>
4651 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4652 * tst-cancel21.c (do_one_test): Likewise.
4653 Reported by Gordon Jin <gordon.jin@intel.com>.
4655 2004-02-09 Jakub Jelinek <jakub@redhat.com>
4657 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4658 if non-zero and set to INT_MIN if zero.
4659 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4660 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4661 (SAVE_PID, RESTORE_PID): Define.
4663 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4664 Use relative path to avoid including NPTL i386/vfork.S.
4665 (SAVE_PID, RESTORE_PID): Define.
4666 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4667 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4668 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4670 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4671 * tst-vfork1.c: New test.
4672 * tst-vfork2.c: New test.
4673 * tst-vfork1x.c: New test.
4674 * tst-vfork2x.c: New test.
4676 2004-03-08 Ulrich Drepper <drepper@redhat.com>
4678 * sysdeps/i386/tcb-offsets.sym: Add PID.
4679 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4680 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4681 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4683 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
4685 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4687 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
4689 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4692 2004-03-07 Ulrich Drepper <drepper@redhat.com>
4694 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4697 * tst-once4.c: Remove unnecessary macro definition.
4699 * tst-mutex7.c (do_test): Limit thread stack size.
4700 * tst-once2.c (do_test): Likewise.
4701 * tst-tls3.c (do_test): Likewise.
4702 * tst-tls1.c (do_test): Likewise.
4703 * tst-signal3.c (do_test): Likewise.
4704 * tst-kill6.c (do_test): Likewise.
4705 * tst-key4.c (do_test): Likewise.
4706 * tst-join4.c (do_test): Likewise.
4707 * tst-fork1.c (do_test): Likewise.
4708 * tst-context1.c (do_test): Likewise.
4709 * tst-cond2.c (do_test): Likewise.
4710 * tst-cond10.c (do_test): Likewise.
4711 * tst-clock2.c (do_test): Likewise.
4712 * tst-cancel10.c (do_test): Likewise.
4713 * tst-basic2.c (do_test): Likewise.
4714 * tst-barrier4.c (do_test): Likewise.
4716 2004-03-05 Ulrich Drepper <drepper@redhat.com>
4718 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4720 2004-03-01 Ulrich Drepper <drepper@redhat.com>
4722 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4723 (__pthread_cond_timedwait): Optimize wakeup test.
4724 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4725 (__pthread_cond_wait): Likewise.
4726 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4727 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4730 2004-02-29 Ulrich Drepper <drepper@redhat.com>
4732 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4733 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
4734 the atomic instruction needed.
4735 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4736 (__lll_mutex_lock_wait): Likewise.
4738 2004-02-28 Ulrich Drepper <drepper@redhat.com>
4740 * Makefile (tests): Add tst-cond14 and tst-cond15.
4741 * tst-cond14.c: New file.
4742 * tst-cond15.c: New file.
4744 2004-02-27 Ulrich Drepper <drepper@redhat.com>
4746 * sysdeps/pthread/createthread.c (create_thread): Remove use of
4747 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
4748 needs to be implemented differently to be useful.
4750 2004-02-26 Ulrich Drepper <drepper@redhat.com>
4752 * pthread_attr_setschedparam.c: Don't test priority against limits
4753 here. Set ATTR_FLAG_SCHED_SET flag.
4754 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4755 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4756 from parent thread to child. If attribute is used and scheduling
4757 parameters are not inherited, copy parameters from attribute or
4758 compute them. Check priority value.
4759 * pthread_getschedparam.c: If the parameters aren't known yet get
4760 them from the kernel.
4761 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4762 ATTR_FLAG_POLICY_SET flag for thread.
4763 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4764 and ATTR_FLAG_POLICY_SET.
4766 * sysdeps/pthread/createthread.c: Use tgkill if possible.
4768 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4769 fail if stack address hasn't been set. Just return 0.
4771 2004-02-25 Ulrich Drepper <drepper@redhat.com>
4773 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
4774 libpthread for the files in this list.
4775 (CFLAGS-tst-unload): Removed.
4776 * tst-unload.c (do_test): Don't use complete path for
4779 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4782 2004-02-22 Ulrich Drepper <drepper@redhat.com>
4784 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4785 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4786 operation per round is needed.
4787 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4788 (__lll_mutex_lock_wait): Likewise.
4790 2004-02-20 Ulrich Drepper <drepper@redhat.com>
4792 * tst-cancel9.c (cleanup): Don't print to stderr.
4794 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4796 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4798 2004-02-20 Jakub Jelinek <jakub@redhat.com>
4800 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4801 (__syscall_error_handler2): Call CDISABLE.
4802 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4803 (__syscall_error_handler2): Call CDISABLE.
4805 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4806 Release lock before the loop, don't reacquire it.
4808 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4810 2004-02-19 Andreas Schwab <schwab@suse.de>
4812 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4815 2004-02-18 Ulrich Drepper <drepper@redhat.com>
4817 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4818 (pthread_barrier_wait): After wakeup, release lock only when the
4819 last thread stopped using the barrier object.
4820 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4821 (pthread_barrier_wait): Likewise.
4822 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4824 * Makefile (tests): Add tst-barrier4.
4825 * tst-barrier4.c: New file.
4827 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4828 (__pthread_cond_timedwait): Perform timeout test while holding
4829 internal lock to prevent wakeup race.
4830 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4831 * sysdeps/pthread/pthread_cond_timedwait.c
4832 (__pthread_cond_timedwait): Likewise.
4833 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4834 (__pthread_cond_timedwait): Likewise.
4836 2004-02-18 Jakub Jelinek <jakub@redhat.com>
4838 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4839 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4840 * Makefile (tests): Add tst-rwlock13.
4841 * tst-rwlock13.c: New test.
4843 2004-02-16 Ulrich Drepper <drepper@redhat.com>
4845 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4846 (__condvar_tw_cleanup): Little optimization.
4847 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4849 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
4851 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4852 libpthread as "lib" parameter to SHLIB_COMPAT.
4853 (__novmx_siglongjmp): Fix typo in function name.
4854 (__novmx_longjmp): Fix typo in function name.
4856 2004-02-13 Ulrich Drepper <drepper@redhat.com>
4858 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4861 * sysdeps/generic/pt-longjmp.c: Moved to...
4862 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
4864 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
4866 * Makefile (libpthread-routines): Add pt-cleanup.
4867 * pt-longjmp.c: Removed.
4868 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4869 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4870 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4871 Version longjmp, siglongjmp for GLIBC_2.3.4.
4872 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4874 2004-02-13 Ulrich Drepper <drepper@redhat.com>
4876 * sysdeps/pthread/pthread_cond_timedwait.c
4877 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
4878 Reuse code. Add __builtin_expects.
4880 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4881 (__pthread_cond_timedwait): Get internal lock in case timeout has
4882 passed before the futex syscall.
4883 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4885 2004-01-20 Ulrich Drepper <drepper@redhat.com>
4887 * allocatestack.c: Pretty printing.
4889 * sysdeps/pthread/createthread.c (create_thread): Don't add
4890 CLONE_DETACHED bit if it is not necessary.
4892 2004-01-16 Ulrich Drepper <drepper@redhat.com>
4894 * pthread_getattr_np.c: Include ldsodefs.h.
4896 2004-01-16 Richard Henderson <rth@redhat.com>
4898 * allocatestack.c: Don't declare __libc_stack_end.
4899 * init.c (__pthread_initialize_minimal_internal): Likewise.
4900 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
4902 2004-01-15 Richard Henderson <rth@redhat.com>
4904 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4905 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
4906 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
4907 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
4908 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
4909 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
4910 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
4911 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
4913 2004-01-14 Ulrich Drepper <drepper@redhat.com>
4915 * init.c (pthread_functions): Make array const.
4917 2004-01-13 Ulrich Drepper <drepper@redhat.com>
4919 * allocatestack.c (__make_stacks_executable): Change interface.
4920 Check parameters. Pass parameter on to libc counterpart.
4921 * pthreadP.h: Change declaration.
4923 2004-01-13 Richard Henderson <rth@redhat.com>
4925 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
4927 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
4930 * sysdeps/alpha/Makefile: New file.
4931 * sysdeps/alpha/tcb-offsets.sym: New file.
4932 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4933 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
4935 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
4938 2004-01-08 Jakub Jelinek <jakub@redhat.com>
4940 * Makefile (tests): Add tst-backtrace1.
4941 * tst-backtrace1.c: New test.
4943 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
4945 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
4946 register as second parameter to the REGISTER macro.
4947 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
4948 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
4949 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
4950 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
4951 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
4952 of thread register as second parameter to REGISTER macro in 64 case.
4954 2004-01-03 Ulrich Drepper <drepper@redhat.com>
4956 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
4957 (CFLAGS-getpid.o): Defined.
4958 (CFLAGS-getpid.os): Defined.
4960 2003-12-31 Ulrich Drepper <drepper@redhat.com>
4962 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
4963 returned for main thread does not overlap with any other VMA.
4964 Patch by Jakub Jelinek.
4966 2003-12-29 Jakub Jelinek <jakub@redhat.com>
4968 * tst-raise1.c: Include stdio.h.
4970 2003-12-23 Jakub Jelinek <jakub@redhat.com>
4972 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
4973 setting with __ASSUME_TGKILL || defined __NR_tgkill.
4974 If pid is 0, set it to selftid.
4975 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
4976 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
4977 != 0, return self->tid without doing a syscall.
4978 * descr.h (struct pthread): Move pid field after tid.
4980 * Makefile (tests): Add tst-raise1.
4981 * tst-raise1.c: New file.
4983 2003-12-23 Roland McGrath <roland@redhat.com>
4985 * tst-oddstacklimit.c: New file.
4986 * Makefile (tests): Add it.
4987 (tst-oddstacklimit-ENV): New variable.
4989 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
4990 value up to page size for __default_stacksize.
4992 2003-12-21 Ulrich Drepper <drepper@redhat.com>
4994 * Makefile (tests): Add tst-eintr5.
4995 * tst-eintr5.c: New file.
4997 * eintr.c (eintr_source): Prevent sending signal to self.
4999 * tst-eintr2.c (tf1): Improve error message.
5001 2003-12-20 Ulrich Drepper <drepper@redhat.com>
5003 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5004 * sysdeps/unix/sysv/linux/getpid.c: New file.
5005 * pthread_cancel.c: Add comment explaining use of PID field.
5006 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5007 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5008 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5009 temporarily to signal the field must not be relied on and updated
5011 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5012 temporarily negative.
5013 * sysdeps/unix/sysv/linux/raise.c: Likewise.
5015 2003-12-19 Ulrich Drepper <drepper@redhat.com>
5017 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
5018 (eintr_source): If ARG != NULL, use pthread_kill.
5019 * tst-eintr1.c: Adjust for this change.
5020 * tst-eintr2.c: Likewise.
5021 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5022 * tst-eintr3.c: New file.
5023 * tst-eintr4.c: New file.
5025 2003-12-19 Jakub Jelinek <jakub@redhat.com>
5027 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5028 if CANCELSTATE_BITMASK is set.
5029 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5032 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5033 (tests-reverse): Add tst-cancel23.
5034 * tst-cancel22.c: New test.
5035 * tst-cancel23.c: New test.
5037 2003-12-18 Ulrich Drepper <drepper@redhat.com>
5039 * tst-eintr1.c: Better error messages.
5041 * Makefile (tests): Add tst-eintr2.
5042 * tst-eintr2.c: New file.
5044 2003-12-18 Jakub Jelinek <jakub@redhat.com>
5046 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5047 (CFLAGS-tst-cancelx21.c): Set.
5048 * tst-cancel21.c: New test.
5049 * tst-cancelx21.c: New test.
5051 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
5053 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5054 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
5055 * pt-longjmp.c: Include jmpbuf-unwind.h.
5056 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5057 _JMPBUF_UNWINDS. Adjust compared pointers.
5058 * init.c (__pthread_initialize_minimal_internal): Initialize
5059 pd->stackblock_size.
5060 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5061 * sysdeps/alpha/jmpbuf-unwind.h: New file.
5062 * sysdeps/i386/jmpbuf-unwind.h: New file.
5063 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5064 * sysdeps/s390/jmpbuf-unwind.h: New file.
5065 * sysdeps/sh/jmpbuf-unwind.h: New file.
5066 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5067 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5068 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5069 (_JMPBUF_CFA_UNWINDS): Remove.
5070 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5072 2003-12-12 Jakub Jelinek <jakub@redhat.com>
5074 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5075 (CFLAGS-tst-cancelx20.c): Set.
5076 * tst-cancel20.c: New test.
5077 * tst-cancelx20.c: New test.
5079 2003-12-17 Ulrich Drepper <drepper@redhat.com>
5081 * init.c (__pthread_initialize_minimal_internal): Don't treat
5082 architectures with separate register stack special here when
5083 computing default stack size.
5085 2003-12-17 Roland McGrath <roland@redhat.com>
5087 * Makefile (tst-cancelx7-ARGS): New variable.
5088 Reportd by Greg Schafer <gschafer@zip.com.au>.
5090 2003-12-17 Jakub Jelinek <jakub@redhat.com>
5092 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
5093 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5094 (tst-stack3-ENV): Set.
5095 ($(objpfx)tst-stack3-mem): New.
5096 * tst-stack3.c: New test.
5098 2003-12-10 David Mosberger <davidm@hpl.hp.com>
5100 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5101 Add unwind directives. Drop unused .regstk directive.
5102 (_fini_EPILOG_BEGINS): Add unwind directives.
5104 2003-12-11 Ulrich Drepper <drepper@redhat.com>
5106 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5107 Assume parameter is a pointer.
5108 (lll_futex_wake): Likewise.
5109 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5111 (lll_futex_wake): Likewise.
5112 Reported by Boris Hu.
5113 * sysdeps/unix/sysv/linux/unregister-atfork.c
5114 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5116 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5118 2003-12-10 Ulrich Drepper <drepper@redhat.com>
5120 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5121 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5122 __rtld_lock_initialize for ld.so lock.
5123 Patch in part by Adam Li <adam.li@intel.com>.
5125 2003-12-02 David Mosberger <davidm@hpl.hp.com>
5127 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5128 in $(gnulib). Also, remove stale comment.
5130 2003-11-12 David Mosberger <davidm@hpl.hp.com>
5132 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5133 advantage of new syscall stub and optimize accordingly.
5135 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5136 from SYS_futex, to match expectations of
5137 sysdep.h:DO_INLINE_SYSCALL.
5138 (lll_futex_clobbers): Remove.
5139 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5140 (lll_futex_wake): Likewise.
5141 (lll_futex_requeue): Likewise.
5142 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5143 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5145 (__lll_mutex_lock): Likewise.
5146 (__lll_mutex_cond_lock): Likewise.
5147 (__lll_mutex_timed_lock): Likewise.
5148 (__lll_mutex_unlock): Likewise.
5149 (__lll_mutex_unlock_force): Likewise.
5151 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5152 comes before the include of <sysdep.h>.
5153 (THREAD_SELF_SYSINFO): New macro.
5154 (THREAD_SYSINFO): Likewise.
5155 (INIT_SYSINFO): New macro.
5156 (TLS_INIT_TP): Call INIT_SYSINFO.
5158 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5160 * sysdeps/pthread/createthread.c (create_thread): Use
5161 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5162 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5163 THREAD_SELF_SYSINFO instead of open code.
5164 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5165 (THREAD_SYSINFO): Likewise.
5167 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5169 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5171 2003-12-06 Ulrich Drepper <drepper@redhat.com>
5173 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5174 instead of .init. Patch by David Mosberger.
5176 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
5178 * sysdeps/pthread/configure.in: Remove broken declaration in C
5179 cleanup handling check.
5181 2003-11-30 Andreas Jaeger <aj@suse.de>
5183 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5184 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5187 2003-11-27 Jakub Jelinek <jakub@redhat.com>
5189 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5190 * pthread_attr_destroy.c: Include shlib-compat.h.
5191 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5192 is set in iattr->flags.
5193 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5195 2003-11-21 Jakub Jelinek <jakub@redhat.com>
5197 * Makefile (distribute): Add tst-cleanup4aux.c.
5199 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
5202 2003-11-21 Ulrich Drepper <drepper@redhat.com>
5204 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5205 pthread_cond_signal.
5207 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5208 store mutex address if the current value is ~0l.
5209 * sysdeps/pthread/pthread_cond_timedwait.c
5210 (__pthread_cond_timedwait): Likewise.
5211 * sysdeps/pthread/pthread_cond_broadcast.c
5212 (__pthread_cond_broadcast): Don't use requeue for pshared
5215 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5216 (__pthread_cond_wait): Don't store mutex address if the current
5218 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5219 (__pthread_cond_timedwait): Likewise.
5220 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5221 (__pthread_cond_broadcast): Don't use requeue for pshared
5224 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5225 element with ~0l for pshared condvars, with NULL otherwise.
5227 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5228 (__pthread_cond_wait): Don't store mutex address if the current
5230 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5231 (__pthread_cond_timedwait): Likewise.
5232 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5233 (__pthread_cond_broadcast): Don't use requeue for pshared
5236 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5237 * tst-cond12.c: New file.
5238 * tst-cond13.c: New file.
5240 2003-11-17 Ulrich Drepper <drepper@redhat.com>
5242 * sysdeps/pthread/configure.in: Make missing forced unwind support
5245 2003-11-11 Ulrich Drepper <drepper@redhat.com>
5247 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5249 2003-11-06 Ulrich Drepper <drepper@redhat.com>
5251 * Makefile: Add magic to clean up correctly.
5253 2003-11-05 Jakub Jelinek <jakub@redhat.com>
5255 * unwind.c (FRAME_LEFT): Define.
5256 (unwind_stop): Handle old style cleanups here.
5257 (__pthread_unwind): Handle old style cleanups only if
5258 !HAVE_FORCED_UNWIND.
5259 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5260 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5261 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5262 ($(objpfx)tst-cleanupx4): Likewise.
5263 * tst-cleanup4.c: New test.
5264 * tst-cleanup4aux.c: New.
5265 * tst-cleanupx4.c: New test.
5267 2003-11-04 Ulrich Drepper <drepper@redhat.com>
5269 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5270 lll_mutex_*lock macros to skip atomic operations on some archs.
5272 2003-11-03 Ulrich Drepper <drepper@redhat.com>
5274 * sysdeps/pthread/tst-timer.c (main): Initialize
5275 sigev2.sigev_value as well.
5277 2003-10-15 Roland McGrath <roland@redhat.com>
5279 * sysdeps/pthread/configure.in: Barf if visibility attribute support
5281 * sysdeps/pthread/configure: Regenerated.
5283 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5285 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5286 locking macros. No distinction between normal and mutex locking
5288 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5289 Merge bits from lowlevelmutex.S we still need.
5290 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5291 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5292 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5293 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5294 new mutex implementation.
5295 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5296 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5297 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5298 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5299 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5300 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5301 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5302 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5303 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5304 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5305 symbol for entry point to avoid cancellation.
5307 2003-10-07 Jakub Jelinek <jakub@redhat.com>
5309 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5311 (SAVE_OLDTYPE_0): Fix a typo.
5313 2003-10-03 Ulrich Drepper <drepper@redhat.com>
5315 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5316 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
5318 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5320 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5323 2003-10-02 Jakub Jelinek <jakub@redhat.com>
5325 * Makefile (tests): Add tst-cancel19.
5326 * tst-cancel19.c: New test.
5328 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5330 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5331 restoring of the old cancellation type.
5333 2003-09-30 Jakub Jelinek <jakub@redhat.com>
5335 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5337 2003-09-27 Wolfram Gloger <wg@malloc.de>
5339 * sysdeps/pthread/malloc-machine.h: New file
5341 2003-09-24 Roland McGrath <roland@redhat.com>
5343 * allocatestack.c (__make_stacks_executable): Don't ignore return
5344 value from _dl_make_stack_executable.
5346 2003-09-24 Ulrich Drepper <drepper@redhat.com>
5348 * allocatestack.c (__make_stacks_executable): Also change
5349 permission of the currently unused stacks.
5351 * allocatestack.c (change_stack_perm): Split out from
5352 __make_stacks_executable.
5353 (allocate_stack): If the required permission changed between the time
5354 we started preparing the stack and queueing it, change the permission.
5355 (__make_stacks_executable): Call change_stack_perm.
5357 * Makefile: Build tst-execstack-mod locally.
5358 * tst-execstack-mod.c: New file.
5360 2003-09-23 Jakub Jelinek <jakub@redhat.com>
5362 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5364 2003-09-23 Roland McGrath <roland@redhat.com>
5366 * tst-execstack.c: New file.
5367 * Makefile (tests): Add it.
5368 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5369 (LDFLAGS-tst-execstack): New variable.
5371 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5372 whether to use PROT_EXEC for stack mmap.
5373 (__make_stacks_executable): New function.
5374 * pthreadP.h: Declare it.
5375 * init.c (__pthread_initialize_minimal_internal): Set
5376 GL(dl_make_stack_executable_hook) to that.
5378 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5380 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5381 recommendation from AMD re avoidance of lock prefix.
5383 2003-09-22 Jakub Jelinek <jakub@redhat.com>
5385 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5386 lll_futex_timed_wait instead of lll_futex_wait.
5387 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5388 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5389 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5390 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5391 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5392 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5393 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5394 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5395 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5396 Completely revamp the locking macros. No distinction between
5397 normal and mutex locking anymore.
5398 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5399 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5400 __lll_lock_timedwait): Fix prototypes.
5401 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5402 __lll_lock_timedwait): Likewise.
5403 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5404 macros, add __builtin_expect.
5405 (lll_mutex_timedlock): Likewise. Fix return value.
5406 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5407 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5408 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5409 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5410 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5411 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5412 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5413 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5415 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5417 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5418 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5419 operation if possible.
5421 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5422 like jumping over the lock prefix.
5424 2003-09-21 Ulrich Drepper <drepper@redhat.com>
5426 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5427 locking macros. No distinction between normal and mutex locking
5429 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5430 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5431 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5432 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5433 locking. Merge bits from lowlevelmutex.S we still need.
5434 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5435 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5436 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5437 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5438 * Makefile (routines): Remove libc-lowlevelmutex.
5439 (libpthread-rountines): Remove lowlevelmutex.
5440 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5441 for new mutex implementation.
5442 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5443 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5444 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5445 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5446 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5448 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5450 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5451 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5452 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5453 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5454 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5455 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5456 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5457 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5459 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5461 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5462 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5463 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5465 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5466 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5468 2003-09-20 Ulrich Drepper <drepper@redhat.com>
5470 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5471 in parameters of asm with output parameters.
5473 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5474 type of DECR parameter to int.
5475 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5477 2003-09-18 Jakub Jelinek <jakub@redhat.com>
5479 * tst-attr3.c (tf, do_test): Print stack start/end/size and
5480 guardsize for each thread.
5482 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5484 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5485 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5486 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5488 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5489 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5491 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5492 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5493 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5494 (pthread_getaffinity_np): Add hidden_def.
5496 * Makefile (tests): Add tst-attr3.
5497 * tst-attr3.c: New test.
5499 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5501 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5503 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5504 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5506 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5508 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5509 * tst-align.c: Include tst-stack-align.h.
5510 (tf, do_test): Use TEST_STACK_ALIGN macro.
5512 2003-09-17 Ulrich Drepper <drepper@redhat.com>
5514 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5517 2003-09-16 Ulrich Drepper <drepper@redhat.com>
5519 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5520 stack-related values for the initial thread.
5522 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5524 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5526 2003-09-11 Ulrich Drepper <drepper@redhat.com>
5528 * pthread_mutex_lock.c: Minor code rearrangements.
5530 2003-09-05 Roland McGrath <roland@redhat.com>
5532 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5533 Instead, include ../nptl_db/db_info.c to do its magic.
5534 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5535 (__pthread_pthread_key_2ndlevel_size): Likewise.
5536 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5537 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5538 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5539 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5540 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5541 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5542 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5543 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5544 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5545 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5546 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5547 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5548 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5549 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5550 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5551 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5552 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5554 2003-09-08 Ulrich Drepper <drepper@redhat.com>
5556 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5557 of pthread_t to be compatible with LT.
5558 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5559 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5560 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5561 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5562 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5563 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5564 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5566 2003-09-04 Ulrich Drepper <drepper@redhat.com>
5568 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5570 2003-09-04 Jakub Jelinek <jakub@redhat.com>
5572 * unwind-forcedunwind.c: Move to...
5573 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5574 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5575 * sysdeps/pthread/jmpbuf-unwind.h: New file.
5576 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5577 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5578 * unwind.c: Include jmpbuf-unwind.h.
5579 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5581 2003-09-02 Jakub Jelinek <jakub@redhat.com>
5583 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5584 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5585 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5586 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5587 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5588 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5589 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5590 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5591 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5592 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5593 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5595 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5596 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5597 * Makefile (tests): Add tst-stack2.
5598 * tst-stack2.c: New test.
5599 * tst-stack1.c: Include limits.h and sys/param.h.
5600 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5602 * pthread_condattr_setpshared.c: Include errno.h.
5603 (pthread_condattr_setpshared): Return EINVAL if pshared
5604 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5606 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5607 defined symbol for entry point to avoid cancellation.
5608 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5610 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5612 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5614 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5616 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5618 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5619 __close_nocancel, __read_nocancel, __write_nocancel,
5620 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
5621 libpthread.so or librt.so, define to corresponding function
5622 without _nocancel suffix.
5623 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5624 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5625 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5627 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5629 2003-09-02 Ulrich Drepper <drepper@redhat.com>
5631 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5632 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5634 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5635 in subsections has a symbol associated with it.
5637 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5638 defined symbol for entry point to avoid cancellation.
5639 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5641 2003-09-01 Jakub Jelinek <jakub@redhat.com>
5643 * Makefile (tests): Add tst-tls5.
5644 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5645 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5646 ($(objpfx)tst-tls5): New.
5647 ($(objpfx)tst-tls6.out): Likewise.
5648 (tests): Depend on $(objpfx)tst-tls6.out.
5649 * tst-tls3.c: Include stdint.h and pthreaddef.h.
5650 (do_test): Check pthread_self () return value alignment.
5651 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5652 (tf): Check pthread_self () return value alignment.
5653 * tst-tls5.c: New test.
5655 * tst-tls5mod.c: New.
5656 * tst-tls5moda.c: New.
5657 * tst-tls5modb.c: New.
5658 * tst-tls5modc.c: New.
5659 * tst-tls5modd.c: New.
5660 * tst-tls5mode.c: New.
5661 * tst-tls5modf.c: New.
5662 * tst-tls6.sh: New test.
5664 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5665 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5666 * init.c (pthread_functions): Initialize them.
5667 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5668 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5669 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5670 pthread_cond_timedwait@@GLIBC_2.3.2.
5672 2003-09-01 Jakub Jelinek <jakub@redhat.com>
5674 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5675 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5676 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5677 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5678 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5679 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5681 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5683 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5684 _POSIX_THREAD_PRIORITY_SCHEDULING.
5685 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5687 2003-08-31 Ulrich Drepper <drepper@redhat.com>
5689 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5690 nested function, use static inline function from libio.h.
5691 Code by Richard Henderson.
5693 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5696 2003-08-30 Jakub Jelinek <jakub@redhat.com>
5698 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5699 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5700 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5701 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5702 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5703 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5704 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5705 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5706 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5707 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5708 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5709 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5710 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5711 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5712 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5713 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5714 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5715 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5716 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5717 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5718 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5719 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5720 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5721 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5722 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5723 * sysdeps/sparc/tls.h: New file.
5724 * sysdeps/sparc/tcb-offsets.sym: New file.
5725 * sysdeps/sparc/Makefile: New file.
5726 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5727 * init.c [__sparc__] (__NR_set_tid_address): Define.
5729 2003-08-29 Jakub Jelinek <jakub@redhat.com>
5731 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5732 _IO_release_lock): Define.
5734 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
5736 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5737 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
5739 2003-08-27 Ulrich Drepper <drepper@redhat.com>
5741 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5742 (__pthread_cleanup_class): Add missing return types of member
5745 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
5747 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5748 (lll_mutex_unlock_force): Add memory barrier between store and futex
5751 2003-08-25 Ulrich Drepper <drepper@redhat.com>
5753 * tst-cancel4.c (do_test): Also unlink tempfname and remove
5754 tempmsg in first loop.
5756 2003-08-18 Ulrich Drepper <drepper@redhat.com>
5758 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5759 _POSIX_THREAD_PRIORITY_SCHEDULING.
5760 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5762 2003-08-07 Jakub Jelinek <jakub@redhat.com>
5764 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5765 (__rtld_lock_default_lock_recursive,
5766 __rtld_lock_default_unlock_recursive): Define.
5767 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5768 __rtld_lock_unlock_recursive): Define using
5769 GL(_dl_rtld_*lock_recursive).
5770 * init.c (__pthread_initialize_minimal_internal): Initialize
5771 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5772 Lock GL(_dl_load_lock) the same number of times as
5773 GL(_dl_load_lock) using non-mt implementation was nested.
5775 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5776 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5778 2003-08-06 Jakub Jelinek <jakub@redhat.com>
5780 * tst-cancel17.c (do_test): Make len2 maximum of page size and
5783 2003-08-07 Jakub Jelinek <jakub@redhat.com>
5785 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5787 2003-08-03 Jakub Jelinek <jakub@redhat.com>
5789 * sysdeps/pthread/createthread.c (do_clone): Move error handling
5790 to first syscall error check. Move syscall error check for tkill
5791 into __ASSUME_CLONE_STOPPED #ifdef.
5793 2003-08-02 Ulrich Drepper <drepper@redhat.com>
5795 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5796 is not defined, do explicit synchronization.
5797 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
5798 is not defined also unlock pd->lock for non-debugging case in case
5800 * pthread_create.c (start_thread): Always get and release pd->lock
5801 if __ASSUME_CLONE_STOPPED is not defined.
5802 (start_thread_debug): Removed. Adjust users.
5803 * allocatestack.c (allocate_stack): Always initialize lock if
5804 __ASSUME_CLONE_STOPPED is not defined.
5805 * Makefile (tests): Add tst-sched1.
5806 * tst-sched1.c: New file.
5808 * sysdeps/pthread/createthread.c (do_clone): Only use
5809 sched_setschduler and pass correct parameters.
5811 2003-07-31 Jakub Jelinek <jakub@redhat.com>
5813 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5814 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5815 PTHREAD_STACK_MIN in comments.
5817 2003-07-31 Jakub Jelinek <jakub@redhat.com>
5819 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5820 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5822 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5823 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5824 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5825 (__pthread_cleanup_upto): Fix prototype.
5826 (_longjmp_unwind): Adjust caller.
5827 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5828 Change second argument to const struct pointer.
5829 * tst-sem8.c (main): Remove unused s2 and s3 variables.
5830 * tst-sem9.c (main): Likewise.
5831 * unwind.c: Include string.h for strlen prototype.
5833 2003-07-31 Ulrich Drepper <drepper@redhat.com>
5835 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5836 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5837 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5839 Patch by Nicholas Miell <nmiell@attbi.com>.
5841 2003-07-30 Jakub Jelinek <jakub@redhat.com>
5843 * init.c (__pthread_initialize_minimal_internal): Initialize
5844 GL(dl_init_static_tls).
5845 * pthreadP.h (__pthread_init_static_tls): New prototype.
5846 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5848 * Makefile (tests): Add tst-tls4.
5849 (modules-names): Add tst-tls4moda and tst-tls4modb.
5850 ($(objpfx)tst-tls4): Link against libdl and libpthread.
5851 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5853 * tst-tls4.c: New file.
5854 * tst-tls4moda.c: New file.
5855 * tst-tls4modb.c: New file.
5857 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
5859 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5860 before __timer_dealloc.
5861 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5862 Don't call list_unlink.
5864 2003-07-29 Roland McGrath <roland@redhat.com>
5866 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5868 2003-07-25 Jakub Jelinek <jakub@redhat.com>
5870 * tst-cancel17.c (do_test): Check if aio_cancel failed.
5871 Don't reuse struct aiocb A if it failed.
5872 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5873 not just one byte, as that does not block.
5875 2003-07-22 Jakub Jelinek <jakub@redhat.com>
5877 * sysdeps/pthread/unwind-resume.c: New file.
5878 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5879 unwind-resume in csu subdir.
5880 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5882 (librt-sysdep_routines, librt-shared-only-routines): Add
5884 * sysdeps/pthread/rt-unwind-resume.c: New file.
5885 * unwind-forcedunwind.c: New file.
5886 * Makefile (libpthread-routines): Add unwind-forcedunwind.
5887 (libpthread-shared-only-routines): Likewise.
5888 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5889 * pthreadP.h (pthread_cancel_init): New prototype.
5890 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5892 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5893 attr argument const struct pthread_attr *.
5895 * res.c (__res_state): Return __resp.
5896 * descr.h: Include resolv.h.
5897 (struct pthread): Add res field.
5898 * pthread_create.c: Include resolv.h.
5899 (start_thread): Initialize __resp.
5900 * Makefile (tests): Add tst-_res1.
5901 (module-names): Add tst-_res1mod1, tst-_res1mod2.
5902 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
5903 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
5905 * tst-_res1.c: New file.
5906 * tst-_res1mod1.c: New file.
5907 * tst-_res1mod2.c: New file.
5909 2003-07-21 Ulrich Drepper <drepper@redhat.com>
5911 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
5913 * Makefile: Define various *-no-z-defs variables for test DSOs
5914 which has undefined symbols.
5916 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
5918 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5919 Retry if the stwcx fails to store once_control.
5921 2003-07-20 Ulrich Drepper <drepper@redhat.com>
5923 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
5924 pthread_attr_setaffinity.
5925 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
5926 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
5927 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
5928 * pthread_attr_destroy.c: Free cpuset element if allocated.
5929 * pthread_create.c: Pass iattr as additional parameter to
5931 * sysdeps/pthread/createthread.c: If attribute is provided and
5932 a new thread is created with affinity set or scheduling parameters,
5933 start thread with CLONE_STOPPED.
5934 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
5935 pthread_attr_setaffinity.
5936 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5939 2003-07-15 Ulrich Drepper <drepper@redhat.com>
5941 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
5943 2003-07-14 Ulrich Drepper <drepper@redhat.com>
5945 * sysdeps/pthread/configure.in: Require CFI directives also for
5948 2003-07-15 Jakub Jelinek <jakub@redhat.com>
5950 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5953 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5955 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
5957 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
5958 registers as variables. Call __pthread_mutex_unlock_usercnt.
5959 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5960 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
5961 not self pointer in __writer. Compare with TID to determine
5963 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5964 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
5966 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
5968 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
5969 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5970 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
5971 macros also when compiling librt.
5973 2003-07-11 Jakub Jelinek <jakub@redhat.com>
5975 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
5976 -fasynchronous-unwind-tables.
5977 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5978 (PSEUDO): Add cfi directives.
5979 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
5981 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5984 2003-07-08 Jakub Jelinek <jakub@redhat.com>
5986 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
5987 __pthread_unregister_cancel): Add prototypes and hidden_proto.
5988 * unwind.c (__pthread_unwind_next): Add hidden_def.
5989 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
5991 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5992 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5993 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5995 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
5996 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
5998 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
5999 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6000 __pthread_unregister_cancel and __pthread_unwind_next.
6002 2003-07-04 Jakub Jelinek <jakub@redhat.com>
6004 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6005 different symbol for the cancellation syscall wrapper and
6006 non-cancellation syscall wrapper.
6007 (PSEUDO_END): Define.
6009 2003-07-05 Richard Henderson <rth@redhat.com>
6011 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6012 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6013 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6014 return actual return value from the syscall, not 0.
6016 2003-07-07 Ulrich Drepper <drepper@redhat.com>
6018 * descr.h (struct pthread): Add pid field.
6019 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6020 (__reclaim_stacks): Likewise.
6021 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6022 also check for PID of the signal source.
6023 (__pthread_initialize_minimal_internal): Also initialize pid field
6024 of initial thread's descriptor.
6025 * pthread_cancel.c: Use tgkill instead of tkill if possible.
6026 * sysdeps/unix/sysv/linux/fork.c: Likewise.
6027 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6028 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6029 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6031 2003-07-05 Ulrich Drepper <drepper@redhat.com>
6033 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6034 Fix use of parameter.
6035 (__libc_cleanup_pop): Likewise.
6037 2003-07-04 Ulrich Drepper <drepper@redhat.com>
6039 * init.c (sigcancel_handler): Change parameters to match handler
6040 for SA_SIGACTION. Check signal number and code to recognize
6041 invalid invocations.
6043 2003-07-03 Roland McGrath <roland@redhat.com>
6045 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6046 Apply sizeof (struct pthread) bias to r13 value.
6048 2003-07-03 Ulrich Drepper <drepper@redhat.com>
6050 * sysdeps/pthread/configure.in: Require CFI directives.
6052 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6054 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6055 libpthread compilation.
6056 * unwind.c (__pthread_unwind): Add hidden_def.
6057 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6059 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6061 * libc-cancellation.c (__libc_cleanup_routine): Define.
6062 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6063 (__pthread_cleanup_pop): Define.
6065 2003-07-01 Richard Henderson <rth@redhat.com>
6067 * sysdeps/alpha/elf/pt-initfini.c: New file.
6068 * sysdeps/alpha/pthread_spin_lock.S: New file.
6069 * sysdeps/alpha/pthread_spin_trylock.S: New file.
6070 * sysdeps/alpha/pthreaddef.h: New file.
6071 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6072 * sysdeps/alpha/tls.h: New file.
6073 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6074 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6075 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6076 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6077 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6078 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6079 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6080 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6081 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6082 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6084 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6086 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6087 cleanup support and unwind info.
6089 2003-06-30 Ulrich Drepper <drepper@redhat.com>
6091 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6092 Use correct cleanup handler registration. Add unwind info.
6093 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6094 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6095 * tst-once3.c: Add cleanup handler and check it is called.
6096 * tst-once4.c: Likewise.
6097 * tst-oncex3.c: New file.
6098 * tst-oncex4.c: New file.
6099 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6101 2003-06-29 Ulrich Drepper <drepper@redhat.com>
6103 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6105 2003-06-27 Ulrich Drepper <drepper@redhat.com>
6107 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6108 (tf_msgsnd): Likewise.
6110 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6111 premature returns a bit more.
6113 2003-06-26 Ulrich Drepper <drepper@redhat.com>
6115 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6116 definition to the front.
6118 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6119 the cleanup functions to make the names unique. Fix dwarf opcode
6121 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6122 functions to make the names unique. Fix CFA offset for two blocks.
6124 2003-06-25 Ulrich Drepper <drepper@redhat.com>
6126 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6127 missing closing braces.
6128 Patch by Christophe Saout <christophe@saout.de>.
6130 2003-06-24 Roland McGrath <roland@redhat.com>
6132 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6134 2003-06-24 Ulrich Drepper <drepper@redhat.com>
6136 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6137 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6139 * pthreadP.h: Declare __find_thread_by_id.
6140 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6141 * pthread_clock_gettime.c: Allow using other thread's clock.
6142 * pthread_clock_settime.c: Likewise.
6143 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6144 * Makefile: Add rules to build and run tst-clock2.
6145 * tst-clock2.c: New file.
6147 2003-06-23 Ulrich Drepper <drepper@redhat.com>
6149 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6150 to use exception-based cleanup handler.
6151 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6153 * tst-cond8.c (ch): Announce that we are done.
6155 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6157 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6158 Also test aio_suspend with timeout value.
6160 2003-06-22 Ulrich Drepper <drepper@redhat.com>
6162 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6163 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6166 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6167 (__pthread_mutex_lock_internal): Likewise.
6168 (__pthread_mutex_unlock_internal): Likewise.
6169 (__pthread_mutex_unlock_usercnt): Declare.
6170 * pthread_mutex_destroy.c: Always fail if used in any way.
6171 * pthread_mutex_init.c: Update comment.
6172 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6173 * pthread_mutex_timedlock.c: Adjust __nusers.
6174 * pthread_mutex_trylock.c: Adjust __nusers.
6175 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6176 and public interfaces are wrapper with pass additional parameter.
6177 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6179 * tst-mutex8.c: New file.
6180 * Makefile (tests): Add tst-mutex8.
6181 * sysdeps/pthread/pthread_cond_timedwait.c: Call
6182 __pthread_mutex_unlock_usercnt.
6183 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6184 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6185 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6186 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6187 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6188 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6189 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6191 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6192 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6193 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6194 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6195 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6197 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6198 * pthread_mutex_timedlock.c: Likewise.
6199 * pthread_mutex_trylock.c: Adjust __nusers.
6200 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6201 * tst-mutex9.c: New file.
6202 * Makefile (tests): Add tst-mutex9.
6203 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6204 * sysdeps/ia64/tls.h: Likewise.
6205 * sysdeps/powerpc/tls.h: Likewise.
6206 * sysdeps/s390/tls.h: Likewise.
6207 * sysdeps/sh/tls.h: Likewise.
6208 * sysdeps/x86_64/tls.h: Likewise.
6209 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6210 Change type of __owner.
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 2003-06-19 Jakub Jelinek <jakub@redhat.com>
6219 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6220 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6222 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6223 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
6224 instead of nr to lll_futex_wake. Only set errno and return -1
6227 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6228 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6229 return actual return value from the syscall, not 0.
6231 2003-06-18 Ulrich Drepper <drepper@redhat.com>
6233 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6234 find a random value.
6235 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
6238 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6239 compat_timer_settime.
6240 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6241 compat_timer_gettime.
6242 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6243 compat_timer_getoverrun.
6244 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6245 compat_timer_delete.
6247 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6248 error-checking mutex detect busy mutexes.
6250 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6252 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6253 Add ax to clobber list.
6254 (lll_mutex_cond_lock): Likewise.
6255 (lll_mutex_unlock): Likewise.
6256 (lll_lock): Likewise.
6257 (lll_unlock): Likewise.
6259 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6260 * tst-cancel18.c: New file.
6261 * tst-cancelx18.c: New file.
6263 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6266 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6267 * tst-cancel17.c: New file.
6268 * tst-cancelx17.c: New file.
6270 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6271 * sysdeps/unix/sysv/linux/sigwait.c: New file.
6272 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6274 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6276 2003-06-16 Jakub Jelinek <jakub@redhat.com>
6278 * sysdeps/pthread/createthread.c (create_thread): Set
6279 header.multiple_threads unconditionally.
6280 * allocatestack.c (allocate_stack): Likewise.
6281 * descr.h (struct pthread): Add header.multiple_threads
6283 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6284 Define for librt. #error if neither libpthread, libc nor librt.
6285 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6287 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6288 CDISABLE): Likewise.
6289 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6290 CDISABLE): Likewise.
6291 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6292 CDISABLE): Likewise.
6293 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6294 CDISABLE): Likewise. Access header.multiple_threads outside of
6295 libc and libpthread.
6296 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6298 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6299 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6301 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6303 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6304 Also test early cancellation before the thread reaches the cancellation
6307 * Makefile: Compile forward.c with exceptions.
6309 * sysdeps/unix/sysv/linux/sleep.c: New file.
6311 2003-06-16 Ulrich Drepper <drepper@redhat.com>
6313 * Makefile: Add CFLAGS definition to compile function wrappers
6314 duplicated from libc with exceptions.
6315 * tst-cancel4.c: Also check cancellation handlers.
6317 * Makefile: Add rules to build and run tst-cancel16 and
6318 tst-cancelx16. Add missing CFLAGS definitions.
6319 * tst-cancel16.c: New file.
6320 * tst-cancelx16.c: New file.
6322 2003-06-15 Ulrich Drepper <drepper@redhat.com>
6324 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6325 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6326 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6327 (DL_SYSINFO_IMPLEMENTATION): Likewise.
6329 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6330 (LIBC_CANCEL_RESET): Likewise.
6331 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6332 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6334 (CFLAGS-libcrt-cancellation.c): Define.
6335 * sysdeps/pthread/librt-cancellation.c: New file.
6336 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6337 macros also when compiling librt.
6338 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6339 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6340 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6341 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6342 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6343 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6344 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6346 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6347 compat_timer_create.
6349 2003-06-14 Ulrich Drepper <drepper@redhat.com>
6351 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6353 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6355 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6356 Add libc_hidden_def.
6358 2003-06-13 Roland McGrath <roland@redhat.com>
6360 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6361 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6363 2003-06-11 Ulrich Drepper <drepper@redhat.com>
6365 * allocatestack.c (queue_stack): Always inline.
6366 * ptreadhP.h (__do_cancel): Likewise.
6368 2003-06-10 Jakub Jelinek <jakub@redhat.com>
6370 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6373 2003-06-10 Ulrich Drepper <drepper@redhat.com>
6375 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6376 (__pthread_cond_signal): Remove incorrect second addition for
6379 2003-06-09 Ulrich Drepper <drepper@redhat.com>
6381 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6382 (__pthread_cond_signal): Use correct futex pointer in
6383 __lll_mutex_lock_wait call.
6385 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6386 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6388 2003-06-08 Ulrich Drepper <drepper@redhat.com>
6390 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6392 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6395 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6396 hand-written CFI generation code. Since ENTRY/END also initiated
6397 CFI frames this caused two CFI sets to be generated.
6399 2003-06-07 Ulrich Drepper <drepper@redhat.com>
6401 * cleanup_routine.c: New file.
6402 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6403 * sysdeps/pthread/pthread.h: Add support for fully exception-based
6405 * Makefile (libpthread-routines): Add cleanup_routine.
6406 Add more CFLAGS variables to compile with exceptions. Add comments
6407 why which file needs unwind tables.
6408 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6410 * tst-cancelx1.c: New file.
6411 * tst-cancelx2.c: New file.
6412 * tst-cancelx3.c: New file.
6413 * tst-cancelx4.c: New file.
6414 * tst-cancelx5.c: New file.
6415 * tst-cancelx6.c: New file.
6416 * tst-cancelx7.c: New file.
6417 * tst-cancelx8.c: New file.
6418 * tst-cancelx9.c: New file.
6419 * tst-cancelx10.c: New file.
6420 * tst-cancelx11.c: New file.
6421 * tst-cancelx12.c: New file.
6422 * tst-cancelx13.c: New file.
6423 * tst-cancelx14.c: New file.
6424 * tst-cancelx15.c: New file.
6425 * tst-cleanupx0.c: New file.
6426 * tst-cleanupx0.expect: New file.
6427 * tst-cleanupx1.c: New file.
6428 * tst-cleanupx2.c: New file.
6429 * tst-cleanupx3.c: New file.
6431 * tst-cleanup0.c: Make standard compliant.
6432 * tst-cleanup1.c: Likewise.
6434 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6435 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6436 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6437 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6438 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6439 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6440 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6442 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6443 * tst-cancel12.c: New file.
6444 * tst-cancel13.c: New file.
6445 * tst-cancel14.c: New file.
6446 * tst-cancel15.c: New file.
6447 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6450 * tst-cancel1.c: Add some comments.
6452 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6455 2003-06-06 Ulrich Drepper <drepper@redhat.com>
6457 * Makefile (CFLAGS-pthread_cancel.c): Define.
6459 2003-06-05 Ulrich Drepper <drepper@redhat.com>
6461 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6462 Change type of __writer element to int.
6463 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6464 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6465 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6466 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6467 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6468 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6469 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6470 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6471 Compare with TID to determine deadlocks.
6472 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6473 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6474 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6475 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6476 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6477 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6479 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6481 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6482 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6483 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6485 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6487 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6488 * Makefile (tests): Add tst-rwlock12.
6489 * tst-rwlock12.c: New file.
6491 2003-06-05 Jakub Jelinek <jakub@redhat.com>
6493 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6494 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6495 Remove bogus hidden_proto.
6496 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6498 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6499 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6500 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6501 ___lll_mutex_timedlock): Likewise.
6503 2003-06-04 Ulrich Drepper <drepper@redhat.com>
6505 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6506 (__pthread_cond_signal): Add some code to eventually handle
6509 2003-06-01 Ulrich Drepper <drepper@redhat.com>
6511 * Makefile (tests): Add tst-exec4.
6512 (tst-exec4-ARGS): Define.
6513 * tst-exec4.c: New file.
6515 2003-05-31 Ulrich Drepper <drepper@redhat.com>
6517 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6518 Also fail if tv_nsec < 0.
6519 (__lll_timedwait_tid): Likewise.
6520 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6521 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6523 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6525 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6527 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6529 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6531 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6534 * Makefile (tests): Add tst-sem8 and tst-sem9.
6535 * tst-sem8.c: New file.
6536 * tst-sem9.c: New file.
6537 * sem_open.c: Fix creation of in_use record if the file exists but
6540 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6543 * sysdeps/pthread/timer_create.c (timer_create): In case
6544 evp==NULL, assign timer ID to sival_ptr.
6546 * descr.h (struct pthread_unwind_buf): Change type of prev element to
6547 struct pthread_unwind_buf *.
6548 (struct pthread): Likewise for cleanup_jmp_buf element.
6550 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6551 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6552 * unwind.c (__pthread_unwind_next): Likewise.
6554 2003-05-30 Ulrich Drepper <drepper@redhat.com>
6556 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6557 (lll_futex_timed_wait): Use int for futex value parameter.
6558 (lll_futex_wake): Likewise.
6559 (lll_futex_requeue): Likewise.
6561 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6562 Replace one memory operation with one register operation.
6564 * tst-join4.c (do_test): Fix error message.
6566 * tst-rwlock6.c (do_test): Use correct format specifier.
6568 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6569 (__lll_mutex_lock_wait): Replace one memory operation with one
6571 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6572 (__lll_mutex_lock_wait): Likewise.
6574 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6575 (__lll_mutex_cond_lock): Add one to value parameter of
6576 __lll_lock_wait to reflect reality in the futex syscall.
6577 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6578 (lll_mutex_cond_lock): Likewise.
6580 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6582 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6584 (lll_mutex_cond_lock): Define.
6586 2003-05-29 Ulrich Drepper <drepper@redhat.com>
6588 * Makefile (tests): Add tst-signal6.
6589 * tst-signal6.c: New file.
6591 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6592 (__lll_mutex_unlock_force): New function
6593 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6595 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6596 (__lll_mutex_unlock_force): New function.
6597 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6599 * tst-rwlock7.c (do_test): Use correct format specifier.
6601 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6602 Find break parameter in correct asm argument.
6604 2003-05-27 Jakub Jelinek <jakub@redhat.com>
6606 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6608 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6610 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6612 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6613 lll_futex_requeue, lll_mutex_unlock_force): Define.
6615 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6617 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6618 (pthread_cond_t): Add __mutex.
6619 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6620 lll_futex_requeue, lll_mutex_unlock_force): Define.
6622 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6624 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6625 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6627 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6629 (lll_futex_wait, lll_futex_wake): Define.
6630 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6631 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6632 FUTEX_REQUEUE instead of FUTEX_WAIT.
6633 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6634 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6635 mutex which was used in condvar structure. Call
6636 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6637 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6639 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6640 include tcb-offsets.h. Read wakeup value in locked region.
6641 Use the value of gbr register as THREAD_ID.
6642 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6643 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6644 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6646 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6649 2003-05-28 Ulrich Drepper <drepper@redhat.com>
6651 * sysdeps/pthread/pthread_cond_broadcast.c
6652 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6654 2003-05-26 Ulrich Drepper <drepper@redhat.com>
6656 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6657 typo in register name.
6658 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6659 correctly. Actually use requeue. Little optimization.
6660 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6661 mutex address early. Handle cancellation state as 32-bit value.
6662 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6663 Remove unnecessary label.
6665 2003-05-25 Ulrich Drepper <drepper@redhat.com>
6667 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6668 instead of FUTEX_WAIT.
6669 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6670 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6671 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6672 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6673 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6674 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6675 used in condvar structure. Call __pthread_mutex_cond_lock instead
6676 of __pthread_mutex_lock_internal.
6677 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6678 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6679 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6680 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6681 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6682 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6683 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6684 Add pthread_mutex_cond_lock.
6685 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6686 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6687 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6688 lll_mutex_cond_lock.
6689 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6690 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6691 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6693 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6694 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6696 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6697 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6699 * pthreadP.h: Declare __pthread_mutex_cond_lock.
6700 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6701 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
6702 macro don't define aliases.
6704 * cancellation.c: Remove __pthread_enable_asynccancel_2.
6705 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6706 * sysdeps/pthread/pthread_cond_timedwait.c: Use
6707 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6708 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6709 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6710 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6711 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6712 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6714 2003-05-17 Ulrich Drepper <drepper@redhat.com>
6716 * sem_open.c: Fix one endless loop. Implement correct semantics
6717 wrt opening the same semaphore more then once.
6718 * sem_close.c: Adjust for sem_open change.
6719 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
6720 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6721 * Makefile (tests): Add tst-sem7.
6722 * tst-sem7.c: New file.
6724 2003-05-16 Roland McGrath <roland@redhat.com>
6726 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6727 uninitialized variable braino.
6729 2003-05-16 Ulrich Drepper <drepper@redhat.com>
6731 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6732 test for syscall availability.
6734 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6735 __no_posix_timers to -1 if the syscalls don't exist.
6737 * pthread_join.c (pthread_join): Set tid field of the joined
6738 thread to -1. This isn't necessary but helps to recognize some
6739 error conditions with almost no cost.
6741 * allocatestack.c (FREE_P): Also negative values indicate an
6744 * unwind.c: Include <unistd.h>.
6746 2003-05-14 Ulrich Drepper <drepper@redhat.com>
6748 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6750 2003-05-14 Jakub Jelinek <jakub@redhat.com>
6752 * Makefile (crti-objs, crtn-objs): New variables.
6753 (omit-deps, extra-objs): Add crtn.
6754 ($(objpfx)libpthread.so): Depend on both crti and crtn
6755 and links to them in multidir.
6756 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6758 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
6760 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6761 (lll_mutex_unlock): Use atomic_exchange_rel.
6763 2003-05-11 Ulrich Drepper <drepper@redhat.com>
6765 * cond-perf.c (cons): Add missing locking around setting of alldone.
6767 2003-05-10 Ulrich Drepper <drepper@redhat.com>
6769 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6771 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6773 2003-05-09 Ulrich Drepper <drepper@redhat.com>
6775 * tst-sem6.c: New file.
6776 * Makefile (tests): Add tst-sem6.
6778 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6779 Use atomic_exchange_rel instead of atomic_exchange.
6780 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6783 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6784 code for lll_futex_wait and lll_futex_wake in static apps. Use
6785 vsyscall is possible.
6787 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6788 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6789 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6790 pthread_setaffinity_np.
6791 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6792 and pthread_setaffinity_np.
6793 * Makefile (libpthread-routines): Add pthread_getaffinity and
6794 pthread_setaffinity.
6796 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6797 use it in case mmap to allocate the stack fails.
6798 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6799 ARCH_MAP_FLAGS here.
6800 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6803 2003-05-08 Ulrich Drepper <drepper@redhat.com>
6805 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6806 handler implementation. It is now lockless in fork().
6807 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6808 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6809 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
6810 declare the __fork_*_lists.
6811 (struct fork_handler): Include pointers to all three functions.
6812 Add next, refcntr and need_signal elements.
6813 (__fork_handlers): New declaration.
6814 (__register_atfork_malloc): Remove declaration.
6815 (HAVE_register_atfork_malloc): Remove definition.
6816 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6817 __pthread_child_handler variable.
6818 (__libc_pthread_init): Use __register_atfork instead of explicitly
6820 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6822 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6824 * unwind.c (unwind_cleanup): Print error message and then abort. This
6825 function must never be reached.
6827 * cond-perf.c: New file.
6829 2003-05-05 Ulrich Drepper <drepper@redhat.com>
6831 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6833 2003-05-04 Roland McGrath <roland@redhat.com>
6835 * Makefile ($(objpfx)../libc.so): New target.
6837 2003-05-02 Ulrich Drepper <drepper@redhat.com>
6839 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6840 (pthread_condattr_t): Size is only an int, don't use long for
6842 (pthread_mutexattr_t): Likewise.
6843 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6844 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6845 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6847 2003-05-01 Ulrich Drepper <drepper@redhat.com>
6849 * sysdeps/i386/tls.h: Define THREAD_ID.
6850 * sysdeps/ia64/tls.h: Likewise.
6851 * sysdeps/powerpc/tls.h: Likewise.
6852 * sysdeps/s390/tls.h: Likewise.
6853 * sysdeps/sh/tls.h: Likewise.
6854 * sysdeps/x86_64/tls.h: Likewise.
6855 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6857 * pthread_mutex_timedlock.c: Likewise.
6858 * pthread_mutex_trylock.c: Likewise.
6859 * pthread_mutex_unlock.c: Likewise.
6860 * pthread_rwlock_trywrlock.c: Likewise.
6861 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6862 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6863 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6864 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6866 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6869 2003-04-29 Jakub Jelinek <jakub@redhat.com>
6871 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6872 (__SIZEOF_PTHREAD_COND_T): Define to 48.
6873 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6874 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6875 Make __align long long instead of long.
6876 (pthread_rwlock_t): Formatting.
6877 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6878 (pthread_rwlock_t): Formatting.
6879 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6880 (pthread_cond_t): Make __align long long instead of long.
6881 (pthread_rwlock_t): Move __flags field to the same position as in
6884 2003-04-30 Ulrich Drepper <drepper@redhat.com>
6886 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6887 * tst-rwlock7.c (do_test): Likewise.
6889 2003-04-26 Roland McGrath <roland@redhat.com>
6891 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6893 2003-04-22 Jakub Jelinek <jakub@redhat.com>
6895 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6896 sizeof (struct pthread).
6897 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
6899 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6901 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
6903 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
6905 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
6907 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
6909 (NO_TLS_OFFSET): Define.
6910 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
6911 add TLS_TCB_SIZE unnecessarily.
6913 2003-04-22 Roland McGrath <roland@redhat.com>
6915 * Makeconfig (shared-thread-library): Reverse link order to work
6918 2003-04-22 Ulrich Drepper <drepper@redhat.com>
6920 * semaphore.h: Fix typo in comment.
6922 2003-04-21 Ulrich Drepper <drepper@redhat.com>
6924 * sysdeps/pthread/sigfillset.c: New file.
6926 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
6927 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
6928 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
6929 * sysdeps/pthread/sigaction.c: Likewise.
6930 * sysdeps/pthread/sigprocmask.c: New file.
6931 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
6933 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6934 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
6937 2003-04-19 Ulrich Drepper <drepper@redhat.com>
6939 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6940 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
6942 * sysdeps/unix/sysv/linux/unregister-atfork.c
6943 (__unregister_atfork): Don't free memory not allocated dynamically.
6945 * semaphore.h: Remove __THROW marker from cancellation points.
6946 * nptl/sysdeps/pthread/pthread.h: Likewise.
6948 2003-04-18 Ulrich Drepper <drepper@redhat.com>
6950 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
6951 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
6954 2003-04-16 Jakub Jelinek <jakub@redhat.com>
6956 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
6958 2003-04-15 Roland McGrath <roland@redhat.com>
6960 * forward.c (__pthread_unwind): Tweak to avoid warning.
6962 2003-04-15 Ulrich Drepper <drepper@redhat.com>
6964 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
6966 2003-04-14 Ulrich Drepper <drepper@redhat.com>
6968 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
6969 overflow CFA advance instructions.
6970 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6972 2003-04-14 Jakub Jelinek <jakub@redhat.com>
6974 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
6975 * sysdeps/i386/pthread_spin_lock.c: Likewise.
6976 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
6979 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
6980 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
6981 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
6982 DW_CFA_advance_loc for .Laddl-.Lsubl.
6984 2003-04-13 Ulrich Drepper <drepper@redhat.com>
6986 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
6987 position-independent unwind data for static libraries.
6988 Add missing unwind info. Add comments.
6990 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
6991 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6992 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6993 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6995 2003-04-12 Ulrich Drepper <drepper@redhat.com>
6997 * Makefile: Make sure all cancellation points are compiled with
6998 exception and asynchronous unwind tables.
7000 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7001 which mishandles loading of global object addresses in PIC.
7002 (THREAD_SETMEM_NC): Likewise.
7004 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7006 * pthread.h: Define new data structure for cleanup buffer. Declare
7007 new cleanup handler interfaces.
7008 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
7009 (struct pthread): Add cleanup_jmp_buf pointer. Define
7010 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7011 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
7012 it. Declare old cleanup handler installation functions.
7013 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
7015 * cleanup_defer.c: Likewise.
7016 * cleanup_compat.c: New file. Old cleanup code.
7017 * cleanup_def_compat.c: New file. Old cleanup code.
7018 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7019 if own thread descriptor.
7020 * unwind.c: New file.
7021 * forward.c: Add __pthread_unwind.
7022 * init.c (pthread_functions): Add __pthread_unwind.
7023 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7024 Add ptr___pthread_unwind.
7025 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7026 and unwind function.
7027 * Makefile (libpthread-routines): Add cleanup_compat,
7028 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
7029 table generation if necessary.
7030 * version.c: Record whether unwind support is compiled in.
7031 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7032 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7034 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7035 complication to generate unwind information for syscall wrappers.
7036 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7037 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7038 __cleanup_fct_attribute.
7040 * Makefile: Add rules to build and run tst-cleanup0.
7041 * tst-cleanup0.c: New file.
7042 * tst-cleanup0.expect: New file.
7044 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
7045 caller. Optimize to avoid often unecessary local variable.
7047 2003-04-11 Roland McGrath <roland@redhat.com>
7049 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7050 sets variable `multidir'; include that.
7051 (generated): Add it.
7052 ($(objpfx)$(multidir)/crti.o): New target.
7053 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7055 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7057 * tst-attr2.c (do_test): Add cast to avoid warning.
7058 * tst-mutex4.c (do_test): Likewise.
7060 2003-04-10 Ulrich Drepper <drepper@redhat.com>
7062 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7065 2003-04-09 Ulrich Drepper <drepper@redhat.com>
7067 * Makefile (tests): Add tst-detach1.
7068 * tst-detach1.c: New file.
7070 2003-04-08 Ulrich Drepper <drepper@redhat.com>
7072 * sysdeps/pthread/pthread.h: Remove duplicate
7073 pthread_cleanup_{push,pop} definitions.
7075 * tst-barrier2.c: Eliminate warnings.
7076 * tst-cancel4.c: Likewise.
7077 * tst-cond4.c: Likewise.
7078 * tst-cond6.c: Likewise.
7079 * tst-detach1.c: Likewise.
7080 * tst-rwlock4.c: Likewise.
7081 * tst-rwlock6.c: Likewise.
7082 * tst-rwlock7.c: Likewise.
7083 * tst-sem3.c: Likewise.
7084 * tst-spin2.c: Likewise.
7085 * tst-umask1.c: Likewise.
7087 2003-04-07 Ulrich Drepper <drepper@redhat.com>
7089 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7091 2003-04-06 Ulrich Drepper <drepper@redhat.com>
7093 * descr.h (struct pthread): Move cancelhandling member to the front.
7095 2003-04-05 Ulrich Drepper <drepper@redhat.com>
7097 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7098 malloc_parent, and malloc_child statically.
7099 (__register_atfork_malloc): New function.
7100 (free_mem): Don't free any of the malloc_* variables on the list.
7101 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7102 Define HAVE_register_atfork_malloc.
7104 2003-04-04 Ulrich Drepper <drepper@redhat.com>
7106 * sysdeps/pthread/createthread.c (create_thread): Add some more
7107 comments explaining when to set multiple_threads and when not.
7109 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7110 THREAD_ATOMIC_BIT_SET if not already defined.
7111 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7112 THREAD_ATOMIC_BIT_SET:
7113 * sysdeps/x86_64/tls.h: Likewise.
7114 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7115 THREAD_ATOMIC_CMPXCHG_VAL.
7116 (_pthread_cleanup_pop_restore): Likewise.
7117 * cancellation.c (__pthread_enable_asynccancel): Likewise.
7118 (__pthread_enable_asynccancel_2): Likewise.
7119 (__pthread_disable_asynccancel): Likewise.
7120 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7121 (__libc_disable_asynccancel): Likewise.
7122 * init.c (sigcancel_handler): Likewise.
7123 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7124 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7126 2003-04-03 Ulrich Drepper <drepper@redhat.com>
7128 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7129 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7130 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7131 * Makefile (tests): Add tst-cancel11.
7132 * tst-cancel11.c: New file.
7134 2003-04-01 Ulrich Drepper <drepper@redhat.com>
7136 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7137 round, not the first. Use specific_used flag instead of local
7138 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
7139 (__free_tcb): Don't call deallocate_tsd here.
7140 (start_thread): Call deallocate_tsd here.
7141 * pthread_setspecific.c: Set specific_used flag really only when
7143 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7144 * tst-tsd3.c: New file.
7145 * tst-tsd4.c: New file.
7147 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7149 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7150 Use atomic_exchange_and_add instead of __lll_add.
7151 (__lll_mutex_timedlock): Likewise.
7152 Patch by Ian Wienand.
7154 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
7156 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7157 (SINGLE_THREAD_P): Fix typo.
7158 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7160 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7162 * Makefile (tests): Add tst-align.
7163 * tst-align.c: New file.
7164 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7166 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7169 * tst-tsd2.c: Add casts to avoid warnings.
7171 2003-03-30 Ulrich Drepper <drepper@redhat.com>
7173 * descr.h (struct pthread): Move most often used elements to the front.
7175 2003-03-29 Ulrich Drepper <drepper@redhat.com>
7177 * Makefile (libpthread-routines): Add pthread_atfork.
7178 (libpthread-static-only-routines): Add pthread_atfork.
7180 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7182 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7184 (INSTALL_DTV): Add parens.
7185 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7186 Use passed descr instead of THREAD_SELF.
7187 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7188 (__lll_mutex_timedlock_wait): Correct expected value after
7190 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7191 Release lock before waking up the waiters.
7192 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7193 criteria. Reorderstruct passed to cleanup handler. Fix
7194 handling of cancellation and failung pthread_mutex_unlock call.
7195 Use __pthread_enable_asynccancel_2 instead of
7196 __pthread_enable_asynccancel.
7197 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7198 Return result of lock re-get if it fails.
7199 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7200 for __pthread_cleanup_push.
7201 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7202 completely broken rwlock implementation.
7203 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7204 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7205 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7206 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7207 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7208 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
7209 versioned_symbol macro.
7210 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7211 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7213 2003-03-27 Ulrich Drepper <drepper@redhat.com>
7215 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7216 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
7218 (struct timer): Remove th and bar field.
7219 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7220 debugging code. Create only one helper thread.
7221 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7223 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7224 Renamed. Define statically. Use thread info from siginfo.
7225 (__helper_once): New variable.
7226 (__helper_tid): New variable.
7227 (__reset_helper_control): New function.
7228 (__start_helper_thread): New function.
7230 * pthread_create.c (start_thread): Don't use setjmp inside
7231 __builtin_expect to work around gcc bug.
7233 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7234 timer_delete syscall fails, but not with ENOSYS, set
7237 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7238 (timer_settime): Fix typo.
7239 * sysdeps/unix/sysv/linux/timer_getoverr.c
7240 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7242 2003-03-27 Jakub Jelinek <jakub@redhat.com>
7244 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7245 offset of cleanupbuf.__prev.
7247 2003-03-26 Jakub Jelinek <jakub@redhat.com>
7249 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7252 2003-03-26 Ulrich Drepper <drepper@redhat.com>
7254 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7255 NULL provide default definition to syscall.
7257 2003-03-25 Roland McGrath <roland@redhat.com>
7259 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7260 (timer_id2ptr): Fix typo.
7262 2003-03-25 Ulrich Drepper <drepper@redhat.com>
7264 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7265 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7266 * sysdeps/ia64/pthreaddef.h: Likewise.
7267 * sysdeps/powerpc/pthreaddef.h: Likewise.
7268 * sysdeps/s390/pthreaddef.h: Likewise.
7269 * sysdeps/sh/pthreaddef.h: Likewise.
7270 * sysdeps/x86_64/pthreaddef.h: Likewise.
7271 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7272 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7274 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7275 SIGTIMER is not unblocked.
7276 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7278 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7280 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7281 pass pointer through as ID.
7282 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7283 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7284 * sysdeps/unix/sysv/linux/timer_create.c: New file.
7285 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7286 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7287 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7288 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7289 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7290 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7291 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7292 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7293 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7294 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7295 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7296 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7297 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7298 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7299 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7300 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7301 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7302 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7303 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7304 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7305 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7306 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7307 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7308 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7309 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7310 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7311 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7312 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7313 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7314 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7316 * pthreadP.h: Remove FRAME_LEFT definition.
7317 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7318 already left frame. Programs which have this problem are not POSIX
7320 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7322 2003-03-24 Ulrich Drepper <drepper@redhat.com>
7324 * sysdeps/pthread/tst-timer.c: Check return values of the
7327 2003-03-23 Roland McGrath <roland@redhat.com>
7329 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7330 * tst-tls3mod.c: Likewise.
7331 * tst-tls1.c: Likewise.
7332 * tst-tls2.c: Likewise.
7334 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7337 * tst-join5.c (tf1, tf2): Add a cast.
7339 * Makeconfig (includes): Append -I$(..)nptl to this variable.
7341 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7342 Don't test anything.
7343 * tst-cond4.c: Likewise.
7344 * tst-cond6.c: Likewise.
7345 * tst-flock2.c: Likewise.
7346 * tst-mutex4.c: Likewise.
7347 * tst-rwlock4.c: Likewise.
7348 * tst-signal1.c: Likewise.
7349 * tst-spin2.c: Likewise.
7350 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7352 * tst-mutex4.c: Use test-skeleton.c.
7353 * tst-spin2.c: Likewise.
7354 * tst-sysconf.c: Likewise.
7355 * tst-barrier2.c: Likewise.
7356 * tst-cond4.c: Likewise.
7357 * tst-cond6.c: Likewise.
7358 * tst-rwlock4.c: Likewise.
7359 * tst-unload.c: Likewise.
7360 * tst-flock2.c (do_test): Use return instead of exit.
7362 2003-03-22 Jakub Jelinek <jakub@redhat.com>
7364 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7366 2003-03-21 Ulrich Drepper <drepper@redhat.com>
7368 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7369 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7370 instead of __lll_compare_and_swap.
7371 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7373 Removed definition if __lll_compare_and_swap.
7375 * cancellation.c: Adjust for new form of compare&exchange macros.
7376 * cleanup_defer.c: Likewise.
7378 * libc-cancellation.c: Likewise.
7379 * old_pthread_cond_broadcast.c: Likewise.
7380 * old_pthread_cond_signal.c: Likewise.
7381 * old_pthread_cond_timedwait.c: Likewise.
7382 * old_pthread_cond_wait.c: Likewise.
7383 * pthread_cancel.c: Likewise.
7384 * pthread_create.c: Likewise.
7385 * pthread_detach.c: Likewise.
7386 * pthread_join.c: Likewise.
7387 * pthread_key_delete.c: Likewise.
7388 * pthread_setcancelstate.c: Likewise.
7389 * pthread_setcanceltype.c: Likewise.
7390 * pthread_timedjoin.c: Likewise.
7391 * pthread_tryjoin.c: Likewise.
7392 * sysdeps/pthread/createthread.c: Likewise.
7394 2003-03-20 Ulrich Drepper <drepper@redhat.com>
7396 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7397 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7398 definitions. Replace uses with calls to atomic_* functions.
7399 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7400 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7401 __lll_test_and_set calls with atomic_exchange_and_add and
7402 atomic_exchange calls respectively.
7403 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7404 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7405 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7406 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7407 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7408 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7409 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7411 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7412 returns the old value.
7414 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
7416 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7417 int for variable OLDVAL and correct inline assembler contraint.
7418 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7419 type int for variable OLD.
7421 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7423 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7424 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7425 instead of multiple_threads field in the TCB.
7427 2003-03-19 Ulrich Drepper <drepper@redhat.com>
7429 * sysdeps/i386/i686/bits/atomic.h: Removed.
7430 * sysdeps/i386/i586/bits/atomic.h: Removed.
7431 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
7432 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
7433 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
7434 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
7435 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
7436 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
7437 * atomic.h: Removed. Moved to glibc.
7439 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7440 support for clock selection.
7442 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7445 2003-03-18 Roland McGrath <roland@redhat.com>
7447 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7448 Add __lll_rel_instr first. Add memory clobber.
7449 (lll_mutex_unlock): Use __lll_test_and_set.
7450 From Paul Mackerras <paulus@samba.org>.
7452 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7454 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7455 (SINGLE_THREAD_P): Add `header.' prefix.
7456 From Paul Mackerras <paulus@samba.org>.
7458 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7459 pthread_timedjoin_np to ...
7460 (libpthread: GLIBC_2.3.3): ... here.
7461 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7463 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7464 Avoid shadowing VAL variable.
7466 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7469 2003-03-18 Ulrich Drepper <drepper@redhat.com>
7471 * Makefile (tests): Add tst-cond11.
7472 * tst-cond11.c: New file.
7474 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7475 struct passed to cleanup handler to eliminate one more
7477 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7479 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7480 (pthrad_cond_t): Replace __unused field with __clock.
7482 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7483 waken all waiters in cleanup handler.
7484 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7485 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7487 * pthread_condattr_getclock.c: New file.
7488 * pthread_condattr_setclock.c: New file.
7489 * sysdeps/pthread/pthread.h: Declare these new functions.
7490 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7491 * Makefile (libpthread-routines): Add the new functions.
7492 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7493 Renamed field to value. Document use of the bits.
7494 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7496 * pthread_condattr_setpshared.c: Likewise.
7497 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7498 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7499 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7501 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7502 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7503 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7504 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7505 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7506 Implement clock selection.
7507 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7508 * pthread-errnos.sym: Add ENOSYS.
7509 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7510 _POSIX_CLOCK_SELECTION.
7511 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7513 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7514 invalid .size directive.
7516 2003-03-17 Roland McGrath <roland@redhat.com>
7518 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7521 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7523 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7524 Use __lll_add instead of spelling it out. Use protected symbol names.
7525 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7527 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7528 Renamed from lll_compare_and_swap. Use new name where necessary.
7529 (__lll_add): Defined.
7530 (__lll_dec_if_positive): Defined.
7531 (__lll_test_and_set): Defined.
7532 * sysdeps/ia64/pthread_spin_init.c: Removed.
7533 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7534 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7535 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7536 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7537 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7538 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7539 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7540 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7541 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7542 __sync_lock_release_si.
7543 Patch by Jakub Jelinek.
7545 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7546 Fix timeout handling.
7547 (__lll_timedwait_tid): Likewise.
7548 (lll_unlock_wake_cb): Wake up other waiters if necessary.
7549 Patch by Jakub Jelinek.
7551 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7553 2003-03-17 Roland McGrath <roland@redhat.com>
7555 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7556 * sysdeps/pthread/pthread_spin_init.c: New file.
7557 * sysdeps/pthread/pthread_spin_unlock.c: New file.
7558 * sysdeps/powerpc/Makefile: New file.
7559 * sysdeps/powerpc/pthread_spin_lock.c: New file.
7560 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7561 * sysdeps/powerpc/pthreaddef.h: New file.
7562 * sysdeps/powerpc/tcb-offsets.sym: New file.
7563 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7564 * sysdeps/powerpc/tls.h: New file.
7565 * sysdeps/powerpc/bits/atomic.h: New file.
7566 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7567 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7568 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7570 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7571 * sysdeps/unix/sysv/linux/sem_post.c: New file.
7572 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7573 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7574 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7575 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7576 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7577 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7578 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7579 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7580 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7581 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7582 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7583 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7584 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7586 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7588 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7589 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7590 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7591 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7592 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7594 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7596 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7597 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7598 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7599 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7600 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7602 2003-03-16 Roland McGrath <roland@redhat.com>
7604 * tst-fork4.c: Include <string.h>.
7605 * tst-signal2.c: Likewise.
7606 * tst-mutex5.c (do_test): exit -> return.
7607 * tst-mutex2.c: Include <stdlib.h>.
7609 2003-03-16 Ulrich Drepper <drepper@redhat.com>
7611 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7612 (__lll_mutex_timedlock_wait): Correct expected value after
7613 spurious wakeup. Otherwise we would never wait again.
7615 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7616 zone versus inline asm stupidity. Use correct instructions.
7618 * tst-rwlock6.c: Add some more status output.
7620 2003-03-15 Roland McGrath <roland@redhat.com>
7622 * sysdeps/pthread/configure.in: New file.
7623 * sysdeps/pthread/configure: New file (generated).
7625 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7627 * allocatestack.c (allocate_stack): Store the exact stack size of
7628 user allocated stacks.
7630 2003-03-15 Jakub Jelinek <jakub@redhat.com>
7632 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7633 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7634 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7635 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7636 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7637 Use `header.' prefix.
7638 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7640 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7642 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7643 __builtin_frame_address, use stack pointer.
7645 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7646 instead of __builtin_frame_pointer.
7648 2003-03-14 Ulrich Drepper <drepper@redhat.com>
7650 * tst-basic1.c (do_test): Add cast to avoid warning.
7651 * tst-basic2.c (do_test): Likewise.
7653 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7654 amount of stack correction.
7656 * tst-fork4.c: Use test-skeleton.c.
7658 2003-03-14 Roland McGrath <roland@redhat.com>
7660 * init.c: Fix typo "#eli" for "#else".
7662 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
7664 * allocatestack.c (__stack_user): Use hidden_data_def.
7665 * pthread_create.c (__pthread_keys): Likewise.
7667 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7669 2003-03-14 Roland McGrath <roland@redhat.com>
7671 * tst-fork4.c: New file.
7672 * Makefile (tests): Add it.
7674 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7675 we always define the padding space.
7676 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7677 stopped supporting its own extensions fully.
7678 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7679 struct also called `header', so `header.multiple_threads' is the field
7680 name to use on all machines.
7681 * allocatestack.c (allocate_stack): Use `header.' prefix.
7682 * sysdeps/pthread/createthread.c (create_thread): Likewise.
7683 * pthread_create.c (__pthread_create_2_1): Likewise.
7684 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7685 (THREAD_SELF): Likewise.
7686 * sysdeps/x86_64/tls.h: Likewise.
7687 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7688 (SINGLE_THREAD_P): Likewise.
7689 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7690 (SINGLE_THREAD_P): Likewise.
7691 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7692 (SINGLE_THREAD_P): Likewise.
7694 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7697 2003-03-14 Ulrich Drepper <drepper@redhat.com>
7699 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7700 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7702 * pthread_create.c (start_thread): setjmp is expected to return 0.
7704 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7705 (THREAD_GETMEM_NC): Likewise.
7707 2003-03-13 Ulrich Drepper <drepper@redhat.com>
7709 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7710 and the size of the stack which must be allocated is a multiple,
7711 allocate one more page.
7712 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7713 MULTI_PAGE_ALIASING.
7715 2003-03-13 Roland McGrath <roland@redhat.com>
7717 * pthread_create.c (start_thread): Set EXITING_BIT after the
7718 event-reporting (and destructors), not before.
7720 2003-03-13 Jakub Jelinek <jakub@redhat.com>
7722 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7723 lll_futex_wake): Declare register variables as long int instead of
7724 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7725 Make syscall arguments clobbered by the syscall.
7726 (lll_futex_wait): Define using lll_futex_timed_wait.
7728 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7731 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7734 * allocatestack.c (nptl_ncreated): Only declare if
7735 COLORING_INCREMENT != 0.
7737 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7738 (__libc_enable_asynccancel_2): Remove prototype.
7740 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7741 ctid to match kernel.
7743 2003-03-12 Ulrich Drepper <drepper@redhat.com>
7745 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7746 libc_multiple_threads.
7747 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7748 __libc_multiple_threads to...
7749 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
7751 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7753 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7754 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7756 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7757 (__pthread_once_internal): Define.
7759 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7760 macros instead of .symver directly.
7761 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7762 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7764 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7765 * sysdeps/x86_64/tcb-offsets.sym: New file.
7766 * sysdeps/x86_64/Makefile: New file.
7768 * sysdeps/i386/tcb-offsets.sym: Add SELF.
7769 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7770 to access own pthread_t in TCB.
7771 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7773 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7775 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7777 2003-03-12 Roland McGrath <roland@redhat.com>
7779 * pthread-errnos.sym: New file.
7780 * Makefile (gen-as-const-headers): New variable, list that file.
7781 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7782 header <pthread-errnos.h> instead of defining errno values here.
7783 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7784 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7785 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7786 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7787 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7789 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7791 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7792 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7793 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7794 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7795 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7796 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7797 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7798 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7799 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7800 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7801 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7802 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7803 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7804 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7805 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7806 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7807 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7808 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7809 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7810 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7811 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7812 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7813 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7814 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7815 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7816 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7817 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7819 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7820 CLONE_CHILD_SETTID worked.
7822 2003-03-12 Ulrich Drepper <drepper@redhat.com>
7824 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7826 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7829 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7830 (pthread_cond_t): Add padding.
7832 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7833 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7834 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7836 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7837 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7838 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7839 (__pthread_rwlock_timedrdlock): Likewise.
7840 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7841 (__pthread_rwlock_wrlock): Likewise.
7842 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7843 (__pthread_rwlock_rdlock): Likewise.
7845 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7847 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7848 result of lock re-get if it fails.
7850 2003-03-11 Ulrich Drepper <drepper@redhat.com>
7852 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7853 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7854 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7855 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7856 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7857 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7858 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7859 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7860 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7861 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7863 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7864 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7866 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7867 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7868 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7869 (create_thread): Likewise.
7870 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7871 * init.c (__pthread_initialize_minimal_internal): Initialize
7872 __libc_multiple_threads_ptr if necessary.
7873 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
7874 __pthread_multiple_threads and __libc_multiple_threads_ptr.
7875 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7876 __libc_multiple_threads.
7877 (__libc_pthread_init): Return pointer to __libc_pthread_init if
7880 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7881 (THREAD_SETMEM_NC): Likewise.
7883 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7884 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7885 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7886 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7888 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7889 Eliminate one entire instruction.
7891 * cancellation.c (__pthread_enable_asynccancel_2): New function.
7892 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7893 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7894 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7895 instead of __pthread_enable_asynccancel.
7896 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7897 (__pthread_cond_wait): Likewise.
7898 * sysdeps/pthread/pthread_cond_timedwait.c
7899 (__pthread_cond_timedwait): Likewise.
7900 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7902 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7903 (__condvar_cleanup): Wake up all waiters in case we got signaled
7904 after being woken up but before disabling asynchronous
7906 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7907 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7908 (__condvar_cleanup): Likewise.
7910 * init.c (__NR_set_tid_address): If already defined, don't redefine.
7911 Make it an error if architecture has no #if case. Add x86-64.
7913 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
7914 pt-initfini.s generation.
7916 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
7917 (TLS_INIT_TP): Fix typo.
7919 2003-03-11 Jakub Jelinek <jakub@redhat.com>
7921 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
7922 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
7924 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
7925 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7926 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
7927 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
7928 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
7929 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7930 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7931 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7933 2003-03-11 Ulrich Drepper <drepper@redhat.com>
7935 * sysdeps/pthread/pthread_cond_timedwait.c
7936 (__pthread_cond_timedwait): Return the result of the final
7937 locking. If it succeeds, the regular function return value.
7939 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
7940 Return result of the final locking.
7941 * version.c (__nptl_main): Work around problems with the strange
7942 INTERNAL_SYSCALL macro on ppc32.
7943 * init.c (__pthread_initialize_minimal_internal): Unblock
7944 SIGCANCEL in case the parent blocked it.
7945 Reported by Paul Mackerras <paulus@samba.org>.
7947 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
7948 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
7949 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
7951 2003-03-11 Jakub Jelinek <jakub@redhat.com>
7953 * sysdeps/pthread/pthread_cond_timedwait.c
7954 (__pthread_cond_timedwait): Unlock and fail if
7955 __pthread_mutex_unlock_internal failed.
7957 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
7958 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
7960 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
7961 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
7962 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
7963 ALLOCATE_STACK): New macros.
7964 (TLS_TPADJ): New macro.
7965 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
7966 (allocate_stack): Handle TLS_DTV_AT_TP and
7967 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
7968 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
7970 * init.c [__ia64__] (__NR_set_tid_address): Define.
7972 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
7973 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
7974 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
7975 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
7976 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
7977 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
7978 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
7979 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
7980 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
7981 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
7982 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
7983 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
7984 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
7985 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
7986 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
7987 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
7988 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
7989 * sysdeps/ia64/bits/atomic.h: New file.
7990 * sysdeps/ia64/Makefile: New file.
7991 * sysdeps/ia64/pthread_spin_init.c: New file.
7992 * sysdeps/ia64/pthread_spin_lock.c: New file.
7993 * sysdeps/ia64/pthread_spin_trylock.c: New file.
7994 * sysdeps/ia64/pthread_spin_unlock.c: New file.
7995 * sysdeps/ia64/pthreaddef.h: New file.
7996 * sysdeps/ia64/tcb-offsets.sym: New file.
7997 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
7998 * sysdeps/ia64/tls.h: New file.
8000 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8001 to syscall instead of no arguments.
8003 2003-03-10 Ulrich Drepper <drepper@redhat.com>
8005 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8006 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8007 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8008 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8010 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8013 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8015 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8016 lowlevelbarrier.sym.
8017 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8018 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8019 Include lowlevelbarrier.h and don't define offsets locally.
8020 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8022 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8023 (__lll_mutex_lock_wait): Reverse order of first two parameters.
8024 (__lll_mutex_timedlock_wait): Likewise.
8025 (lll_mutex_lock): Adjust asm for that.
8026 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
8027 (lll_lock): Adjust asm for operand order change.
8028 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8029 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8031 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8032 Reverse order of parameters.
8033 (__lll_timedwait_tid): Remove regparms attribute.
8034 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8035 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8037 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8038 (__lll_timedwait_tid): Remove one unnecessary instruction.
8040 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8041 __lll_mutex_timedlock_wait only for NOT_IN_libc.
8042 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8045 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8046 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8048 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8051 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8052 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
8054 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8055 define LOCK here (if UP is not defined). The actual code is in
8058 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8059 LOCK is already defined. Don't define lll_unlock_wake_cb and
8060 __lll_timedwait_tid for libc.so.
8061 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8062 define LOCK here (if UP is not defined). The actual code is in
8065 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8066 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8067 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8068 instead of lowlevelsem.h.
8069 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8070 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8071 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8073 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8075 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8076 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8077 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8079 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8081 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8084 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8086 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8087 of __libc_locking_needed.
8088 (lll_trylock): Initialize %eax to zero.
8090 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8091 pthread_cond_t definition.
8093 2003-03-10 Roland McGrath <roland@redhat.com>
8095 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8096 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8097 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8098 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8099 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8101 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8102 Instead of setting PD->multiple_threads, set globals
8103 __pthread_multiple_threads and __libc_multiple_threads.
8104 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8105 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8106 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8108 * descr.h (struct pthread): Conditionalize first member on
8109 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
8110 containing an anonymous tcbhead_t. Move `list' member out.
8111 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8112 * allocatestack.c: Remove use of `header.data.' prefix.
8113 * pthread_create.c: Likewise.
8114 * init.c (__pthread_initialize_minimal_internal): Likewise.
8115 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8116 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8117 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8118 * sysdeps/x86_64/tls.h: Likewise.
8119 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8120 (SINGLE_THREAD_P): Likewise.
8121 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8122 (SINGLE_THREAD_P): Likewise.
8123 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8124 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8126 2003-03-09 Ulrich Drepper <drepper@redhat.com>
8128 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8130 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8131 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8133 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8134 leftovers from the ia32 code.
8136 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8138 (clear_once_control): Don't load %esi.
8140 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8143 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8145 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8146 * sysdeps/unix/sysv/linux/createthread.c: ...here.
8148 * Makefile (tests): Add tst-cond10.
8149 * tst-cond10.c: New file.
8151 2003-03-08 Ulrich Drepper <drepper@redhat.com>
8153 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8154 * tst-signal3.c (do_test): Likewise.
8155 * tst-sem5.c (do_test): Likewise.
8156 * tst-kill6.c (do_test): Likewise.
8157 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
8159 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8161 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8162 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8163 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8164 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8165 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8166 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8167 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8169 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8171 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8172 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8173 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8174 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8175 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8176 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8177 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8178 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8180 * allocatestack.c (allocate_stack): If mprotect() fails free the
8183 2003-03-07 Ulrich Drepper <drepper@redhat.com>
8185 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8187 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8188 lll_wake_tid. This was used only to work around kernel limits in
8190 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8191 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8192 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8193 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8195 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8196 (__pthread_initialize_minimal_internal): Change initialization of
8197 __static_tls_align_m1 appropriately.
8198 * pthreadP.h (__static_tls_align_m1): Renamed from
8200 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8201 instead of __static_tls_align-1.
8203 2003-03-04 Ulrich Drepper <drepper@redhat.com>
8205 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8207 * pthread_create.c: Define __pthread_keys using nocommon
8208 attribute, not by placing it explicitly in bss.
8209 Remove DEFINE_DEALLOC definition. Not needed anymore.
8211 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8212 Use it in mmap call to allocate stacks.
8214 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8216 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8217 result of the thread function.
8219 2003-03-03 Ulrich Drepper <drepper@redhat.com>
8221 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
8222 version is just fine.
8224 * sysdeps/unix/sysv/linux/libc_pthread_init.c
8225 (__pthread_child_handler): Renamed from pthread_child_handler,
8226 exported, and marked hidden. Change all users.
8227 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8228 free __pthread_child_handler from child list.
8230 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
8232 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8234 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8235 Fix handling of cancellation and failing pthread_mutex_unlock call.
8236 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8237 (__pthread_cond_wait): Likewise.
8239 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8240 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8241 lll_futex_timed_wait call.
8242 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8243 (pthread_rwlock_timedwrlock): Likewise.
8245 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8246 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8247 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8249 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8250 check of lll_futex_wake return value.
8252 2003-03-03 Roland McGrath <roland@redhat.com>
8254 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8256 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8257 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8258 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8260 2003-03-02 Ulrich Drepper <drepper@redhat.com>
8262 * sysdeps/pthread/timer_create.c (timer_create): Return correct
8263 error for CPU clocks.
8265 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8266 _POSIX_MONOTONIC_CLOCK.
8267 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8269 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8272 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8274 * descr.h (struct pthread): Move cleanup field to the front.
8276 2003-03-01 Roland McGrath <roland@redhat.com>
8278 * sem_open.c (sem_open): Braino fix.
8280 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8282 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8283 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8284 __pthread_cleanup_pop functionality.
8285 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8287 * descr.h (struct pthread): Move tid field to the front now that
8290 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8291 (__lll_mutex_timedlock_wait): Remove.
8292 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8293 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8294 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8295 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8296 (lll_unlock_wake_cb): Don't save and restore %esi.
8297 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8299 (__lll_timedwait_tid): Add alignment.
8300 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8301 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8303 (__lll_timedwait_tid): Removed.
8304 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8305 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8306 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8307 (pthread_barrier_wait): Don't save, load, and restore %esi for
8309 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8310 (__pthread_cond_signal): Don't save, load, and restore %esi.
8311 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8312 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8313 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8314 Don't save, load, and restore %esi.
8316 2003-02-27 Ulrich Drepper <drepper@redhat.com>
8318 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8319 Release lock before waking up the waiters.
8321 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8323 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8324 (reader_thread): Likewise.
8326 * sysdeps/pthread/pthread_rwlock_unlock.c
8327 (__pthread_rwlock_unlock): Release internal lock early. Don't try
8328 to wake up readers if there are none.
8330 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8331 Release internal lock before wake threads.
8333 2003-02-26 Ulrich Drepper <drepper@redhat.com>
8335 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8336 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
8338 * tst-rwlock9.c: Likewise.
8339 * tst-rwlock10.c: New file.
8340 * tst-rwlock11.c: New file.
8342 * Makefile (tests): Add tst-dlsym1.
8343 * tst-dlsym1.c: New file.
8345 * init.c (__pthread_initialize_minimal_internal): Set
8346 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8347 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8349 2003-02-24 Ulrich Drepper <drepper@redhat.com>
8351 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8353 * tst-cond2.c: Fix sychronization with child.
8355 * tst-rwlock8.c (reader_thread): Remove unused variable.
8357 * Makefile: Add rules to build and run tst-tls3.
8358 * tst-tls3.c: New file.
8359 * tst-tls3mod.c: New file.
8361 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8362 * tst-rwlock8.c: New file.
8363 * tst-rwlock9.c: New file.
8364 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8365 complete broken rwlock implementation.
8366 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8368 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8370 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8371 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8372 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8373 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8374 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8375 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8376 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8378 2003-02-23 Roland McGrath <roland@redhat.com>
8380 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8382 2003-02-23 Ulrich Drepper <drepper@redhat.com>
8384 * Makefile (tests): Add tst-context1.
8385 * tst-context1.c: New file.
8387 * Makefile (tests): Add tst-tls1 and tst-tls2.
8388 * tst-tls1.c: New file.
8389 * tst-tls2.c: New file.
8391 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8394 * pthread_create.c (start_thread): Set EXITING_BIT early.
8396 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8397 (THREAD_GETMEM_NC): Likewise.
8399 2003-02-22 Ulrich Drepper <drepper@redhat.com>
8401 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8402 off 3 more bytes by using offset-less instructions when possible.
8404 * Makefile: Add dependency for $(objpfx)version.d.
8406 * eintr.c (eintr_source): Add unnecessary return but the compiler
8409 * tst-kill3.c: Include <unistd.h>.
8411 2003-02-21 Roland McGrath <roland@redhat.com>
8413 * pthread_create.c (start_thread): Call __libc_thread_freeres.
8415 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8417 * Makefile (tests): Add tst-eintr1.
8418 (distribute): Add eintr.c.
8419 * tst-eintr1.c: New file.
8420 * eintr.c: New file.
8422 * pthread_cancel.c (pthread_cancel): Use tkill directly.
8424 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8425 Disallow sending SIGCANCEL.
8427 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
8428 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8429 * tst-kill1.c: New file.
8430 * tst-kill2.c: New file.
8431 * tst-kill3.c: New file.
8432 * tst-kill5.c: New file.
8433 * tst-kill6.c: New file.
8434 * tst-basic7.c: Renamed to...
8435 * tst-kill4.c: ...this.
8437 2003-02-21 Roland McGrath <roland@redhat.com>
8439 * Makefile (install-lib-ldscripts): New variable.
8441 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8443 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8444 * pthread_cancel.c: Use INVALID_TD_P.
8445 * pthread_detach.c: Likewise.
8446 * pthread_getschedparam.c: Likewise.
8447 * pthread_setschedparam.c: Likewise.
8448 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8449 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8450 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8451 * pthread_timedjoin.c: Likewise.
8453 * tst-basic7.c: Include <signal.h>.
8455 * pthread_join.c (pthread_join): Limited checking for invalid
8457 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8459 2003-02-20 Ulrich Drepper <drepper@redhat.com>
8461 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8462 beginning of the loop. Clear the entire first block of TSD.
8463 * Makefile (tests): Add tst-key4.
8464 * tst-key4.c: New file.
8466 2003-02-18 Ulrich Drepper <drepper@redhat.com>
8468 * Makefile (tests): Add tst-basic7.
8469 * tst-basic7.c: New file.
8471 * pthread_create.c (deallocate_tsd): Mark as internal_function.
8472 Add some more __builtin_expect.
8474 * pthreadP.h: Define dummy version of DEBUGGING_P.
8476 2003-02-17 Ulrich Drepper <drepper@redhat.com>
8478 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8479 _POSIX_THREAD_PRIORITY_SCHEDULING.
8480 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8481 _XOPEN_REALTIME_THREADS.
8482 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8484 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8485 kernel returns EINVAL for PID <= 0, work around it.
8487 * Makefile (tests): Add tst-signal5.
8488 * tst-signal5.c: New file.
8490 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8493 * tst-cancel1.c (tf): Block all signals.
8495 * Makefile (tests): Add tst-basic6.
8496 * tst-basic6.c: New file.
8498 * tst-basic1.c: Add test for process ID.
8500 * Makefile (tests): Add tst-cancel10.
8501 * tst-cancel10.c: New file.
8503 * Makefile (tests): Add tst-signal4.
8504 * tst-signal4.c: New file.
8506 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8507 __sigismember instead of sigismember. Add __builtin_expect.
8509 2003-02-16 Ulrich Drepper <drepper@redhat.com>
8511 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8512 pthread_setcancelstate, and pthread_rwlock_setpshared.
8514 * tst-cancel7.c (do_test): Make sure the pid file exists before
8515 canceling the thread.
8517 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8518 pthread_rwlock_timedrdlock tests.
8519 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8520 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8521 Check for invalid tv_nsec field.
8522 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8525 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8526 recursive mutex of overflow.
8528 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8530 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8531 going into an endless loop.
8532 * Makefile (tests): Add tst-cancel9.
8533 * tst-cancel9.c: New file.
8535 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8537 2003-02-15 Ulrich Drepper <drepper@redhat.com>
8539 * tst-mutex5.c (do_test): Add more timedlock tests.
8541 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8542 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8544 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8545 use INLINE_SYSCALL. Error number is returned, not -1.
8547 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8548 and __deallocate_stack with internal_function.
8549 * pthread_create.c: Adjust definitions appropriately.
8550 * allocatestack.c: Likewise.
8552 * pthread_join.c: Add one more __builtin_expect.
8553 * pthread_timedjoin.c: Likewise.
8555 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8556 not data of sequence number does not match.
8557 Add one __builtin_expect.
8559 * Makefile (tests): Add tst-clock1.
8560 * tst-clock1.c: New file.
8562 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8564 * Makefile (tests): Add tst-basic5.
8565 * tst-basic5.c: New file.
8567 2003-02-14 Ulrich Drepper <drepper@redhat.com>
8569 * Makefile (tests): Add tst-basic4.
8570 * tst-basic4.c: New file.
8572 * pthreadP.h: Add declaraction for __nptl_nthreads.
8573 * pthread_create.c: Define __nptl_nthreads
8574 (start_thread): Increment __nptl_nthreads at beginning. Decrement
8575 after thread is done. If then zero, call exit(0).
8576 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8577 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
8578 * init.c (pthread_functions): Initialize ptr_nthreads.
8579 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8580 (__reclaim_stacks): Decrement __nptl_nthreads.
8581 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8583 * Makefile (tests): Add tst-basic3.
8584 * tst-basic3.c: New file.
8586 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
8587 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
8588 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8589 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
8590 if asynchronous canceling is enabled.
8591 * pthread_join.c (pthread_join): When recognizing circular joins,
8592 take into account the other thread might be already canceled.
8593 * Makefile (tests): Add tst-join5.
8594 * tst-join5.c: New file.
8596 * Makefile (tests): Add tst-join4.
8597 * tst-join4.c: New file.
8599 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8601 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8603 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
8605 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8606 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8607 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8609 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8611 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8612 error if lll_futex_wake failed.
8614 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8616 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8617 handling of cancellation and failung pthread_mutex_unlock call.
8618 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8619 * Makefile (tests): Add tst-cond8 and tst-cond9.
8620 * tst-cond8.c: New file.
8621 * tst-cond9.c: New file.
8623 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8625 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
8626 non-standard initializers with __USE_GNU.
8628 * Makefile (tests): Add tst-cleanup3.
8629 * tst-cleanup3.c: New file.
8631 2003-02-12 Ulrich Drepper <drepper@redhat.com>
8633 * Makefile (tests): Add tst-attr1 and tst-attr2.
8634 * tst-attr1.c: New file.
8635 * tst-attr2.c: New file.
8637 * Makefile: Add rules to build and run tst-atfork2 test.
8638 * tst-atfork2.c: New file.
8639 * tst-atfork2mod.c: New file.
8641 * sysdeps/unix/sysv/linux/unregister-atfork.c
8642 (__unregister_atfork): Free the memory allocated for the handlers
8643 after removing them from the lists.
8645 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8648 * tst-atfork1.c (do_test): Wait for the child we forked.
8649 Report error in child.
8651 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8653 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8655 2003-02-10 Ulrich Drepper <drepper@redhat.com>
8657 * Makefile (tests): Add tst-cancel8.
8658 * tst-cancel8.c: New file.
8660 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8661 clearing of control variable.
8662 * Makefile (tests): Add tst-once3 and tst-once4.
8663 * tst-once3.c: New file.
8664 * tst-once4.c: New file.
8666 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
8668 * sysdeps/sh/Makefile: New file.
8669 * sysdeps/sh/bits/atomic.h: New file.
8670 * sysdeps/sh/pthread_spin_init.c: New file.
8671 * sysdeps/sh/pthread_spin_lock.c: New file.
8672 * sysdeps/sh/pthread_spin_trylock.S: New file.
8673 * sysdeps/sh/pthread_spin_unlock.S: New file.
8674 * sysdeps/sh/pthreaddef.h: New file.
8675 * sysdeps/sh/tcb-offsets.sym: New file.
8676 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8677 * sysdeps/sh/tls.h: New file.
8678 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8679 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8680 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8681 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8682 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8683 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8684 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8685 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8686 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8687 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8688 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8689 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8690 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8691 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8692 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8693 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8694 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8695 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8696 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8697 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8698 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8699 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8700 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8701 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8702 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8703 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8704 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8705 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8706 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8707 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8709 2003-02-08 Ulrich Drepper <drepper@redhat.com>
8711 * tst-cond2.c: Rearrange code to not rely on behavior undefined
8714 * tst-basic2.c (do_test): Lock mutex before creating the thread.
8716 2003-02-07 Ulrich Drepper <drepper@redhat.com>
8718 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8719 (TLS_GET_FS): New #define.
8720 (TLS_SET_FS): New #define.
8721 Correct value of __NR_set_thread_area.
8723 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8725 2003-02-06 Ulrich Drepper <drepper@redhat.com>
8727 * Makefile (tests): Add tst-popen1.
8728 * tst-popen1.c: New file.
8730 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8731 but inactive generalization.
8732 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8733 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8734 Minor optimization, remove one instruction.
8735 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8737 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
8739 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8741 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
8743 * init.c (__NR_set_tid_address): Add #ifdef for s390.
8744 * sysdeps/pthread/pthread_barrier_wait.c: New file.
8745 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8746 * sysdeps/pthread/pthread_cond_signal.c: New file.
8747 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8748 * sysdeps/pthread/pthread_cond_wait.c: New file.
8749 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8750 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8751 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8752 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8753 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8754 * sysdeps/s390/Makefile: New file.
8755 * sysdeps/s390/bits/atomic.h: New file.
8756 * sysdeps/s390/pthread_spin_init.c: New file.
8757 * sysdeps/s390/pthread_spin_lock.c: New file.
8758 * sysdeps/s390/pthread_spin_trylock.c: New file.
8759 * sysdeps/s390/pthread_spin_unlock.c: New file.
8760 * sysdeps/s390/pthreaddef.h: New file.
8761 * sysdeps/s390/tcb-offsets.sym: New file.
8762 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8763 * sysdeps/s390/tls.h: New file.
8764 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8765 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8766 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8767 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8768 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8769 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8770 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8771 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8772 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8773 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8774 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8775 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8776 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8777 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8778 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8779 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8780 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8781 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8782 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8783 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8784 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8785 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8786 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8788 2003-02-04 Ulrich Drepper <drepper@redhat.com>
8790 * atomic.h: Add a couple more default implementations.
8791 (atomic_compare_and_exchange_acq): Use
8792 __arch_compare_and_exchange_32_acq in return value definition. It
8794 (atomic_bit_set): Renamed from atomic_set_bit.
8795 Add missing atomic_ prefixes.
8797 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8798 thread library is available, use correct value to mark initialized
8801 2003-02-03 Ulrich Drepper <drepper@redhat.com>
8803 * allocatestack.c (allocate_stack): Use __getpagesize instead of
8804 __sysconf to determine pagesize.
8806 * pthread_create.c: Include <atomic.h>.
8807 * allocatestack.c (allocate_stack): Implement coloring of the
8808 allocated stack memory. Rename pagesize to pagesize_m1. It's the
8809 size minus one. Adjust users.
8810 * sysdeps/i386/i686/Makefile: New file.
8812 2003-02-02 Ulrich Drepper <drepper@redhat.com>
8814 * allocatestack.c: Improve comment throughout the file.
8816 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8817 (__lll_lock_wait): Add branch prediction.
8818 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8819 (__lll_lock_wait): Likewise.
8820 (lll_unlock_wake_cb): Removed.
8822 2003-01-31 Ulrich Drepper <drepper@redhat.com>
8824 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8825 _POSIX_THREAD_PRIORITY_SCHEDULING.
8827 2003-01-30 Jakub Jelinek <jakub@redhat.com>
8829 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8830 Fix return type of ptr___pthread_getspecific.
8832 2003-01-29 Ulrich Drepper <drepper@redhat.com>
8834 * Makefile (tests): Add tst-umask1.
8835 (tst-umask1-ARGS): Define.
8836 * tst-umask1.c: New file.
8838 2003-01-28 Ulrich Drepper <drepper@redhat.com>
8840 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
8841 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8842 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8843 pthread_rwlock_unlock.
8844 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8845 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8846 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8847 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8848 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8850 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8851 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8853 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8854 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8855 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8857 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8858 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8860 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8861 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8862 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8864 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8865 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8867 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8869 * Makefile (libpthread-routines): Remove lowlevelcond and
8870 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8871 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8872 and pthread_cond_broadcast.
8873 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8874 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8875 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8876 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8877 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8878 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8879 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8880 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8881 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8882 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8883 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8884 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8885 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8886 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8887 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8888 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8889 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8890 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8891 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8892 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8893 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8894 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8895 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8896 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8897 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8898 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8899 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8900 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8901 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
8902 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
8903 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
8905 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
8906 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
8907 of the code is moved to ...
8908 * sysdeps/pthread/createthread.c: ...here. New file.
8910 2003-01-27 Ulrich Drepper <drepper@redhat.com>
8912 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
8913 (__new_sem_post): Clear %eax before returning.
8914 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
8916 * Makefile (tests): Add tst-cleanup2.
8917 * tst-cleanup2.c: New file.
8919 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8920 Interpret first parameter correctly.
8922 2003-01-17 Ulrich Drepper <drepper@redhat.com>
8924 * Makefile (headers): Add bits/semaphore.h.
8926 2003-01-16 Jakub Jelinek <jakub@redhat.com>
8928 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
8931 2003-01-14 Ulrich Drepper <drepper@redhat.com>
8933 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
8934 must be used and mapping failed.
8935 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
8937 * Makefile (CFLAGS-pthread_self.os): Define this, not
8938 CFLAGS-pthread_self.c.
8940 2003-01-13 Ulrich Drepper <drepper@redhat.com>
8942 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
8945 * Makefile (libpthread-routines): Add version. Add rules to build
8946 version.os and banner.h.
8947 * version.c: New file.
8949 2003-01-13 Jakub Jelinek <jakub@redhat.com>
8951 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
8952 the alias unconditional.
8953 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
8955 2003-01-13 Ulrich Drepper <drepper@redhat.com>
8957 * Makefile (CFLAGS-pthread_self.c): New definition.
8959 2003-01-06 Jakub Jelinek <jakub@redhat.com>
8961 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
8962 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
8963 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
8964 * init.c (__pthread_initialize_minimal_internal): Likewise.
8966 2003-01-07 Jakub Jelinek <jakub@redhat.com>
8968 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
8970 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8971 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8972 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8973 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8974 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8975 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8977 2003-01-06 Jakub Jelinek <jakub@redhat.com>
8979 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
8980 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
8981 * tst-cancel-wrappers.sh: Remove all exceptions.
8983 2003-01-05 Ulrich Drepper <drepper@redhat.com>
8985 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
8986 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
8988 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
8989 Use __libc_pthread_functions array if SHARED.
8991 * pthreadP.h: Move pthread_cond_2_0_t definition to...
8992 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
8994 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
8995 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
8996 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
8997 __libc_ptf_call instead of __libc_maybe_call.
8999 (__libc_cleanup_region_start): Wrap function name with PTF call.
9000 (__libc_cleanup_region_end): Likewise.
9001 (__libc_cleanup_end): Likewise.
9003 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9004 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9005 * pthread_key_create.c: Add __pthread_key_create_internal alias.
9006 * pthreadP.h: Add prototypes.
9008 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9009 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9010 __pthread_rwlock_unlock aliases.
9011 * pthreadP.h: Add prototypes for new aliases.
9013 * pthreadP.h (struct pthead_functions): Moved to...
9014 * sysdeps/pthread/pthread-functions.h: ...here. New file.
9015 * init.c (pthread_functions): Add initializers for new elements.
9017 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9018 __pthread_cleanup_pop_restore aliases.
9019 * pthreadP.h: Add prototypes.
9021 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9022 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9023 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9024 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9025 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9026 * pthreadP.h: Adjust prototypes and callers.
9028 2003-01-04 Ulrich Drepper <drepper@redhat.com>
9030 * Makefile (tests): Add tst-cancel7.
9031 (tst-cancel7-ARGS): New variable.
9032 * tst-cancel7.c: New file.
9034 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9035 around gcc defficiencies.
9036 * old_pthread_cond_signal.c: Likewise.
9037 * old_pthread_cond_timedwait.c: Likewise.
9038 * old_pthread_cond_wait.c: Likewise.
9040 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9042 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9044 * Makefile (tests): Add tst-cond7.
9045 * tst-cond7.c: New file.
9047 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9048 (condvar_cleanup): Get condvar address from the right place.
9050 * atomic.h: Correct definitions of atomic_full_barrier,
9051 atomic_read_barrier, atomic_write_barrier.
9053 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9055 * old_pthread_cond_signal.c: Likewise.
9056 * old_pthread_cond_timedwait.c: Likewise.
9057 * old_pthread_cond_wait.c: Likewise.
9059 2003-01-03 Jakub Jelinek <jakub@redhat.com>
9061 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9063 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9065 * pthreadP.h (pthread_cond_2_0_t): New type.
9066 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9067 Use new type for the 2.0 condvar function prototypes.
9068 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9069 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9071 * old_pthread_cond_destroy.c: Likewise.
9072 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
9073 * old_pthread_cond_signal.c: Likewise.
9074 * old_pthread_cond_timedwait.c: Likewise.
9075 * old_pthread_cond_wait.c: Likewise.
9077 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9078 (__pthread_cond_wait): Don't save cancellation mode and seq value
9081 * herrno.c (__h_errno_location): Don't define as weak.
9083 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9085 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9086 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9087 and pthread_cond_wait.
9088 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9090 (__pthread_cond_broadcast_2_0): ... this.
9091 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9093 (__pthread_cond_destroy_2_0): ... this.
9094 * old_pthread_cond_init.c (__old_pthread_cond_init):
9096 (__pthread_cond_init_2_0): ... this.
9097 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9099 (__pthread_cond_signal_2_0): ... this.
9100 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9102 (__pthread_cond_wait_2_0): ... this.
9103 * pthread_cond_destroy.c: Include shlib-compat.h.
9104 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9105 * pthread_cond_init.c: Include shlib-compat.h.
9106 (pthread_cond_init): Change strong_alias into versioned_symbol.
9107 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9108 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9110 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9111 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9112 __pthread_cond_wait_2_0): New prototypes.
9113 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9114 __old_pthread_cond_init, __old_pthread_cond_signal,
9115 __old_pthread_cond_wait): Removed.
9116 * init.c: Include shlib-compat.h.
9117 (pthread_functions): Guard ptr___pthread_attr_init_2_0
9118 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9119 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9120 ptr___pthread_cond_*_2_0 fields.
9121 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9122 pthread_cond_*@GLIBC_2.0 compatibility symbols.
9124 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9125 LIBC_SIGACTION was not yet defined.
9126 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9127 [!defined LIBC_SIGACTION] (__sigaction): New function and
9129 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9130 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9132 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9134 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9136 2003-01-02 Ulrich Drepper <drepper@redhat.com>
9138 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9139 New, larger type definition.
9140 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9142 * Versions [libpthread]: Add definitions for new pthread_cond_*
9143 interfaces for version GLIBC_2.3.2.
9144 * pthread_cond_init.c: Update initialization for new type definition.
9145 * Makefile (libpthread-routines): Remove pthread_cond_wait,
9146 pthread_cond_timedwait, pthread_cond_signal, and
9147 pthread_cond_broadcast. Add old_pthread_cond_init,
9148 old_pthread_cond_destroy, old_pthread_cond_wait,
9149 old_pthread_cond_timedwait, old_pthread_cond_signal, and
9150 old_pthread_cond_broadcast.
9151 * old_pthread_cond_broadcast.c: New file.
9152 * old_pthread_cond_destroy.c: New file.
9153 * old_pthread_cond_init.c: New file.
9154 * old_pthread_cond_signal.c: New file.
9155 * old_pthread_cond_timedwait.c: New file.
9156 * old_pthread_cond_wait.c: New file.
9157 * pthreadP.h: Add prototypes for the compatibility interfaces.
9159 * pthread_cond_destroy.c: Don't include <errno.h>.
9161 2003-01-01 Ulrich Drepper <drepper@redhat.com>
9163 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9164 unnecessary zero offset when addressing MUTEX.
9166 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9168 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9170 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9171 for __register_atfork.
9173 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9175 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9176 instead of ASSEMBLER test macro.
9178 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9179 __libc_current_sigrtmax): Add libc_hidden_def.
9181 * sysdeps/pthread/list.h: Remove assert.h include.
9183 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9185 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9186 __pthread_initialize_minimal_internal not
9187 __pthread_initialize_minimal.
9189 2002-12-30 Ulrich Drepper <drepper@redhat.com>
9191 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9192 __pthread_initialize_minimal as hidden.
9194 * init.c (__pthread_initialize_minimal_internal): Don't mark as
9197 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9199 * Makefile ($(inst_libdir)/libpthread.so): Depend on
9200 $(common-objpfx)format.lds, include that into the output script.
9202 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9204 2002-12-28 Andreas Jaeger <aj@suse.de>
9206 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9207 nsec resolution changes.
9208 (xstat64_conv): Likewise.
9209 (xstat32_conv): Likewise.
9210 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9212 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9213 structs stat and stat64.
9214 * time/time.h (__timespec_defined): Define for __USE_MISC.
9215 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9217 2002-12-30 Jakub Jelinek <jakub@redhat.com>
9219 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
9221 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9222 (pthread_exit): Use strong_alias to avoid warnings.
9223 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9224 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9225 ptr___pthread_attr_init_2_*.
9226 * init.c (pthread_functions): Adjust.
9228 2002-12-29 Ulrich Drepper <drepper@redhat.com>
9230 * forward.c: Make all functions available by default again. It
9231 caused too much trouble.
9233 * pt-siglongjmp.c: Removed.
9235 2002-12-28 Jakub Jelinek <jakub@redhat.com>
9237 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9238 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9239 * sysdeps/i386/Makefile: New file.
9240 * sysdeps/i386/tcb-offsets.sym: New file.
9241 * sysdeps/pthread/tcb-offsets.h: New file.
9242 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9243 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9245 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9246 __register_atfork...
9247 (GLIBC_2.3.2): ...here.
9249 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9251 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9252 pthread_attr_setstackaddr with __attribute_deprecated__.
9254 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9256 * pt-system.c (system): Remove cancellation handling.
9257 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9258 cancellation routines.
9260 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9262 * descr.h: Include <dl-sysdep.h>.
9263 (struct pthread): Move header.data.list to the back of the struct.
9264 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9265 (MULTIPLE_THREADS_OFFSET): Adjust offset.
9266 (SYSINFO_OFFSEET): Likewise.
9268 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9270 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9272 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9273 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9274 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9275 (USE_DL_SYSINFO): Undef.
9277 2002-12-22 Jakub Jelinek <jakub@redhat.com>
9279 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9280 $(common-objpfx)libc.so.
9281 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9282 it is bigger than pipe buffer size even on arches with bigger
9284 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9286 2002-12-25 Ulrich Drepper <drepper@redhat.com>
9288 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9289 correct errno access for case that USE___THREAD is not defined.
9291 2002-12-24 Ulrich Drepper <drepper@redhat.com>
9293 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9294 Patch by Marijn Ros <marijn@mad.scientist.com>.
9296 2002-12-22 Roland McGrath <roland@redhat.com>
9298 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9300 2002-12-20 Ulrich Drepper <drepper@redhat.com>
9302 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9304 2002-12-19 Ulrich Drepper <drepper@redhat.com>
9306 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9307 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9308 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9310 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9312 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9313 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9314 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9315 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9316 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9317 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9318 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9319 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9321 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9323 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9325 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9327 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9329 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9330 that sysinfo is properly initialized.
9331 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9332 to 1 only for ld.so.
9334 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9335 RTLD_CORRECT_DYNAMIC_WEAK.
9337 2002-12-19 Jakub Jelinek <jakub@redhat.com>
9339 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9340 Use return 0 as 6th argument to FORWARD4.
9341 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9343 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9345 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9346 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9347 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9348 (INIT_SYSINFO): New #define.
9349 (TLS_TP_INIT): Use INIT_SYSINFO.
9350 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9351 At test to make sure SYSINFO_OFFSET value is correct.
9352 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9354 2002-12-18 Jakub Jelinek <jakub@redhat.com>
9356 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9357 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9358 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9359 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9360 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9361 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9362 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9364 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9366 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9367 macro instead of using int $0x80 directly.
9369 * sysdeps/pthread/bits/stdio-lock.h: New file.
9370 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9371 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9372 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9373 * Makefile (routines): Add libc-lowlevelmutex.
9375 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9376 __i686.get_pc_thunk.dx.
9378 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9380 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9381 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9382 ($(objpfx)tst-cancel-wrappers.out): New rule.
9383 * tst-cancel-wrappers.sh: New test.
9384 * tst-locale1.c: Include signal.h.
9385 (uselocale): Test static linking of __libc_current_sigrt*.
9387 2002-12-17 Ulrich Drepper <drepper@redhat.com>
9389 * Makefile (tests): Add tst-cancel6.
9390 * tst-cancel6.c: New file
9392 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9394 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9395 Define meaningfully for assembler as well.
9396 * pthreadP.h (struct pthread_functions): Remove
9397 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
9398 and ptr_pthread_attr_init_2_1 fields.
9399 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9400 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9401 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9402 (FORWARD3): Define using FORWARD4.
9403 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9405 * pt-system.c: Remove duplicate stdlib.h include.
9407 2002-12-16 Ulrich Drepper <drepper@redhat.com>
9409 * sem_init.c: Define sem_init@GLIBC_2.0.
9410 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9411 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9413 * flockfile.c: Moved to...
9414 * sysdeps/pthread/flockfile.c: ...here. New file.
9415 * funlockfile.c: Moved to...
9416 * sysdeps/pthread/funlockfile.c: ...here. New file.
9417 * ftrylockfile.c: Moved to...
9418 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
9420 2002-12-16 Jakub Jelinek <jakub@redhat.com>
9422 * libc-cancellation.c: Guard both function with
9423 #if !defined NOT_IN_libc.
9424 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9425 automatically provided pthread wrappers.
9426 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9427 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9429 * pt-open.c: Removed.
9430 * pt-fcntl.c: Removed.
9431 * pt-fsync.c: Removed.
9432 * pt-lseek.c: Removed.
9433 * pt-msgrcv.c: Removed.
9434 * pt-msgsnd.c: Removed.
9435 * pt-msync.c: Removed.
9436 * pt-nanosleep.c: Removed.
9437 * pt-open64.c: Removed.
9438 * pt-pause.c: Removed.
9439 * pt-pread.c: Removed.
9440 * pt-pread64.c: Removed.
9441 * pt-pwrite.c: Removed.
9442 * pt-pwrite64.c: Removed.
9443 * pt-read.c: Removed.
9444 * pt-recv.c: Removed.
9445 * pt-recvfrom.c: Removed.
9446 * pt-recvmsg.c: Removed.
9447 * pt-send.c: Removed.
9448 * pt-sendto.c: Removed.
9449 * pt-sigtimedwait.c: Removed.
9450 * pt-sigwait.c: Removed.
9451 * pt-wait.c: Removed.
9452 * pt-waitpid.c: Removed.
9453 * pt-write.c: Removed.
9454 * pt-accept.c: Removed.
9455 * pt-close.c: Removed.
9456 * pt-connect.c: Removed.
9457 * pt-lseek64.c: Removed.
9458 * pt-sendmsg.c: Removed.
9459 * pt-tcdrain.c: Removed.
9461 2002-12-15 Ulrich Drepper <drepper@redhat.com>
9463 * init.c (__pthread_initialize_minimal_internal): Renamed from
9464 __pthread_initialize_minimal. Make old name an alias. This
9465 converts a normal relocation into a relative relocation.
9467 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9469 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9470 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9471 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9472 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9473 pt-sigwaitinfo, pt-waitid, and pt-writev.
9474 * pt-creat.c: Removed.
9475 * pt-poll.c: Removed.
9476 * pt-pselect.c: Removed.
9477 * pt-readv.c: Removed.
9478 * pt-select.c: Removed.
9479 * pt-sigpause.c: Removed.
9480 * pt-sigsuspend.c: Removed.
9481 * pt-sigwaitinfo.c: Removed.
9482 * pt-waitid.c: Removed.
9483 * pt-writev.c: Removed.
9485 * init.c (pthread_functions): New variable.
9486 (__pthread_initialize_minimal): Pass pointer to pthread_functions
9487 (or NULL) to __libc_pthread_init.
9488 * forward.c: Rewrite to use __libc:pthread_functions array to get
9490 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9492 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9493 Take new parameter. Copy content of variable pointed to by it
9494 to __libc_pthread_init.
9496 * pthreadP.h (struct pthread_functions): New type.
9497 (__libc_pthread_init): Declare.
9499 * pthread_attr_destroy.c: Add namespace protected alias.
9500 * pthread_attr_getdetachstate.c: Likewise.
9501 * pthread_attr_getinheritsched.c: Likewise.
9502 * pthread_attr_getschedparam.c: Likewise.
9503 * pthread_attr_getschedpolicy.c: Likewise.
9504 * pthread_attr_getscope.c: Likewise.
9505 * pthread_attr_setdetachstate.c: Likewise.
9506 * pthread_attr_setinheritsched.c: Likewise.
9507 * pthread_attr_setschedparam.c: Likewise.
9508 * pthread_attr_setschedpolicy.c: Likewise.
9509 * pthread_attr_setscope.c: Likewise.
9510 * pthread_cond_broadcast.c: Likewise.
9511 * pthread_cond_destroy.c: Likewise.
9512 * pthread_cond_init.c: Likewise.
9513 * pthread_cond_signal.c: Likewise.
9514 * pthread_cond_wait.c: Likewise.
9515 * pthread_condattr_destroy.c: Likewise.
9516 * pthread_condattr_init.c: Likewise.
9517 * pthread_equal.c: Likewise.
9518 * pthread_exit.c: Likewise.
9519 * pthread_getschedparam.c: Likewise.
9520 * pthread_self.c: Likewise.
9521 * pthread_setcancelstate.c: Likewise.
9522 * pthread_setschedparam.c: Likewise.
9523 * pthread_mutex_destroy.c: Likewise.
9524 * pthread_mutex_init.c: Likewise.
9525 * pthreadP.h: Add prototypes for the aliases.
9527 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9528 multiple_threads member in correct TCB to 1.
9530 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9531 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
9532 member of thread decriptor, otherwise return unconditionally 1.
9534 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9536 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9537 regular Linux version. Remove file.
9538 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
9539 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
9540 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
9541 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
9542 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
9543 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
9544 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
9545 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
9546 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
9547 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
9548 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
9549 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
9550 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
9551 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
9552 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
9553 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
9554 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
9555 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
9556 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
9557 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
9558 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
9559 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
9560 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
9561 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
9562 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
9563 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
9564 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
9565 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
9566 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
9567 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
9569 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9571 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9572 * sysdeps/unix/sysv/linux/open.c: Removed.
9573 * sysdeps/unix/sysv/linux/fsync.c: Removed.
9574 * sysdeps/unix/sysv/linux/lseek.c: Removed.
9575 * sysdeps/unix/sysv/linux/msync.c: Removed.
9576 * sysdeps/unix/sysv/linux/read.c: Removed.
9577 * sysdeps/unix/sysv/linux/close.c: Removed.
9578 * sysdeps/unix/sysv/linux/creat.c: Removed.
9579 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9580 * sysdeps/unix/sysv/linux/pause.c: Removed.
9581 * sysdeps/unix/sysv/linux/select.c: Removed.
9582 * sysdeps/unix/sysv/linux/write.c: Removed.
9584 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9586 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9587 element in TCB to see whether locking is needed.
9589 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9590 MULTIPLE_THREADS_OFFSET value is correct.
9592 * sysdeps/unix/sysv/linux/close.c: New file.
9593 * sysdeps/unix/sysv/linux/connect.S: New file.
9594 * sysdeps/unix/sysv/linux/creat.c: New file.
9595 * sysdeps/unix/sysv/linux/fsync.c: New file.
9596 * sysdeps/unix/sysv/linux/llseek.c: New file.
9597 * sysdeps/unix/sysv/linux/lseek.c: New file.
9598 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9599 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9600 * sysdeps/unix/sysv/linux/msync.c: New file.
9601 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9602 * sysdeps/unix/sysv/linux/open.c: New file.
9603 * sysdeps/unix/sysv/linux/open64.c: New file.
9604 * sysdeps/unix/sysv/linux/pause.c: New file.
9605 * sysdeps/unix/sysv/linux/poll.c: New file.
9606 * sysdeps/unix/sysv/linux/pread.c: New file.
9607 * sysdeps/unix/sysv/linux/pread64.c: New file.
9608 * sysdeps/unix/sysv/linux/pselect.c: New file.
9609 * sysdeps/unix/sysv/linux/pwrite.c: New file.
9610 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9611 * sysdeps/unix/sysv/linux/readv.c: New file.
9612 * sysdeps/unix/sysv/linux/recv.S: New file.
9613 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9614 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9615 * sysdeps/unix/sysv/linux/select.c: New file.
9616 * sysdeps/unix/sysv/linux/send.S: New file.
9617 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9618 * sysdeps/unix/sysv/linux/sendto.S: New file.
9619 * sysdeps/unix/sysv/linux/sigpause.c: New file.
9620 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9621 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9622 * sysdeps/unix/sysv/linux/sigwait.c: New file.
9623 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9624 * sysdeps/unix/sysv/linux/system.c: New file.
9625 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9626 * sysdeps/unix/sysv/linux/wait.c: New file.
9627 * sysdeps/unix/sysv/linux/waitid.c: New file.
9628 * sysdeps/unix/sysv/linux/waitpid.c: New file.
9629 * sysdeps/unix/sysv/linux/writev.c: New file.
9630 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9632 * pt-readv.c: Fix comment.
9634 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9636 * tst-cleanup1.c: Include stdlib.h.
9638 * tst-cancel5.c: New test.
9639 * Makefile (tests): Add tst-cancel5.
9640 (tst-cancel5): Link against libc.so libpthread.so in that order.
9642 2002-12-13 Ulrich Drepper <drepper@redhat.com>
9644 * forward.c (test_loaded): Prevent recursive calls.
9646 * Makefile (routines): Add libc-cancellation.
9647 * libc-cancellation.c: New file.
9648 * descr.h (struct pthread): Add multiple_threads field.
9649 * allocatestack.c (allocate_stack): Initialize multiple_header field of
9650 new thread descriptor to 1.
9651 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9652 Initialize multiple_thread field after successful thread creation.
9653 * cancellation.c (__do_cancel): Move to pthreadP.h.
9654 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9655 (__pthread_disable_asynccancel): Add internal_function attribute.
9656 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9657 * pthread_setcancelstate.c: Likewise.
9658 * pthread_setcanceltype.c: Likewise.
9659 * pthread_exit.c: Likewise.
9660 * pthreadP.h (CANCELLATION_P): Likewise.
9661 (__do_cancel): Define as static inline.
9662 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9663 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9665 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9666 fields. Define MULTIPLE_THREADS_OFFSET.
9667 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9669 * sysdeps/unix/sysv/linux/accept.S: New file.
9670 * sysdeps/unix/sysv/linux/read.c: New file.
9671 * sysdeps/unix/sysv/linux/write.c: New file.
9672 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9673 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9674 initialization of __libc_locking_needed.
9675 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9676 __libc_locking_needed, use multiple_threads field in TCB.
9677 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9679 2002-12-12 Ulrich Drepper <drepper@redhat.com>
9681 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9683 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9685 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9686 access to __libc_locking_needed for PIC.
9688 2002-12-12 Jakub Jelinek <jakub@redhat.com>
9690 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9691 declare for libc.so.
9692 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9694 (__libc_lock_lock): Put into statement expression.
9695 (__libc_lock_unlock): Remove trailing semicolon.
9696 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9698 2002-12-12 Roland McGrath <roland@redhat.com>
9700 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9701 "m" constraint to refer to __libc_locking_needed. Declare it here.
9703 2002-12-12 Ulrich Drepper <drepper@redhat.com>
9705 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9706 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9707 Initialize __libc_locking_needed.
9708 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9709 instead of __register_pthread_fork_handler.
9710 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9711 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9712 fork-gen with libc_pthread_init.
9713 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9714 of __register_pthread_fork_handler.
9715 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9716 of __register_pthread_fork_handler.
9717 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9718 __libc_locking_needed to determine whether lock prefix can be avoided.
9719 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9721 2002-12-11 Ulrich Drepper <drepper@redhat.com>
9723 * Makefile (tests): Add tst-cleanup1.
9724 * tst-cleanup1.c: New file.
9725 * cancellation.c (__cleanup_thread): Removed.
9726 (__do_cancel): Remove call to __cleanup_thread.
9727 * pthreadP.h: Remove __cleanup_thread prorotype.
9729 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9730 Remember function and argument even if cancellation handler
9731 function is not available.
9732 (__libc_cleanup_region_end): Execute registered function directly if
9733 pthread functions are not available.
9734 (__libc_cleanup_end): Likewise.
9736 * init.c (__pthread_initialize_minimal): Fix initialization in
9737 static lib by preventing gcc from being too clever.
9739 2002-12-10 Ulrich Drepper <drepper@redhat.com>
9741 * init.c (__pthread_initialize_minimal): Remove unneccesary
9744 * Makefile (tests): We can run tst-locale2 now.
9746 2002-12-09 Ulrich Drepper <drepper@redhat.com>
9748 * Versions: Remove duplicated sigwait entry.
9750 2002-12-08 Ulrich Drepper <drepper@redhat.com>
9752 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9755 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9757 * pthreadP.h: Declare __pthread_enable_asynccancel and
9758 __pthread_disable_asynccancel.
9759 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9760 (CANCEL_RESET): Use __pthread_disable_asynccancel.
9761 * cancellation.c (__pthread_enable_asynccancel): New function.
9762 (__pthread_disable_asynccancel): New function.
9763 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9764 * pt-close.c: Likewise.
9765 * pt-connect.c: Likewise.
9766 * pt-creat.c: Likewise.
9767 * pt-fcntl.c: Likewise.
9768 * pt-fsync.c: Likewise.
9769 * pt-lseek.c: Likewise.
9770 * pt-lseek64.c: Likewise.
9771 * pt-msgrcv.c: Likewise.
9772 * pt-msgsnd.c: Likewise.
9773 * pt-msync.c: Likewise.
9774 * pt-nanosleep.c: Likewise.
9775 * pt-open.c: Likewise.
9776 * pt-open64.c: Likewise.
9777 * pt-pause.c: Likewise.
9778 * pt-poll.c: Likewise.
9779 * pt-pread.c: Likewise.
9780 * pt-pread64.c: Likewise.
9781 * pt-pselect.c: Likewise.
9782 * pt-pwrite.c: Likewise.
9783 * pt-pwrite64.c: Likewise.
9784 * pt-read.c: Likewise.
9785 * pt-readv.c: Likewise.
9786 * pt-recv.c: Likewise.
9787 * pt-recvfrom.c: Likewise.
9788 * pt-recvmsg.c: Likewise.
9789 * pt-select.c: Likewise.
9790 * pt-send.c: Likewise.
9791 * pt-sendmsg.c: Likewise.
9792 * pt-sendto.c: Likewise.
9793 * pt-sigpause.c: Likewise.
9794 * pt-sigsuspend.c: Likewise.
9795 * pt-sigtimedwait.c: Likewise.
9796 * pt-sigwait.c: Likewise.
9797 * pt-sigwaitinfo.c: Likewise.
9798 * pt-system.c: Likewise.
9799 * pt-tcdrain.c: Likewise.
9800 * pt-wait.c: Likewise.
9801 * pt-waitid.c: Likewise.
9802 * pt-waitpid.c: Likewise.
9803 * pt-write.c: Likewise.
9804 * pt-writev.c: Likewise.
9805 * pthread_join.c: Likewise.
9806 * pthread_timedjoin.c: Likewise.
9808 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9809 (__xpg_sigpause): New function.
9810 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9812 2002-12-07 Ulrich Drepper <drepper@redhat.com>
9814 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9816 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9817 _GI_pthread_cleanup_pop to pthreadP.h.
9819 * ftrylockfile.c: Use _IO_lock_trylock instead of
9820 pthread_mutex_trylock.
9822 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9823 (CANCEL_RESET): Likewise.
9824 (__pthread_setcanceltype_): Declare.
9825 (__pthread_mutex_lock_internal): Declare.
9826 (__pthread_mutex_unlock_internal): Declare.
9827 (__pthread_once_internal): Declare.
9828 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9829 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9831 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9832 and pthread_mutex_unlock.
9833 * pthread_cond_wait.c: Likewise.
9834 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9835 * pthread_mutex_unlock.c: Likewise.
9837 * pthread_setcanceltype.c: Add additional alias
9838 __pthread_setcanceltype.
9840 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9841 * sem_open.c (sem_open): Likewise.
9842 Use __libc_open, __libc_write, and __libc_close instead of
9843 open, write, and close respectively.
9845 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9846 Rewrite as statement expression since it must return a value.
9848 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9849 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9852 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9853 alias __pthread_once_internal.
9855 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9857 2002-12-06 Ulrich Drepper <drepper@redhat.com>
9859 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9860 * tst-stdio1.c: New file.
9861 * tst-stdio2.c: New file.
9863 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9865 * Makefile (tests): Comment out tst-locale2 for now.
9866 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9868 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9870 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9871 Use _IO_lock_init instead of explicit assignment.
9873 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9874 Define __libc_lock_* and __libc_lock_recursive macros with
9875 lowlevellock macros, not pthread mutexes.
9877 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
9878 of pthread_mutex_lock.
9879 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
9880 instead of pthread_mutex_unlock.
9882 2002-12-06 Roland McGrath <roland@redhat.com>
9884 * allocatestack.c (__stack_user): Use uninitialized defn.
9885 * init.c (__pthread_initialize_minimal): Initialize it here.
9887 2002-12-05 Roland McGrath <roland@redhat.com>
9889 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9891 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9893 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9896 2002-12-05 Ulrich Drepper <drepper@redhat.com>
9898 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9900 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9901 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
9902 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
9903 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
9904 for __libc_lock_* macros.
9905 * Makefile (routines): Add libc-lowlevellock.
9907 2002-10-09 Roland McGrath <roland@redhat.com>
9909 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
9910 Under [__PIC__], call the function via the pointer fetched for
9911 comparison rather than a call by name that uses the PLT.
9912 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
9913 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
9914 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
9915 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
9916 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
9918 2002-12-04 Roland McGrath <roland@redhat.com>
9920 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
9922 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
9923 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
9925 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
9927 2002-12-04 Ulrich Drepper <drepper@redhat.com>
9929 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
9930 a completely opaque, non-integer type.
9931 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9933 2002-12-05 Jakub Jelinek <jakub@redhat.com>
9935 * sysdeps/i386/tls.h: Include stdlib.h.
9936 * sysdeps/x86_64/tls.h: Likewise.
9938 2002-12-04 Ulrich Drepper <drepper@redhat.com>
9940 * Makefile (tests): Add tst-locale2.
9941 (tests-static): Likewise.
9942 * tst-locale2.c: New file.
9944 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
9945 volatile and add memory clobbers to lock operations.
9947 2002-12-03 Ulrich Drepper <drepper@redhat.com>
9949 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
9950 * sysdeps/i386/i486/bits/atomic.h: New file.
9951 * sysdeps/i386/i586/bits/atomic.h: New file.
9952 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
9953 include i486 version.
9954 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
9955 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
9956 Patch by Marijn Ros <marijn@mad.scientist.com>.
9958 * allocatestack.c (get_cached_stack): Don't crash if we first
9959 found a stack with a larger size then needed.
9960 Reported by Hui Huang <hui.huang@sun.com>.
9962 * Makefile (tests): Add tst-sysconf.
9963 * tst-sysconf.c: New file.
9965 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
9966 PTHREAD_THREADS_MAX.
9968 2002-12-02 Roland McGrath <roland@redhat.com>
9970 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
9971 Declare using hidden_proto instead of attribute_hidden, so there are
9972 non-.hidden static symbols for gdb to find.
9973 (__pthread_keys): Likewise.
9974 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
9975 * allocatestack.c (__stack_user): Likewise.
9976 * pthread_create.c (__pthread_keys): Likewise.
9977 (__nptl_threads_events, __nptl_last_event): Make these static instead
9979 * pthread_key_create.c (__pthread_pthread_keys_max,
9980 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
9982 2002-12-02 Ulrich Drepper <drepper@redhat.com>
9984 * Makefile (tests): Add tst-locale1. If buid-static is yes link
9986 * tst-locale1.c: New file.
9988 * pthread_cond_timedwait.c: Include <stdlib.h>.
9990 * Makefile (tests): Add tst-fork2 and tst-fork3.
9991 * tst-fork2.c: New file.
9992 * tst-fork3.c: New file.
9994 2002-11-28 Ulrich Drepper <drepper@redhat.com>
9996 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
9998 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
9999 require it to 200112L.
10001 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10002 instruction only if HAVE_CMOV is defined.
10003 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10005 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10007 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10009 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10011 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10013 2002-11-27 Ulrich Drepper <drepper@redhat.com>
10015 * sysdeps/x86_64/bits/atomic.h: New file.
10017 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10020 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10021 possible since gettid cannot fail.
10023 * sysdeps/x86_64/pthreaddef.h: New file.
10025 * sysdeps/i386/pthreaddef.h (gettid): Removed.
10027 * sysdeps/x86_64/pthread_spin_init.c: New file.
10028 * sysdeps/x86_64/pthread_spin_lock.c: New file.
10029 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10030 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10032 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10033 Add missing lock prefix. Minute optimization.
10035 * tst-spin2.c (main): Also check successful trylock call.
10037 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10038 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
10040 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10041 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
10043 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
10044 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10045 value in case of an error. Add support for INTERNAL_SYSCALL.
10047 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10048 value in case of an error.
10050 * sysdeps/x86_64/tls.h: New file.
10052 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10054 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
10055 takes the array member name and the index as parameters.
10056 (THREAD_SETMEM_NC): Likewise.
10057 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10058 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10061 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10062 to decide which code to use.
10063 (THREAD_SETMEM_NC): Likewise.
10065 * allocatestack.c (queue_stack): Don't remove stack from list here.
10066 Do it in the caller. Correct condition to prematurely terminate
10067 loop to free stacks.
10068 (__deallocate_stack): Remove stack from list here.
10070 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10072 * Makefile (tests): Add tst-stack1.
10073 * tst-stack1.c: New file.
10075 * allocatestack.c (allocate_stack): Initialize the TCB on a user
10078 * pthread_attr_getstack.c: Return bottom of the thread area.
10080 2002-11-25 Ulrich Drepper <drepper@redhat.com>
10082 * Makefile (libpthread-routines): Add pt-allocrtsig and
10083 pthread_kill_other_threads.
10084 * pt-allocrtsig.c: New file.
10085 * pthread_kill_other_threads.c: New file.
10086 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10087 all three functions.
10088 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10090 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10091 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10092 and __libc_allocate_rtsig_private.
10093 * Versions (libpthread): Export pthread_kill_other_threads_np,
10094 __libc_current_sigrtmin, and __libc_current_sigrtmax.
10096 2002-11-24 Ulrich Drepper <drepper@redhat.com>
10098 * allocatestack.c (allocate_stack): stackaddr in attribute points to
10099 the end of the stack. Adjust computations.
10100 When mprotect call fails dequeue stack and free it.
10101 * pthread_attr_setstack.c: Store top of the stack in stackaddr
10103 * pthread_getattr_np.c: Likewise.
10105 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10108 2002-11-23 Ulrich Drepper <drepper@redhat.com>
10110 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10111 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10113 2002-11-22 Ulrich Drepper <drepper@redhat.com>
10115 * pthread_getspecific.c: Optimize access to first 2nd-level array.
10116 * pthread_setspecific.c: Likewise.
10118 2002-11-21 Ulrich Drepper <drepper@redhat.com>
10120 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10121 definitions. Get them from the official place.
10122 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10124 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10125 Use new CLONE_ flags in clone() calls.
10127 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10128 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10130 * Versions: Add pthread_* functions for libc.
10131 * forward.c: New file.
10133 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10135 * herrno.c: New file.
10138 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10139 sem_trywait, and sem_timedwait. Add herrno and res.
10140 * sem_init.c: Don't initialize lock and waiters members.
10141 * sem_open.c: Likewise.
10142 * sem_post.c: Removed.
10143 * sem_wait.c: Removed.
10144 * sem_trywait.c: Removed.
10145 * sem_timedwait.c: Removed.
10146 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10147 Includes full implementations of sem_post, sem_wait, sem_trywait,
10149 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10150 for new implementation.
10151 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10152 and waiters fields.
10154 * tst-sem3.c: Improve error message.
10155 * tst-signal3.c: Likewise.
10157 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10158 to tell the kernel about the termination futex and to initialize tid
10159 member. Don't initialize main_thread.
10160 * descr.h (struct pthread): Remove main_thread member.
10161 * cancelllation.c (__do_cancel): Remove code handling main thread.
10162 The main thread is not special anymore.
10164 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
10165 size of the stacks to stack_cache_actsize.
10167 * pt-readv.c: Add missing "defined".
10168 * pt-sigwait.c: Likewise.
10169 * pt-writev.c: Likewise.
10171 2002-11-09 Ulrich Drepper <drepper@redhat.com>
10173 * Versions: Export __connect from libpthread.
10174 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10176 * Makefile (libpthread-routines): Add pt-raise.
10177 * sysdeps/unix/sysv/linux/raise.c: New file.
10178 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10179 * sysdeps/generic/pt-raise.c: New file.
10181 * pthread_cond_init.c: Initialize all data elements of the condvar
10182 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10184 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10185 * pthread_create.c: Likewise.
10187 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10188 * tst-key1.c: New file.
10189 * tst-key2.c: New file.
10190 * tst-key3.c: New file.
10192 * Versions: Export pthread_detach for version GLIBC_2.0.
10193 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10195 2002-11-08 Ulrich Drepper <drepper@redhat.com>
10197 * pthread_key_create.c: Terminate search after an unused key was found.
10198 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10200 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10201 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10203 2002-10-10 Ulrich Drepper <drepper@redhat.com>
10205 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10206 dynamic lookup for errno in PIC.
10208 * allocatestack.c (get_cached_stack): Rearrange code slightly to
10209 release the stack lock as soon as possible.
10210 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10211 the static TLS block.
10212 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10214 * cancellation.c: Renamed from cancelation.c.
10215 * Makefile: Adjust accordingly.
10216 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10217 * cleanup_defer.c: Use CANCELLATION_P.
10218 * pthread_testcancel.c: Likewise.
10219 * descr.h: Fix spelling in comments.
10220 * init.c: Likewise.
10221 * pthread_getattr_np.c: Likewise.
10222 * pthread_getschedparam.c: Likewise.
10223 * pthread_setschedparam.c: Likewise.
10224 * Versions: Likewise.
10226 * pt-pselect.c: New file.
10227 * Makefile (libpthread-routines): Add pt-pselect.
10228 * Versions: Add pselect.
10230 * tst-cancel4.c: New file.
10231 * Makefile (tests): Add tst-cancel4.
10233 2002-10-09 Ulrich Drepper <drepper@redhat.com>
10235 * pthread_mutex_lock.c: Always record lock ownership.
10236 * pthread_mutex_timedlock.c: Likewise.
10237 * pthread_mutex_trylock.c: Likewise.
10239 * pt-readv.c: New file.
10240 * pt-writev.c: New file.
10241 * pt-creat.c: New file.
10242 * pt-msgrcv.c: New file.
10243 * pt-msgsnd.c: New file.
10244 * pt-poll.c: New file.
10245 * pt-select.c: New file.
10246 * pt-sigpause.c: New file.
10247 * pt-sigsuspend.c: New file.
10248 * pt-sigwait.c: New file.
10249 * pt-sigwaitinfo.c: New file.
10250 * pt-waitid.c: New file.
10251 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10252 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10253 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10254 * Versions: Add all the new functions.
10256 * tst-exit1.c: New file.
10257 * Makefile (tests): Add tst-exit1.
10259 * sem_timedwait.c: Minor optimization for more optimal fastpath.
10261 2002-10-08 Ulrich Drepper <drepper@redhat.com>
10263 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10265 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10266 call. pthread_join is an official cancellation point.
10267 * pthread_timedjoin.c: Likewise.
10269 * pthread_cond_wait.c: Revert order in which internal lock are dropped
10270 and the condvar's mutex are retrieved.
10271 * pthread_cond_timedwait.c: Likewise.
10272 Reported by dice@saros.East.Sun.COM.
10274 2002-10-07 Ulrich Drepper <drepper@redhat.com>
10276 * pthreadP.h: Cut out all type definitions and move them...
10277 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
10278 * pthreadP.h: Include <internaltypes.h>.
10280 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10281 performance tweaks.
10283 * sem_trywait.c: Shuffle #includes around to get right order.
10284 * sem_timedwait.c: Likewise.
10285 * sem_post.c: Likewise.
10286 * sem_wait.c: Likewise.
10288 * nptl 0.3 released.
10290 * Makefile (tests): Add tst-signal3.
10291 * tst-signal3.c: New file.
10293 2002-10-05 Ulrich Drepper <drepper@redhat.com>
10295 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10296 the asms modify the sem object.
10297 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10299 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10300 the actual members.
10301 * pthreadP.h (struct sem): New type. Actual semaphore type.
10302 * semaphoreP.h: Include pthreadP.h.
10303 * sem_getvalue.c: Adjust to sem_t change.
10304 * sem_init.c: Likewise.
10305 * sem_open.c: Likewise.
10306 * sem_post.c: Likewise.
10307 * sem_timedwait.c: Likewise.
10308 * sem_trywait.c: Likewise.
10309 * sem_wait.c: Likewise.
10311 2002-10-04 Ulrich Drepper <drepper@redhat.com>
10313 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10314 * tst-basic2.c: New file.
10315 * tst-exec1.c: New file.
10316 * tst-exec2.c: New file.
10317 * tst-exec3.c: New file.
10319 * tst-fork1.c: Remove extra */.
10321 * nptl 0.2 released. The API for IA-32 is complete.