1 2004-09-18 Ulrich Drepper <drepper@redhat.com>
3 * allocatestack.c (allocate_stack): Return EAGAIN instead of
4 ENOMEM when out of memory.
6 2004-09-10 Roland McGrath <roland@redhat.com>
9 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
10 code, since we don't try to use the broken CLONE_STOPPED any more.
11 * pthread_create.c (start_thread): Likewise.
13 2004-09-15 Richard Henderson <rth@redhat.com>
15 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
17 2004-09-01 David Mosberger <davidm@hpl.hp.com>
19 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
20 (__libc_unwind_longjmp): Delete macro and declare as function.
21 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
22 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
24 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
25 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
26 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
28 2004-09-12 Ulrich Drepper <drepper@redhat.com>
30 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
32 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
33 types also for __USE_XOPEN2K.
34 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
35 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
36 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
37 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
38 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
39 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
40 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
43 2004-09-08 Ulrich Drepper <drepper@redhat.com>
45 * sysdeps/pthread/pthread.h
46 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
47 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
48 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
49 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
52 2004-09-07 Ulrich Drepper <drepper@redhat.com>
54 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
55 PSEUDO to be used with . prefix.
57 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
58 Use atomic_increment instead of atomic_exchange_and_add.
59 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
61 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
63 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
66 * allocatestack.c (allocate_stack): Use atomic_increment_val
67 instead of atomic_exchange_and_add.
68 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
69 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
71 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
74 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
75 the initialization function might throw.
77 2005-09-05 Richard Henderson <rth@redhat.com>
79 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
80 Move definition inside libpthread, libc, librt check. Provide
83 2004-09-02 Ulrich Drepper <drepper@redhat.com>
85 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
86 * sysdeps/i386/jmpbuf-unwind.h: Likewise
87 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
88 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
89 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
90 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
91 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
92 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
95 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
96 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
97 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
99 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
100 Decrement __nwaiters. If pthread_cond_destroy has been called and
101 this is the last waiter, signal pthread_cond_destroy caller and
102 avoid using the pthread_cond_t structure after unlock.
103 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
104 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
105 Read clock type from the least significant bits of __nwaiters instead
107 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
108 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
110 2004-08-31 Jakub Jelinek <jakub@redhat.com>
113 * Makefile (tests): Add tst-cond20 and tst-cond21.
114 * tst-cond20.c: New test.
115 * tst-cond21.c: New test.
116 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
117 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
119 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
121 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
122 (pthread_cond_t): Likewise.
123 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
125 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
127 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
129 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
130 (cond_nwaiters): New.
132 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
133 if there are waiters not signalled yet.
134 Wait until all already signalled waiters wake up.
135 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
136 __nwaiters. If pthread_cond_destroy has been called and this is the
137 last waiter, signal pthread_cond_destroy caller and avoid using
138 the pthread_cond_t structure after unlock.
139 (__pthread_cond_wait): Increment __nwaiters in the beginning,
140 decrement it when leaving. If pthread_cond_destroy has been called
141 and this is the last waiter, signal pthread_cond_destroy caller.
142 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
143 Likewise. Read clock type from the least significant bits of
144 __nwaiters instead of __clock.
145 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
146 whether clock ID can be encoded in COND_CLOCK_BITS bits.
147 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
148 clock type just from the last COND_CLOCK_BITS bits of value.
149 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
150 instead of __clock, just from second bit of condattr's value.
152 2004-08-30 Jakub Jelinek <jakub@redhat.com>
154 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
155 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
157 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
159 2004-08-15 Roland McGrath <roland@frob.com>
161 * pthread_atfork.c: Update copyright terms including special exception
162 for these trivial files, which are statically linked into executables
163 that use dynamic linking for the significant library code.
165 2004-08-09 Jakub Jelinek <jakub@redhat.com>
167 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
168 pthread_rwlock_rdlock.
169 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
170 Decrease __nr_readers_queued after reacquiring lock.
171 * sysdeps/pthread/pthread_rwlock_timedrdlock
172 (pthread_rwlock_timedrdlock): Likewise.
173 Reported by Bob Cook <bobcook47@hotmail.com>.
175 2004-08-11 Jakub Jelinek <jakub@redhat.com>
177 * tst-rwlock14.c (tf): Read main thread handle from *ARG
178 before pthread_barrier_wait.
180 2004-08-07 Ulrich Drepper <drepper@redhat.com>
182 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
183 Remove unnecessary exception handling data.
185 2004-07-23 Jakub Jelinek <jakub@redhat.com>
188 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
189 instead of clockid_t.
191 2004-07-21 Roland McGrath <roland@redhat.com>
193 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
195 2004-07-19 Roland McGrath <roland@redhat.com>
197 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
199 2004-07-02 Roland McGrath <roland@redhat.com>
201 * configure: Don't exit.
203 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
205 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
206 (__pthread_cond_timedwait): Check for invalid nanosecond in
209 2004-07-07 Ulrich Drepper <drepper@redhat.com>
211 * Makefile: Add rules to build and run tst-fini1.
212 * tst-fini1.c: New file.
213 * tst-fini1mod.c: New file.
215 2004-07-05 Ulrich Drepper <drepper@redhat.com>
217 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
218 if no cancellation support is needed.
219 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
220 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
221 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
222 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
223 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
224 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
225 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
226 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
227 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
229 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
230 only if not already defined.
232 2004-07-05 Jakub Jelinek <jakub@redhat.com>
234 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
235 constraint "m" instead of "0" for futex.
237 * shlib-versions: Add powerpc64-.*-linux.*.
239 2004-07-04 Jakub Jelinek <jakub@redhat.com>
241 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
242 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
244 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
245 1 billion and 64-bit tv_nsec which is valid when truncated to 32
248 2004-06-29 Roland McGrath <roland@redhat.com>
250 * Banner: NPTL no longer has its own version number.
251 * Makefile (nptl-version): Variable removed.
252 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
253 using $(version), the glibc version number.
255 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
257 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
258 Fix branch offset for a PLT entry.
259 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
261 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
263 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
265 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
268 2004-06-28 Jakub Jelinek <jakub@redhat.com>
270 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
273 2004-06-28 Jakub Jelinek <jakub@redhat.com>
275 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
276 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
278 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
279 (pthread_rwlock_timedrdlock): Likewise.
281 2004-06-22 Jakub Jelinek <jakub@redhat.com>
283 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
284 Set __r7 to val, not mutex.
286 2004-06-27 Ulrich Drepper <drepper@redhat.com>
288 * Makefile: Add rules to build tst-rwlock14.
289 * tst-rwlock14.c: New file.
291 2004-06-24 Boris Hu <boris.hu@intel.com>
293 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
295 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
297 2004-06-19 Andreas Jaeger <aj@suse.de>
299 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
300 assembler in last patch.
302 2004-06-17 Ulrich Drepper <drepper@redhat.com>
304 * sysdeps/pthread/pthread_cond_timedwait.c
305 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
306 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
307 (__pthread_cond_timedwait): Check for invalid nanosecond in
309 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
310 * tst-cond19.c: New file.
311 * Makefile: Add rules to build and run tst-cond19.
313 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
315 * tst-context1.c (GUARD_PATTERN): Defined.
316 (tst_context_t): Define struct containing ucontext_t & guard words.
317 (ctx): Declare as an array of tst_context_t.
318 (fct): Verify uc_link & guard words are still valid.
319 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
321 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
323 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
324 Add __data.__futex field, reshuffle __data.__clock.
325 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
326 (__pthread_cond_signal): Increment __futex at the same time as
327 __wakeup_seq or __total_seq. Pass address of __futex instead of
328 address of low 32-bits of __wakeup_seq to futex syscall.
329 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
330 (__pthread_cond_wait): Likewise. Pass __futex value from before
331 releasing internal lock to FUTEX_WAIT.
332 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
333 (__pthread_cond_timedwait): Likewise.
334 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
335 (FUTEX_CMP_REQUEUE): Define.
336 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
337 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
338 Pass __futex value from before the unlock and __futex address instead
339 of address of low 32-bits of __wakeup_seq to futex syscall.
340 Fallback to FUTEX_WAKE all on any errors.
342 2004-06-08 Jakub Jelinek <jakub@redhat.com>
344 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
346 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
347 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
348 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
349 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
350 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
352 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
354 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
355 Add memory clobber to inline assembly.
356 (__lll_mutex_trylock): Likewise.
357 (__lll_mutex_cond_trylock): Likewise.
359 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
361 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
362 Pass val argument as 6th system call argument in %r7.
364 2004-05-21 Jakub Jelinek <jakub@redhat.com>
366 * Makefile (tests): Add tst-cond16.
367 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
368 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
369 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
370 Add __data.__futex field, reshuffle __data.__clock.
371 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
372 (__pthread_cond_signal): Increment __futex at the same time as
373 __wakeup_seq or __total_seq. Pass address of __futex instead of
374 address of low 32-bits of __wakeup_seq to futex syscall.
375 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
376 (__pthread_cond_wait): Likewise. Pass __futex value from before
377 releasing internal lock to FUTEX_WAIT.
378 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
379 (__pthread_cond_timedwait): Likewise.
380 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
381 (FUTEX_CMP_REQUEUE): Define.
382 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
383 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
384 Pass __futex value from before the unlock and __futex address instead
385 of address of low 32-bits of __wakeup_seq to futex syscall.
386 Fallback to FUTEX_WAKE all on any errors.
387 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
389 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
390 internally. Return non-zero if error, zero if success.
391 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
392 Add __data.__futex field, reshuffle __data.__clock.
393 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
395 (lll_futex_requeue): Add val argument, return 1 unconditionally
397 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
398 Add __data.__futex field, reshuffle __data.__clock.
399 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
401 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
402 internally. Return non-zero if error, zero if success.
403 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
404 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
405 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
407 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
408 internally. Return non-zero if error, zero if success.
409 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
410 Add __data.__futex field, reshuffle __data.__clock.
411 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
413 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
414 internally. Return non-zero if error, zero if success.
415 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
416 Add __data.__futex field, reshuffle __data.__clock.
417 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
418 Add __data.__futex field, reshuffle __data.__clock.
419 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
420 Increment __futex at the same time as __wakeup_seq or __total_seq.
421 Pass address of __futex instead of address of low 32-bits of
422 __wakeup_seq to futex syscall.
423 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
424 Pass __futex value from before releasing internal lock
426 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
427 Likewise. Avoid unnecessary shadowing of variables.
428 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
429 Set __futex to 2 * __total_seq. Pass __futex value from before the
430 unlock and __futex address instead of address of low 32-bits of
431 __wakeup_seq to futex_requeue macro, adjust for new return value
433 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
434 (__pthread_cond_signal): Increment __futex at the same time as
435 __wakeup_seq or __total_seq. Pass address of __futex instead of
436 address of low 32-bits of __wakeup_seq to futex syscall.
437 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
438 (__pthread_cond_wait): Likewise. Pass __futex value from before
439 releasing internal lock to FUTEX_WAIT.
440 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
441 (__pthread_cond_timedwait): Likewise.
442 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
443 (FUTEX_CMP_REQUEUE): Define.
444 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
445 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
446 Pass __futex value from before the unlock and __futex address instead
447 of address of low 32-bits of __wakeup_seq to futex syscall.
448 Fallback to FUTEX_WAKE all on any errors.
450 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
452 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
453 Add nop to align the end of critical section.
454 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
456 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
458 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
459 Add __broadcast_seq field.
460 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
461 all waiters as woken with woken_seq and bump broadcast counter.
462 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
463 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
464 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
465 Comment typo fixes. Avoid returning -ETIMEDOUT.
467 2004-06-01 Ulrich Drepper <drepper@redhat.com>
469 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
470 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
471 Reported by Kaz Kojima.
473 2004-05-25 Jakub Jelinek <jakub@redhat.com>
475 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
477 2004-05-21 Jakub Jelinek <jakub@redhat.com>
479 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
480 __broadcast_seq with bc_seq after acquiring internal lock instead of
483 2004-05-18 Jakub Jelinek <jakub@redhat.com>
485 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
487 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
488 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
489 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
490 (pthread_cond_t): Add __data.__broadcast_seq field.
491 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
492 (FRAME_SIZE): Define.
493 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
495 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
497 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
499 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
500 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
503 2004-05-18 Ulrich Drepper <drepper@redhat.com>
505 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
506 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
507 Add __broadcast_seq field.
508 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
509 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
510 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
511 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
512 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
513 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
514 all waiters as woken with woken_seq and bump broadcast counter.
515 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
516 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
517 __broadcast_seq field.
518 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
519 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
520 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
521 * pthread_cond_init.c: Initialize __broadcast_seq field.
522 * Makefile (tests): Add tst-cond17 and tst-cond18.
523 Add .NOTPARALLEL goal.
524 * tst-cond16.c: New file. From Jakub.
525 * tst-cond17.c: New file. From Jakub.
526 * tst-cond18.c: New file. From Jakub.
528 2004-05-16 Ulrich Drepper <drepper@redhat.com>
530 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
533 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
534 Parametrize frame size. Correct some unwind info.
535 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
537 2004-05-04 Jakub Jelinek <jakub@redhat.com>
539 * tst-stack3.c: Note testing functionality beyond POSIX.
541 2004-05-04 Jakub Jelinek <jakub@redhat.com>
543 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
544 Change conditional from ifdef to if.
546 2004-04-23 Jakub Jelinek <jakub@redhat.com>
548 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
549 SYSDEP_CANCEL_ERROR): Define.
552 2004-05-01 Jakub Jelinek <jakub@redhat.com>
554 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
556 2004-04-20 Jakub Jelinek <jakub@redhat.com>
558 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
560 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
562 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
563 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
564 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
565 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
567 2004-04-19 Ulrich Drepper <drepper@redhat.com>
569 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
570 thread has all signals blocked.
572 2004-04-18 Andreas Jaeger <aj@suse.de>
574 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
575 (SEM_VALUE_MAX): Add missing brace.
577 2004-04-17 Jakub Jelinek <jakub@redhat.com>
579 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
581 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
582 * sysdeps/pthread/tst-mqueue8x.c: New test.
583 * tst-cancel4.c: Update comment about message queues.
585 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
586 return it_value { 0, 0 }.
587 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
589 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
590 assertion for SIGEV_NONE.
591 (thread_attr_compare): Compare all attributes, not just a partial
594 2004-04-17 Jakub Jelinek <jakub@redhat.com>
596 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
598 2004-04-17 Ulrich Drepper <drepper@redhat.com>
600 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
601 Just use a plain number.
602 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
603 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
604 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
605 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
606 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
607 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
608 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
610 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
612 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
614 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
616 2004-04-15 Jakub Jelinek <jakub@redhat.com>
618 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
619 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
620 of calling sigwaitinfo.
622 2004-04-16 Ulrich Drepper <drepper@redhat.com>
624 * allocatestack.c (allocate_stack): Set reported_guardsize
626 * pthread_getattr_np.c (pthread_getattr_np): Use
627 reported_guardsize instead of guardsize.
628 * descr.h (struct pthread): Add reported_guardsize field.
630 2004-04-13 Jakub Jelinek <jakub@redhat.com>
632 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
634 2004-04-12 Ulrich Drepper <drepper@redhat.com>
636 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
638 2004-04-08 Jakub Jelinek <jakub@redhat.com>
640 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
641 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
642 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
643 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
644 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
646 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
647 (_POSIX_MESSAGE_PASSING): Define.
648 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
649 (_POSIX_MESSAGE_PASSING): Define.
650 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
651 (_POSIX_MESSAGE_PASSING): Define.
653 2004-04-04 Ulrich Drepper <drepper@redhat.com>
655 * tst-context1.c (fct): Check whether correct stack is used.
657 2004-04-03 Ulrich Drepper <drepper@redhat.com>
659 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
660 matching constraints for asm mem parameters.
662 * tst-clock2.c (tf): Don't define unless needed.
664 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
666 * Makefile (link-libc-static): Use $(static-gnulib) instead of
669 2004-03-30 Ulrich Drepper <drepper@redhat.com>
671 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
672 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
673 * pthreadP.h: Declare __nptl_deallocate_tsd.
674 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
677 * Makefile (tests): Add tst-tsd5.
678 * tst-tsd5.c: New file.
680 2004-03-29 Ulrich Drepper <drepper@redhat.com>
682 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
683 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
684 is SHLIB_COMPAT check.
685 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
686 (__pthread_attr_getaffinity_old): Likewise.
687 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
688 (__pthread_getaffinity_old): Likewise.
689 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
690 (__pthread_setaffinity_old): Likewise.
692 2004-03-26 Ulrich Drepper <drepper@redhat.com>
694 * allocatestack.c (_make_stacks_executable): Call
695 _dl_make_stack_executable first.
697 2004-03-24 Roland McGrath <roland@redhat.com>
699 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
700 constraint instead of "0".
702 2004-03-24 Ulrich Drepper <drepper@redhat.com>
704 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
705 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
707 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
708 code to avoid warning.
710 2004-03-24 Andreas Jaeger <aj@suse.de>
712 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
713 (__pthread_attr_setaffinity_old): Remove const.
715 2004-03-23 Ulrich Drepper <drepper@redhat.com>
717 * sysdeps/unix/sysv/linux/smp.h: New file.
718 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
719 * init.c: Define __is_smp.
720 (__pthread_initialize_minimal_internal): Call is_smp_system to
722 * pthreadP.h: Declare __is_smp.
723 Define MAX_ADAPTIVE_COUNT is necessary.
724 * pthread_mutex_init.c: Add comment regarding __spins field.
725 * pthread_mutex_lock.c: Implement adaptive mutex type.
726 * pthread_mutex_timedlock.c: Likewise.
727 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
728 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
730 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
731 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
732 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
733 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
734 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
735 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
736 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
737 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
738 lll_mutex_cond_trylock.
739 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
740 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
741 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
742 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
743 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
744 Define BUSY_WAIT_NOP.
745 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
746 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
748 * tst-mutex5.c: Add support for testing adaptive mutexes.
749 * tst-mutex7.c: Likewise.
750 * tst-mutex5a.c: New file.
751 * tst-mutex7a.c: New file.
752 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
754 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
755 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
756 vgettimeofday call might destroy the content.
758 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
761 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
762 No need to restrict type of ret. Make it int. Add comment.
764 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
765 Remove unnecessary setne instruction.
767 2004-03-22 Jakub Jelinek <jakub@redhat.com>
769 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
770 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
771 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
772 If realloc fails, break out of the loop.
774 2004-03-20 Andreas Jaeger <aj@suse.de>
776 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
777 (__pthread_setaffinity_old): Fix interface.
778 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
779 (__pthread_getaffinity_old): Likewise.
781 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
782 (__pthread_setaffinity_new): Remove duplicate declaration.
784 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
786 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
787 the return value to a safe register.
788 (CDISABLE): Set the function argument correctly.
790 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
792 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
793 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
794 Rewrite so that only one locked memory operation per round is needed.
795 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
796 (pthread_barrier_wait): After wakeup, release lock only when the
797 last thread stopped using the barrier object.
798 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
799 (__pthread_cond_wait): Don't store mutex address if the current
800 value is ~0l. Add correct cleanup support and unwind info.
801 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
802 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
803 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
804 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
805 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
806 Add correct cleanup support and unwind info.
807 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
808 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
809 information for syscall wrappers.
811 2004-03-18 Ulrich Drepper <drepper@redhat.com>
813 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
814 cpusetsize field, remove next.
815 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
816 parameter for size of the CPU set.
817 (pthread_setaffinity_np): Likewise.
818 (pthread_attr_getaffinity_np): Likewise.
819 (pthread_attr_setaffinity_np): Likewise.
820 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
821 interface change, keep compatibility code.
822 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
823 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
824 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
825 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
826 __pthread_getaffinity_np.
827 * Versions: Add version for changed interfaces.
828 * tst-attr3.c: Adjust test for interface change.
829 * pthread_getattr_np.c: Query the kernel about the affinity mask with
830 increasing buffer sizes.
831 * pthread_attr_destroy.c: Remove unused list handling.
832 * pthread_attr_init.c: Likewise.
834 2004-03-17 Roland McGrath <roland@redhat.com>
836 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
837 first argument to clock_getres so we ever enable kernel timers.
839 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
841 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
843 2004-03-12 Richard Henderson <rth@redhat.com>
845 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
846 oldvalue from CENABLE to CDISABLE.
848 2004-03-12 Ulrich Drepper <drepper@redhat.com>
850 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
851 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
852 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
853 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
855 2004-03-11 Richard Henderson <rth@redhat.com>
857 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
858 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
859 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
861 2004-03-11 Jakub Jelinek <jakub@redhat.com>
863 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
864 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
865 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
867 2004-03-11 Jakub Jelinek <jakub@redhat.com>
869 * forward.c (__pthread_cond_broadcast_2_0,
870 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
871 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
872 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
874 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
876 * sysdeps/sh/tcb-offsets.sym: Add PID.
877 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
878 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
880 2004-03-10 Ulrich Drepper <drepper@redhat.com>
882 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
883 include <sysdep-cancel.h>, vfork is no cancellation point.
884 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
885 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
886 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
888 2004-03-10 Jakub Jelinek <jakub@redhat.com>
890 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
892 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
893 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
895 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
897 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
898 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
899 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
900 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
901 of DO_CALL_VIA_BREAK. Work around a gas problem.
903 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
904 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
905 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
906 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
907 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
908 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
910 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
911 a local register for saving old PID. Negate PID in parent upon exit.
913 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
915 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
916 before syscall, set to the old value in the parent afterwards.
917 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
918 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
920 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
921 before syscall, set to the old value in the parent afterwards.
922 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
923 * sysdeps/s390/tcb-offsets.sym: Add PID.
925 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
926 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
927 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
928 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
929 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
930 * sysdeps/sparc/tcb-offsets.sym: Add PID.
932 2004-03-10 Andreas Schwab <schwab@suse.de>
934 * sysdeps/ia64/tcb-offsets.sym: Add PID.
935 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
936 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
938 2004-03-09 Jakub Jelinek <jakub@redhat.com>
940 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
941 * tst-cancel21.c (do_one_test): Likewise.
942 Reported by Gordon Jin <gordon.jin@intel.com>.
944 2004-02-09 Jakub Jelinek <jakub@redhat.com>
946 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
947 if non-zero and set to INT_MIN if zero.
948 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
949 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
950 (SAVE_PID, RESTORE_PID): Define.
952 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
953 Use relative path to avoid including NPTL i386/vfork.S.
954 (SAVE_PID, RESTORE_PID): Define.
955 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
956 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
957 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
959 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
960 * tst-vfork1.c: New test.
961 * tst-vfork2.c: New test.
962 * tst-vfork1x.c: New test.
963 * tst-vfork2x.c: New test.
965 2004-03-08 Ulrich Drepper <drepper@redhat.com>
967 * sysdeps/i386/tcb-offsets.sym: Add PID.
968 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
969 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
970 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
972 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
974 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
976 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
978 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
981 2004-03-07 Ulrich Drepper <drepper@redhat.com>
983 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
986 * tst-once4.c: Remove unnecessary macro definition.
988 * tst-mutex7.c (do_test): Limit thread stack size.
989 * tst-once2.c (do_test): Likewise.
990 * tst-tls3.c (do_test): Likewise.
991 * tst-tls1.c (do_test): Likewise.
992 * tst-signal3.c (do_test): Likewise.
993 * tst-kill6.c (do_test): Likewise.
994 * tst-key4.c (do_test): Likewise.
995 * tst-join4.c (do_test): Likewise.
996 * tst-fork1.c (do_test): Likewise.
997 * tst-context1.c (do_test): Likewise.
998 * tst-cond2.c (do_test): Likewise.
999 * tst-cond10.c (do_test): Likewise.
1000 * tst-clock2.c (do_test): Likewise.
1001 * tst-cancel10.c (do_test): Likewise.
1002 * tst-basic2.c (do_test): Likewise.
1003 * tst-barrier4.c (do_test): Likewise.
1005 2004-03-05 Ulrich Drepper <drepper@redhat.com>
1007 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
1009 2004-03-01 Ulrich Drepper <drepper@redhat.com>
1011 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1012 (__pthread_cond_timedwait): Optimize wakeup test.
1013 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
1014 (__pthread_cond_wait): Likewise.
1015 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
1016 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1019 2004-02-29 Ulrich Drepper <drepper@redhat.com>
1021 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1022 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
1023 the atomic instruction needed.
1024 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1025 (__lll_mutex_lock_wait): Likewise.
1027 2004-02-28 Ulrich Drepper <drepper@redhat.com>
1029 * Makefile (tests): Add tst-cond14 and tst-cond15.
1030 * tst-cond14.c: New file.
1031 * tst-cond15.c: New file.
1033 2004-02-27 Ulrich Drepper <drepper@redhat.com>
1035 * sysdeps/pthread/createthread.c (create_thread): Remove use of
1036 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
1037 needs to be implemented differently to be useful.
1039 2004-02-26 Ulrich Drepper <drepper@redhat.com>
1041 * pthread_attr_setschedparam.c: Don't test priority against limits
1042 here. Set ATTR_FLAG_SCHED_SET flag.
1043 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
1044 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
1045 from parent thread to child. If attribute is used and scheduling
1046 parameters are not inherited, copy parameters from attribute or
1047 compute them. Check priority value.
1048 * pthread_getschedparam.c: If the parameters aren't known yet get
1049 them from the kernel.
1050 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
1051 ATTR_FLAG_POLICY_SET flag for thread.
1052 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
1053 and ATTR_FLAG_POLICY_SET.
1055 * sysdeps/pthread/createthread.c: Use tgkill if possible.
1057 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
1058 fail if stack address hasn't been set. Just return 0.
1060 2004-02-25 Ulrich Drepper <drepper@redhat.com>
1062 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
1063 libpthread for the files in this list.
1064 (CFLAGS-tst-unload): Removed.
1065 * tst-unload.c (do_test): Don't use complete path for
1068 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
1071 2004-02-22 Ulrich Drepper <drepper@redhat.com>
1073 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1074 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
1075 operation per round is needed.
1076 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1077 (__lll_mutex_lock_wait): Likewise.
1079 2004-02-20 Ulrich Drepper <drepper@redhat.com>
1081 * tst-cancel9.c (cleanup): Don't print to stderr.
1083 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1085 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
1087 2004-02-20 Jakub Jelinek <jakub@redhat.com>
1089 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1090 (__syscall_error_handler2): Call CDISABLE.
1091 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1092 (__syscall_error_handler2): Call CDISABLE.
1094 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1095 Release lock before the loop, don't reacquire it.
1097 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
1099 2004-02-19 Andreas Schwab <schwab@suse.de>
1101 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1104 2004-02-18 Ulrich Drepper <drepper@redhat.com>
1106 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
1107 (pthread_barrier_wait): After wakeup, release lock only when the
1108 last thread stopped using the barrier object.
1109 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
1110 (pthread_barrier_wait): Likewise.
1111 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1113 * Makefile (tests): Add tst-barrier4.
1114 * tst-barrier4.c: New file.
1116 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1117 (__pthread_cond_timedwait): Perform timeout test while holding
1118 internal lock to prevent wakeup race.
1119 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
1120 * sysdeps/pthread/pthread_cond_timedwait.c
1121 (__pthread_cond_timedwait): Likewise.
1122 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1123 (__pthread_cond_timedwait): Likewise.
1125 2004-02-18 Jakub Jelinek <jakub@redhat.com>
1127 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
1128 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
1129 * Makefile (tests): Add tst-rwlock13.
1130 * tst-rwlock13.c: New test.
1132 2004-02-16 Ulrich Drepper <drepper@redhat.com>
1134 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1135 (__condvar_tw_cleanup): Little optimization.
1136 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
1138 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
1140 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
1141 libpthread as "lib" parameter to SHLIB_COMPAT.
1142 (__novmx_siglongjmp): Fix typo in function name.
1143 (__novmx_longjmp): Fix typo in function name.
1145 2004-02-13 Ulrich Drepper <drepper@redhat.com>
1147 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
1150 * sysdeps/generic/pt-longjmp.c: Moved to...
1151 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
1153 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
1155 * Makefile (libpthread-routines): Add pt-cleanup.
1156 * pt-longjmp.c: Removed.
1157 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
1158 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
1159 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
1160 Version longjmp, siglongjmp for GLIBC_2.3.4.
1161 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
1163 2004-02-13 Ulrich Drepper <drepper@redhat.com>
1165 * sysdeps/pthread/pthread_cond_timedwait.c
1166 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
1167 Reuse code. Add __builtin_expects.
1169 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1170 (__pthread_cond_timedwait): Get internal lock in case timeout has
1171 passed before the futex syscall.
1172 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1174 2004-01-20 Ulrich Drepper <drepper@redhat.com>
1176 * allocatestack.c: Pretty printing.
1178 * sysdeps/pthread/createthread.c (create_thread): Don't add
1179 CLONE_DETACHED bit if it is not necessary.
1181 2004-01-16 Ulrich Drepper <drepper@redhat.com>
1183 * pthread_getattr_np.c: Include ldsodefs.h.
1185 2004-01-16 Richard Henderson <rth@redhat.com>
1187 * allocatestack.c: Don't declare __libc_stack_end.
1188 * init.c (__pthread_initialize_minimal_internal): Likewise.
1189 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
1191 2004-01-15 Richard Henderson <rth@redhat.com>
1193 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
1194 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
1195 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
1196 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
1197 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
1198 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
1199 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1200 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
1202 2004-01-14 Ulrich Drepper <drepper@redhat.com>
1204 * init.c (pthread_functions): Make array const.
1206 2004-01-13 Ulrich Drepper <drepper@redhat.com>
1208 * allocatestack.c (__make_stacks_executable): Change interface.
1209 Check parameters. Pass parameter on to libc counterpart.
1210 * pthreadP.h: Change declaration.
1212 2004-01-13 Richard Henderson <rth@redhat.com>
1214 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
1216 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
1219 * sysdeps/alpha/Makefile: New file.
1220 * sysdeps/alpha/tcb-offsets.sym: New file.
1221 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1222 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
1224 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
1227 2004-01-08 Jakub Jelinek <jakub@redhat.com>
1229 * Makefile (tests): Add tst-backtrace1.
1230 * tst-backtrace1.c: New test.
1232 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
1234 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
1235 register as second parameter to the REGISTER macro.
1236 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
1237 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
1238 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
1239 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
1240 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
1241 of thread register as second parameter to REGISTER macro in 64 case.
1243 2004-01-03 Ulrich Drepper <drepper@redhat.com>
1245 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
1246 (CFLAGS-getpid.o): Defined.
1247 (CFLAGS-getpid.os): Defined.
1249 2003-12-31 Ulrich Drepper <drepper@redhat.com>
1251 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
1252 returned for main thread does not overlap with any other VMA.
1253 Patch by Jakub Jelinek.
1255 2003-12-29 Jakub Jelinek <jakub@redhat.com>
1257 * tst-raise1.c: Include stdio.h.
1259 2003-12-23 Jakub Jelinek <jakub@redhat.com>
1261 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
1262 setting with __ASSUME_TGKILL || defined __NR_tgkill.
1263 If pid is 0, set it to selftid.
1264 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
1265 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
1266 != 0, return self->tid without doing a syscall.
1267 * descr.h (struct pthread): Move pid field after tid.
1269 * Makefile (tests): Add tst-raise1.
1270 * tst-raise1.c: New file.
1272 2003-12-23 Roland McGrath <roland@redhat.com>
1274 * tst-oddstacklimit.c: New file.
1275 * Makefile (tests): Add it.
1276 (tst-oddstacklimit-ENV): New variable.
1278 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
1279 value up to page size for __default_stacksize.
1281 2003-12-21 Ulrich Drepper <drepper@redhat.com>
1283 * Makefile (tests): Add tst-eintr5.
1284 * tst-eintr5.c: New file.
1286 * eintr.c (eintr_source): Prevent sending signal to self.
1288 * tst-eintr2.c (tf1): Improve error message.
1290 2003-12-20 Ulrich Drepper <drepper@redhat.com>
1292 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
1293 * sysdeps/unix/sysv/linux/getpid.c: New file.
1294 * pthread_cancel.c: Add comment explaining use of PID field.
1295 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
1296 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
1297 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
1298 temporarily to signal the field must not be relied on and updated
1300 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
1301 temporarily negative.
1302 * sysdeps/unix/sysv/linux/raise.c: Likewise.
1304 2003-12-19 Ulrich Drepper <drepper@redhat.com>
1306 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
1307 (eintr_source): If ARG != NULL, use pthread_kill.
1308 * tst-eintr1.c: Adjust for this change.
1309 * tst-eintr2.c: Likewise.
1310 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
1311 * tst-eintr3.c: New file.
1312 * tst-eintr4.c: New file.
1314 2003-12-19 Jakub Jelinek <jakub@redhat.com>
1316 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
1317 if CANCELSTATE_BITMASK is set.
1318 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
1321 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
1322 (tests-reverse): Add tst-cancel23.
1323 * tst-cancel22.c: New test.
1324 * tst-cancel23.c: New test.
1326 2003-12-18 Ulrich Drepper <drepper@redhat.com>
1328 * tst-eintr1.c: Better error messages.
1330 * Makefile (tests): Add tst-eintr2.
1331 * tst-eintr2.c: New file.
1333 2003-12-18 Jakub Jelinek <jakub@redhat.com>
1335 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
1336 (CFLAGS-tst-cancelx21.c): Set.
1337 * tst-cancel21.c: New test.
1338 * tst-cancelx21.c: New test.
1340 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
1342 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
1343 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
1344 * pt-longjmp.c: Include jmpbuf-unwind.h.
1345 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
1346 _JMPBUF_UNWINDS. Adjust compared pointers.
1347 * init.c (__pthread_initialize_minimal_internal): Initialize
1348 pd->stackblock_size.
1349 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
1350 * sysdeps/alpha/jmpbuf-unwind.h: New file.
1351 * sysdeps/i386/jmpbuf-unwind.h: New file.
1352 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
1353 * sysdeps/s390/jmpbuf-unwind.h: New file.
1354 * sysdeps/sh/jmpbuf-unwind.h: New file.
1355 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
1356 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
1357 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
1358 (_JMPBUF_CFA_UNWINDS): Remove.
1359 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
1361 2003-12-12 Jakub Jelinek <jakub@redhat.com>
1363 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
1364 (CFLAGS-tst-cancelx20.c): Set.
1365 * tst-cancel20.c: New test.
1366 * tst-cancelx20.c: New test.
1368 2003-12-17 Ulrich Drepper <drepper@redhat.com>
1370 * init.c (__pthread_initialize_minimal_internal): Don't treat
1371 architectures with separate register stack special here when
1372 computing default stack size.
1374 2003-12-17 Roland McGrath <roland@redhat.com>
1376 * Makefile (tst-cancelx7-ARGS): New variable.
1377 Reportd by Greg Schafer <gschafer@zip.com.au>.
1379 2003-12-17 Jakub Jelinek <jakub@redhat.com>
1381 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
1382 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
1383 (tst-stack3-ENV): Set.
1384 ($(objpfx)tst-stack3-mem): New.
1385 * tst-stack3.c: New test.
1387 2003-12-10 David Mosberger <davidm@hpl.hp.com>
1389 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
1390 Add unwind directives. Drop unused .regstk directive.
1391 (_fini_EPILOG_BEGINS): Add unwind directives.
1393 2003-12-11 Ulrich Drepper <drepper@redhat.com>
1395 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
1396 Assume parameter is a pointer.
1397 (lll_futex_wake): Likewise.
1398 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
1400 (lll_futex_wake): Likewise.
1401 Reported by Boris Hu.
1402 * sysdeps/unix/sysv/linux/unregister-atfork.c
1403 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
1405 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
1407 2003-12-10 Ulrich Drepper <drepper@redhat.com>
1409 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
1410 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
1411 __rtld_lock_initialize for ld.so lock.
1412 Patch in part by Adam Li <adam.li@intel.com>.
1414 2003-12-02 David Mosberger <davidm@hpl.hp.com>
1416 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
1417 in $(gnulib). Also, remove stale comment.
1419 2003-11-12 David Mosberger <davidm@hpl.hp.com>
1421 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
1422 advantage of new syscall stub and optimize accordingly.
1424 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
1425 from SYS_futex, to match expectations of
1426 sysdep.h:DO_INLINE_SYSCALL.
1427 (lll_futex_clobbers): Remove.
1428 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
1429 (lll_futex_wake): Likewise.
1430 (lll_futex_requeue): Likewise.
1431 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
1432 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
1434 (__lll_mutex_lock): Likewise.
1435 (__lll_mutex_cond_lock): Likewise.
1436 (__lll_mutex_timed_lock): Likewise.
1437 (__lll_mutex_unlock): Likewise.
1438 (__lll_mutex_unlock_force): Likewise.
1440 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
1441 comes before the include of <sysdep.h>.
1442 (THREAD_SELF_SYSINFO): New macro.
1443 (THREAD_SYSINFO): Likewise.
1444 (INIT_SYSINFO): New macro.
1445 (TLS_INIT_TP): Call INIT_SYSINFO.
1447 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
1449 * sysdeps/pthread/createthread.c (create_thread): Use
1450 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
1451 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
1452 THREAD_SELF_SYSINFO instead of open code.
1453 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
1454 (THREAD_SYSINFO): Likewise.
1456 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
1458 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
1460 2003-12-06 Ulrich Drepper <drepper@redhat.com>
1462 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
1463 instead of .init. Patch by David Mosberger.
1465 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
1467 * sysdeps/pthread/configure.in: Remove broken declaration in C
1468 cleanup handling check.
1470 2003-11-30 Andreas Jaeger <aj@suse.de>
1472 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
1473 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
1476 2003-11-27 Jakub Jelinek <jakub@redhat.com>
1478 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
1479 * pthread_attr_destroy.c: Include shlib-compat.h.
1480 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
1481 is set in iattr->flags.
1482 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
1484 2003-11-21 Jakub Jelinek <jakub@redhat.com>
1486 * Makefile (distribute): Add tst-cleanup4aux.c.
1488 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
1491 2003-11-21 Ulrich Drepper <drepper@redhat.com>
1493 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
1494 pthread_cond_signal.
1496 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
1497 store mutex address if the current value is ~0l.
1498 * sysdeps/pthread/pthread_cond_timedwait.c
1499 (__pthread_cond_timedwait): Likewise.
1500 * sysdeps/pthread/pthread_cond_broadcast.c
1501 (__pthread_cond_broadcast): Don't use requeue for pshared
1504 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1505 (__pthread_cond_wait): Don't store mutex address if the current
1507 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1508 (__pthread_cond_timedwait): Likewise.
1509 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1510 (__pthread_cond_broadcast): Don't use requeue for pshared
1513 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
1514 element with ~0l for pshared condvars, with NULL otherwise.
1516 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
1517 (__pthread_cond_wait): Don't store mutex address if the current
1519 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1520 (__pthread_cond_timedwait): Likewise.
1521 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1522 (__pthread_cond_broadcast): Don't use requeue for pshared
1525 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
1526 * tst-cond12.c: New file.
1527 * tst-cond13.c: New file.
1529 2003-11-17 Ulrich Drepper <drepper@redhat.com>
1531 * sysdeps/pthread/configure.in: Make missing forced unwind support
1534 2003-11-11 Ulrich Drepper <drepper@redhat.com>
1536 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
1538 2003-11-06 Ulrich Drepper <drepper@redhat.com>
1540 * Makefile: Add magic to clean up correctly.
1542 2003-11-05 Jakub Jelinek <jakub@redhat.com>
1544 * unwind.c (FRAME_LEFT): Define.
1545 (unwind_stop): Handle old style cleanups here.
1546 (__pthread_unwind): Handle old style cleanups only if
1547 !HAVE_FORCED_UNWIND.
1548 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
1549 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
1550 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
1551 ($(objpfx)tst-cleanupx4): Likewise.
1552 * tst-cleanup4.c: New test.
1553 * tst-cleanup4aux.c: New.
1554 * tst-cleanupx4.c: New test.
1556 2003-11-04 Ulrich Drepper <drepper@redhat.com>
1558 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
1559 lll_mutex_*lock macros to skip atomic operations on some archs.
1561 2003-11-03 Ulrich Drepper <drepper@redhat.com>
1563 * sysdeps/pthread/tst-timer.c (main): Initialize
1564 sigev2.sigev_value as well.
1566 2003-10-15 Roland McGrath <roland@redhat.com>
1568 * sysdeps/pthread/configure.in: Barf if visibility attribute support
1570 * sysdeps/pthread/configure: Regenerated.
1572 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1574 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
1575 locking macros. No distinction between normal and mutex locking
1577 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
1578 Merge bits from lowlevelmutex.S we still need.
1579 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
1580 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
1581 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
1582 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
1583 new mutex implementation.
1584 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
1585 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
1586 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1587 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1588 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1589 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1590 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1591 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1592 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1593 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
1594 symbol for entry point to avoid cancellation.
1596 2003-10-07 Jakub Jelinek <jakub@redhat.com>
1598 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
1600 (SAVE_OLDTYPE_0): Fix a typo.
1602 2003-10-03 Ulrich Drepper <drepper@redhat.com>
1604 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
1605 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
1607 2003-10-02 Ulrich Drepper <drepper@redhat.com>
1609 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
1612 2003-10-02 Jakub Jelinek <jakub@redhat.com>
1614 * Makefile (tests): Add tst-cancel19.
1615 * tst-cancel19.c: New test.
1617 2003-10-02 Ulrich Drepper <drepper@redhat.com>
1619 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
1620 restoring of the old cancellation type.
1622 2003-09-30 Jakub Jelinek <jakub@redhat.com>
1624 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
1626 2003-09-27 Wolfram Gloger <wg@malloc.de>
1628 * sysdeps/pthread/malloc-machine.h: New file
1630 2003-09-24 Roland McGrath <roland@redhat.com>
1632 * allocatestack.c (__make_stacks_executable): Don't ignore return
1633 value from _dl_make_stack_executable.
1635 2003-09-24 Ulrich Drepper <drepper@redhat.com>
1637 * allocatestack.c (__make_stacks_executable): Also change
1638 permission of the currently unused stacks.
1640 * allocatestack.c (change_stack_perm): Split out from
1641 __make_stacks_executable.
1642 (allocate_stack): If the required permission changed between the time
1643 we started preparing the stack and queueing it, change the permission.
1644 (__make_stacks_executable): Call change_stack_perm.
1646 * Makefile: Build tst-execstack-mod locally.
1647 * tst-execstack-mod.c: New file.
1649 2003-09-23 Jakub Jelinek <jakub@redhat.com>
1651 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
1653 2003-09-23 Roland McGrath <roland@redhat.com>
1655 * tst-execstack.c: New file.
1656 * Makefile (tests): Add it.
1657 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
1658 (LDFLAGS-tst-execstack): New variable.
1660 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
1661 whether to use PROT_EXEC for stack mmap.
1662 (__make_stacks_executable): New function.
1663 * pthreadP.h: Declare it.
1664 * init.c (__pthread_initialize_minimal_internal): Set
1665 GL(dl_make_stack_executable_hook) to that.
1667 2003-09-22 Ulrich Drepper <drepper@redhat.com>
1669 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
1670 recommendation from AMD re avoidance of lock prefix.
1672 2003-09-22 Jakub Jelinek <jakub@redhat.com>
1674 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
1675 lll_futex_timed_wait instead of lll_futex_wait.
1676 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
1677 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
1678 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
1679 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
1680 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
1681 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
1682 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
1683 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
1684 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
1685 Completely revamp the locking macros. No distinction between
1686 normal and mutex locking anymore.
1687 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1688 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
1689 __lll_lock_timedwait): Fix prototypes.
1690 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
1691 __lll_lock_timedwait): Likewise.
1692 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
1693 macros, add __builtin_expect.
1694 (lll_mutex_timedlock): Likewise. Fix return value.
1695 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
1696 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
1697 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
1698 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
1699 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
1700 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
1701 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
1702 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
1704 2003-09-22 Ulrich Drepper <drepper@redhat.com>
1706 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1707 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
1708 operation if possible.
1710 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
1711 like jumping over the lock prefix.
1713 2003-09-21 Ulrich Drepper <drepper@redhat.com>
1715 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
1716 locking macros. No distinction between normal and mutex locking
1718 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1719 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1720 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1721 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
1722 locking. Merge bits from lowlevelmutex.S we still need.
1723 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1724 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1725 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
1726 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
1727 * Makefile (routines): Remove libc-lowlevelmutex.
1728 (libpthread-rountines): Remove lowlevelmutex.
1729 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
1730 for new mutex implementation.
1731 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1732 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1733 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1734 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1735 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1737 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1739 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1740 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1741 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
1742 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1743 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1744 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1745 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1746 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1748 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1750 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1751 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1752 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1754 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1755 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
1757 2003-09-20 Ulrich Drepper <drepper@redhat.com>
1759 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
1760 in parameters of asm with output parameters.
1762 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
1763 type of DECR parameter to int.
1764 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
1766 2003-09-18 Jakub Jelinek <jakub@redhat.com>
1768 * tst-attr3.c (tf, do_test): Print stack start/end/size and
1769 guardsize for each thread.
1771 2003-09-17 Jakub Jelinek <jakub@redhat.com>
1773 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
1774 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
1775 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
1777 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
1778 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
1780 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
1781 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
1782 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
1783 (pthread_getaffinity_np): Add hidden_def.
1785 * Makefile (tests): Add tst-attr3.
1786 * tst-attr3.c: New test.
1788 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
1790 2003-09-15 Jakub Jelinek <jakub@redhat.com>
1792 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
1793 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
1795 2003-09-17 Jakub Jelinek <jakub@redhat.com>
1797 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
1798 * tst-align.c: Include tst-stack-align.h.
1799 (tf, do_test): Use TEST_STACK_ALIGN macro.
1801 2003-09-17 Ulrich Drepper <drepper@redhat.com>
1803 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
1806 2003-09-16 Ulrich Drepper <drepper@redhat.com>
1808 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
1809 stack-related values for the initial thread.
1811 2003-09-15 Jakub Jelinek <jakub@redhat.com>
1813 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
1815 2003-09-11 Ulrich Drepper <drepper@redhat.com>
1817 * pthread_mutex_lock.c: Minor code rearrangements.
1819 2003-09-05 Roland McGrath <roland@redhat.com>
1821 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
1822 Instead, include ../nptl_db/db_info.c to do its magic.
1823 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
1824 (__pthread_pthread_key_2ndlevel_size): Likewise.
1825 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
1826 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
1827 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
1828 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
1829 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
1830 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
1831 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
1832 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
1833 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
1834 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
1835 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
1836 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
1837 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
1838 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
1839 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
1840 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
1841 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
1843 2003-09-08 Ulrich Drepper <drepper@redhat.com>
1845 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
1846 of pthread_t to be compatible with LT.
1847 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1848 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1849 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1850 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1851 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
1852 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1853 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1855 2003-09-04 Ulrich Drepper <drepper@redhat.com>
1857 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
1859 2003-09-04 Jakub Jelinek <jakub@redhat.com>
1861 * unwind-forcedunwind.c: Move to...
1862 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
1863 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
1864 * sysdeps/pthread/jmpbuf-unwind.h: New file.
1865 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
1866 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
1867 * unwind.c: Include jmpbuf-unwind.h.
1868 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
1870 2003-09-02 Jakub Jelinek <jakub@redhat.com>
1872 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
1873 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
1874 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
1875 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
1876 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
1877 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
1878 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
1879 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
1880 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
1881 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
1882 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
1884 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
1885 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
1886 * Makefile (tests): Add tst-stack2.
1887 * tst-stack2.c: New test.
1888 * tst-stack1.c: Include limits.h and sys/param.h.
1889 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
1891 * pthread_condattr_setpshared.c: Include errno.h.
1892 (pthread_condattr_setpshared): Return EINVAL if pshared
1893 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
1895 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
1896 defined symbol for entry point to avoid cancellation.
1897 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1899 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1901 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
1903 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
1905 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1907 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
1908 __close_nocancel, __read_nocancel, __write_nocancel,
1909 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
1910 libpthread.so or librt.so, define to corresponding function
1911 without _nocancel suffix.
1912 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
1913 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
1914 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
1916 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
1918 2003-09-02 Ulrich Drepper <drepper@redhat.com>
1920 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1921 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
1923 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
1924 in subsections has a symbol associated with it.
1926 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
1927 defined symbol for entry point to avoid cancellation.
1928 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
1930 2003-09-01 Jakub Jelinek <jakub@redhat.com>
1932 * Makefile (tests): Add tst-tls5.
1933 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
1934 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
1935 ($(objpfx)tst-tls5): New.
1936 ($(objpfx)tst-tls6.out): Likewise.
1937 (tests): Depend on $(objpfx)tst-tls6.out.
1938 * tst-tls3.c: Include stdint.h and pthreaddef.h.
1939 (do_test): Check pthread_self () return value alignment.
1940 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
1941 (tf): Check pthread_self () return value alignment.
1942 * tst-tls5.c: New test.
1944 * tst-tls5mod.c: New.
1945 * tst-tls5moda.c: New.
1946 * tst-tls5modb.c: New.
1947 * tst-tls5modc.c: New.
1948 * tst-tls5modd.c: New.
1949 * tst-tls5mode.c: New.
1950 * tst-tls5modf.c: New.
1951 * tst-tls6.sh: New test.
1953 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
1954 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
1955 * init.c (pthread_functions): Initialize them.
1956 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
1957 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
1958 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
1959 pthread_cond_timedwait@@GLIBC_2.3.2.
1961 2003-09-01 Jakub Jelinek <jakub@redhat.com>
1963 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
1964 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
1965 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
1966 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
1967 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
1968 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
1970 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
1972 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
1973 _POSIX_THREAD_PRIORITY_SCHEDULING.
1974 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1976 2003-08-31 Ulrich Drepper <drepper@redhat.com>
1978 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
1979 nested function, use static inline function from libio.h.
1980 Code by Richard Henderson.
1982 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
1985 2003-08-30 Jakub Jelinek <jakub@redhat.com>
1987 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
1988 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
1989 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
1990 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
1991 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
1992 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
1993 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
1994 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
1995 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
1996 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
1997 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
1998 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
1999 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
2000 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
2001 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2002 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
2003 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
2004 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
2005 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
2006 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
2007 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
2008 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
2009 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
2010 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
2011 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
2012 * sysdeps/sparc/tls.h: New file.
2013 * sysdeps/sparc/tcb-offsets.sym: New file.
2014 * sysdeps/sparc/Makefile: New file.
2015 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
2016 * init.c [__sparc__] (__NR_set_tid_address): Define.
2018 2003-08-29 Jakub Jelinek <jakub@redhat.com>
2020 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
2021 _IO_release_lock): Define.
2023 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
2025 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
2026 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
2028 2003-08-27 Ulrich Drepper <drepper@redhat.com>
2030 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
2031 (__pthread_cleanup_class): Add missing return types of member
2034 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
2036 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2037 (lll_mutex_unlock_force): Add memory barrier between store and futex
2040 2003-08-25 Ulrich Drepper <drepper@redhat.com>
2042 * tst-cancel4.c (do_test): Also unlink tempfname and remove
2043 tempmsg in first loop.
2045 2003-08-18 Ulrich Drepper <drepper@redhat.com>
2047 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2048 _POSIX_THREAD_PRIORITY_SCHEDULING.
2049 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2051 2003-08-07 Jakub Jelinek <jakub@redhat.com>
2053 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
2054 (__rtld_lock_default_lock_recursive,
2055 __rtld_lock_default_unlock_recursive): Define.
2056 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
2057 __rtld_lock_unlock_recursive): Define using
2058 GL(_dl_rtld_*lock_recursive).
2059 * init.c (__pthread_initialize_minimal_internal): Initialize
2060 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
2061 Lock GL(_dl_load_lock) the same number of times as
2062 GL(_dl_load_lock) using non-mt implementation was nested.
2064 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
2065 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
2067 2003-08-06 Jakub Jelinek <jakub@redhat.com>
2069 * tst-cancel17.c (do_test): Make len2 maximum of page size and
2072 2003-08-07 Jakub Jelinek <jakub@redhat.com>
2074 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
2076 2003-08-03 Jakub Jelinek <jakub@redhat.com>
2078 * sysdeps/pthread/createthread.c (do_clone): Move error handling
2079 to first syscall error check. Move syscall error check for tkill
2080 into __ASSUME_CLONE_STOPPED #ifdef.
2082 2003-08-02 Ulrich Drepper <drepper@redhat.com>
2084 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
2085 is not defined, do explicit synchronization.
2086 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
2087 is not defined also unlock pd->lock for non-debugging case in case
2089 * pthread_create.c (start_thread): Always get and release pd->lock
2090 if __ASSUME_CLONE_STOPPED is not defined.
2091 (start_thread_debug): Removed. Adjust users.
2092 * allocatestack.c (allocate_stack): Always initialize lock if
2093 __ASSUME_CLONE_STOPPED is not defined.
2094 * Makefile (tests): Add tst-sched1.
2095 * tst-sched1.c: New file.
2097 * sysdeps/pthread/createthread.c (do_clone): Only use
2098 sched_setschduler and pass correct parameters.
2100 2003-07-31 Jakub Jelinek <jakub@redhat.com>
2102 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
2103 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
2104 PTHREAD_STACK_MIN in comments.
2106 2003-07-31 Jakub Jelinek <jakub@redhat.com>
2108 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2109 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
2111 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
2112 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
2113 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
2114 (__pthread_cleanup_upto): Fix prototype.
2115 (_longjmp_unwind): Adjust caller.
2116 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
2117 Change second argument to const struct pointer.
2118 * tst-sem8.c (main): Remove unused s2 and s3 variables.
2119 * tst-sem9.c (main): Likewise.
2120 * unwind.c: Include string.h for strlen prototype.
2122 2003-07-31 Ulrich Drepper <drepper@redhat.com>
2124 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2125 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
2126 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
2128 Patch by Nicholas Miell <nmiell@attbi.com>.
2130 2003-07-30 Jakub Jelinek <jakub@redhat.com>
2132 * init.c (__pthread_initialize_minimal_internal): Initialize
2133 GL(dl_init_static_tls).
2134 * pthreadP.h (__pthread_init_static_tls): New prototype.
2135 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
2137 * Makefile (tests): Add tst-tls4.
2138 (modules-names): Add tst-tls4moda and tst-tls4modb.
2139 ($(objpfx)tst-tls4): Link against libdl and libpthread.
2140 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
2142 * tst-tls4.c: New file.
2143 * tst-tls4moda.c: New file.
2144 * tst-tls4modb.c: New file.
2146 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
2148 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
2149 before __timer_dealloc.
2150 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
2151 Don't call list_unlink.
2153 2003-07-29 Roland McGrath <roland@redhat.com>
2155 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
2157 2003-07-25 Jakub Jelinek <jakub@redhat.com>
2159 * tst-cancel17.c (do_test): Check if aio_cancel failed.
2160 Don't reuse struct aiocb A if it failed.
2161 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
2162 not just one byte, as that does not block.
2164 2003-07-22 Jakub Jelinek <jakub@redhat.com>
2166 * sysdeps/pthread/unwind-resume.c: New file.
2167 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
2168 unwind-resume in csu subdir.
2169 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
2171 (librt-sysdep_routines, librt-shared-only-routines): Add
2173 * sysdeps/pthread/rt-unwind-resume.c: New file.
2174 * unwind-forcedunwind.c: New file.
2175 * Makefile (libpthread-routines): Add unwind-forcedunwind.
2176 (libpthread-shared-only-routines): Likewise.
2177 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
2178 * pthreadP.h (pthread_cancel_init): New prototype.
2179 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
2181 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
2182 attr argument const struct pthread_attr *.
2184 * res.c (__res_state): Return __resp.
2185 * descr.h: Include resolv.h.
2186 (struct pthread): Add res field.
2187 * pthread_create.c: Include resolv.h.
2188 (start_thread): Initialize __resp.
2189 * Makefile (tests): Add tst-_res1.
2190 (module-names): Add tst-_res1mod1, tst-_res1mod2.
2191 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
2192 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
2194 * tst-_res1.c: New file.
2195 * tst-_res1mod1.c: New file.
2196 * tst-_res1mod2.c: New file.
2198 2003-07-21 Ulrich Drepper <drepper@redhat.com>
2200 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
2202 * Makefile: Define various *-no-z-defs variables for test DSOs
2203 which has undefined symbols.
2205 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
2207 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2208 Retry if the stwcx fails to store once_control.
2210 2003-07-20 Ulrich Drepper <drepper@redhat.com>
2212 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
2213 pthread_attr_setaffinity.
2214 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
2215 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
2216 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
2217 * pthread_attr_destroy.c: Free cpuset element if allocated.
2218 * pthread_create.c: Pass iattr as additional parameter to
2220 * sysdeps/pthread/createthread.c: If attribute is provided and
2221 a new thread is created with affinity set or scheduling parameters,
2222 start thread with CLONE_STOPPED.
2223 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
2224 pthread_attr_setaffinity.
2225 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
2228 2003-07-15 Ulrich Drepper <drepper@redhat.com>
2230 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
2232 2003-07-14 Ulrich Drepper <drepper@redhat.com>
2234 * sysdeps/pthread/configure.in: Require CFI directives also for
2237 2003-07-15 Jakub Jelinek <jakub@redhat.com>
2239 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
2242 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2244 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
2246 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
2247 registers as variables. Call __pthread_mutex_unlock_usercnt.
2248 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2249 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
2250 not self pointer in __writer. Compare with TID to determine
2252 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2253 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2255 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2257 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
2258 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
2259 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
2260 macros also when compiling librt.
2262 2003-07-11 Jakub Jelinek <jakub@redhat.com>
2264 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
2265 -fasynchronous-unwind-tables.
2266 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2267 (PSEUDO): Add cfi directives.
2268 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
2270 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
2273 2003-07-08 Jakub Jelinek <jakub@redhat.com>
2275 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
2276 __pthread_unregister_cancel): Add prototypes and hidden_proto.
2277 * unwind.c (__pthread_unwind_next): Add hidden_def.
2278 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
2280 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2281 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2282 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2284 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
2285 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2287 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
2288 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
2289 __pthread_unregister_cancel and __pthread_unwind_next.
2291 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2293 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
2294 different symbol for the cancellation syscall wrapper and
2295 non-cancellation syscall wrapper.
2296 (PSEUDO_END): Define.
2298 2003-07-05 Richard Henderson <rth@redhat.com>
2300 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
2301 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
2302 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
2303 return actual return value from the syscall, not 0.
2305 2003-07-07 Ulrich Drepper <drepper@redhat.com>
2307 * descr.h (struct pthread): Add pid field.
2308 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
2309 (__reclaim_stacks): Likewise.
2310 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
2311 also check for PID of the signal source.
2312 (__pthread_initialize_minimal_internal): Also initialize pid field
2313 of initial thread's descriptor.
2314 * pthread_cancel.c: Use tgkill instead of tkill if possible.
2315 * sysdeps/unix/sysv/linux/fork.c: Likewise.
2316 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
2317 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
2318 * sysdeps/unix/sysv/linux/raise.c: Likewise.
2320 2003-07-05 Ulrich Drepper <drepper@redhat.com>
2322 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
2323 Fix use of parameter.
2324 (__libc_cleanup_pop): Likewise.
2326 2003-07-04 Ulrich Drepper <drepper@redhat.com>
2328 * init.c (sigcancel_handler): Change parameters to match handler
2329 for SA_SIGACTION. Check signal number and code to recognize
2330 invalid invocations.
2332 2003-07-03 Roland McGrath <roland@redhat.com>
2334 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
2335 Apply sizeof (struct pthread) bias to r13 value.
2337 2003-07-03 Ulrich Drepper <drepper@redhat.com>
2339 * sysdeps/pthread/configure.in: Require CFI directives.
2341 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
2343 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
2344 libpthread compilation.
2345 * unwind.c (__pthread_unwind): Add hidden_def.
2346 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
2348 2003-07-01 Ulrich Drepper <drepper@redhat.com>
2350 * libc-cancellation.c (__libc_cleanup_routine): Define.
2351 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
2352 (__pthread_cleanup_pop): Define.
2354 2003-07-01 Richard Henderson <rth@redhat.com>
2356 * sysdeps/alpha/elf/pt-initfini.c: New file.
2357 * sysdeps/alpha/pthread_spin_lock.S: New file.
2358 * sysdeps/alpha/pthread_spin_trylock.S: New file.
2359 * sysdeps/alpha/pthreaddef.h: New file.
2360 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
2361 * sysdeps/alpha/tls.h: New file.
2362 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
2363 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
2364 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
2365 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
2366 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
2367 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
2368 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
2369 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
2370 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
2371 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
2373 2003-07-01 Ulrich Drepper <drepper@redhat.com>
2375 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
2376 cleanup support and unwind info.
2378 2003-06-30 Ulrich Drepper <drepper@redhat.com>
2380 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
2381 Use correct cleanup handler registration. Add unwind info.
2382 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
2383 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
2384 * tst-once3.c: Add cleanup handler and check it is called.
2385 * tst-once4.c: Likewise.
2386 * tst-oncex3.c: New file.
2387 * tst-oncex4.c: New file.
2388 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
2390 2003-06-29 Ulrich Drepper <drepper@redhat.com>
2392 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
2394 2003-06-27 Ulrich Drepper <drepper@redhat.com>
2396 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
2397 (tf_msgsnd): Likewise.
2399 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
2400 premature returns a bit more.
2402 2003-06-26 Ulrich Drepper <drepper@redhat.com>
2404 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
2405 definition to the front.
2407 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
2408 the cleanup functions to make the names unique. Fix dwarf opcode
2410 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
2411 functions to make the names unique. Fix CFA offset for two blocks.
2413 2003-06-25 Ulrich Drepper <drepper@redhat.com>
2415 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
2416 missing closing braces.
2417 Patch by Christophe Saout <christophe@saout.de>.
2419 2003-06-24 Roland McGrath <roland@redhat.com>
2421 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
2423 2003-06-24 Ulrich Drepper <drepper@redhat.com>
2425 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
2426 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
2428 * pthreadP.h: Declare __find_thread_by_id.
2429 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
2430 * pthread_clock_gettime.c: Allow using other thread's clock.
2431 * pthread_clock_settime.c: Likewise.
2432 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
2433 * Makefile: Add rules to build and run tst-clock2.
2434 * tst-clock2.c: New file.
2436 2003-06-23 Ulrich Drepper <drepper@redhat.com>
2438 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
2439 to use exception-based cleanup handler.
2440 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2442 * tst-cond8.c (ch): Announce that we are done.
2444 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
2446 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
2447 Also test aio_suspend with timeout value.
2449 2003-06-22 Ulrich Drepper <drepper@redhat.com>
2451 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
2452 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
2455 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
2456 (__pthread_mutex_lock_internal): Likewise.
2457 (__pthread_mutex_unlock_internal): Likewise.
2458 (__pthread_mutex_unlock_usercnt): Declare.
2459 * pthread_mutex_destroy.c: Always fail if used in any way.
2460 * pthread_mutex_init.c: Update comment.
2461 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
2462 * pthread_mutex_timedlock.c: Adjust __nusers.
2463 * pthread_mutex_trylock.c: Adjust __nusers.
2464 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
2465 and public interfaces are wrapper with pass additional parameter.
2466 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
2468 * tst-mutex8.c: New file.
2469 * Makefile (tests): Add tst-mutex8.
2470 * sysdeps/pthread/pthread_cond_timedwait.c: Call
2471 __pthread_mutex_unlock_usercnt.
2472 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2473 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2474 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2475 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2476 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2477 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
2478 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2480 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2481 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2482 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2483 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2484 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2486 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
2487 * pthread_mutex_timedlock.c: Likewise.
2488 * pthread_mutex_trylock.c: Adjust __nusers.
2489 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
2490 * tst-mutex9.c: New file.
2491 * Makefile (tests): Add tst-mutex9.
2492 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
2493 * sysdeps/ia64/tls.h: Likewise.
2494 * sysdeps/powerpc/tls.h: Likewise.
2495 * sysdeps/s390/tls.h: Likewise.
2496 * sysdeps/sh/tls.h: Likewise.
2497 * sysdeps/x86_64/tls.h: Likewise.
2498 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2499 Change type of __owner.
2500 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2501 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2502 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2503 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2504 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2506 2003-06-19 Jakub Jelinek <jakub@redhat.com>
2508 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
2509 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
2511 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
2512 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
2513 instead of nr to lll_futex_wake. Only set errno and return -1
2516 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
2517 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
2518 return actual return value from the syscall, not 0.
2520 2003-06-18 Ulrich Drepper <drepper@redhat.com>
2522 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
2523 find a random value.
2524 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
2527 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
2528 compat_timer_settime.
2529 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
2530 compat_timer_gettime.
2531 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
2532 compat_timer_getoverrun.
2533 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
2534 compat_timer_delete.
2536 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
2537 error-checking mutex detect busy mutexes.
2539 2003-06-17 Ulrich Drepper <drepper@redhat.com>
2541 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
2542 Add ax to clobber list.
2543 (lll_mutex_cond_lock): Likewise.
2544 (lll_mutex_unlock): Likewise.
2545 (lll_lock): Likewise.
2546 (lll_unlock): Likewise.
2548 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
2549 * tst-cancel18.c: New file.
2550 * tst-cancelx18.c: New file.
2552 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
2555 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
2556 * tst-cancel17.c: New file.
2557 * tst-cancelx17.c: New file.
2559 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
2560 * sysdeps/unix/sysv/linux/sigwait.c: New file.
2561 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
2563 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
2565 2003-06-16 Jakub Jelinek <jakub@redhat.com>
2567 * sysdeps/pthread/createthread.c (create_thread): Set
2568 header.multiple_threads unconditionally.
2569 * allocatestack.c (allocate_stack): Likewise.
2570 * descr.h (struct pthread): Add header.multiple_threads
2572 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
2573 Define for librt. #error if neither libpthread, libc nor librt.
2574 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
2576 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
2577 CDISABLE): Likewise.
2578 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
2579 CDISABLE): Likewise.
2580 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
2581 CDISABLE): Likewise.
2582 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
2583 CDISABLE): Likewise. Access header.multiple_threads outside of
2584 libc and libpthread.
2585 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
2587 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
2588 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
2590 2003-06-17 Ulrich Drepper <drepper@redhat.com>
2592 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
2593 Also test early cancellation before the thread reaches the cancellation
2596 * Makefile: Compile forward.c with exceptions.
2598 * sysdeps/unix/sysv/linux/sleep.c: New file.
2600 2003-06-16 Ulrich Drepper <drepper@redhat.com>
2602 * Makefile: Add CFLAGS definition to compile function wrappers
2603 duplicated from libc with exceptions.
2604 * tst-cancel4.c: Also check cancellation handlers.
2606 * Makefile: Add rules to build and run tst-cancel16 and
2607 tst-cancelx16. Add missing CFLAGS definitions.
2608 * tst-cancel16.c: New file.
2609 * tst-cancelx16.c: New file.
2611 2003-06-15 Ulrich Drepper <drepper@redhat.com>
2613 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
2614 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
2615 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
2616 (DL_SYSINFO_IMPLEMENTATION): Likewise.
2618 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
2619 (LIBC_CANCEL_RESET): Likewise.
2620 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
2621 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
2623 (CFLAGS-libcrt-cancellation.c): Define.
2624 * sysdeps/pthread/librt-cancellation.c: New file.
2625 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
2626 macros also when compiling librt.
2627 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2628 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2629 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2630 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2631 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2632 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2633 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2635 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
2636 compat_timer_create.
2638 2003-06-14 Ulrich Drepper <drepper@redhat.com>
2640 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
2642 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
2644 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2645 Add libc_hidden_def.
2647 2003-06-13 Roland McGrath <roland@redhat.com>
2649 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
2650 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
2652 2003-06-11 Ulrich Drepper <drepper@redhat.com>
2654 * allocatestack.c (queue_stack): Always inline.
2655 * ptreadhP.h (__do_cancel): Likewise.
2657 2003-06-10 Jakub Jelinek <jakub@redhat.com>
2659 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
2662 2003-06-10 Ulrich Drepper <drepper@redhat.com>
2664 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2665 (__pthread_cond_signal): Remove incorrect second addition for
2668 2003-06-09 Ulrich Drepper <drepper@redhat.com>
2670 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2671 (__pthread_cond_signal): Use correct futex pointer in
2672 __lll_mutex_lock_wait call.
2674 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2675 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
2677 2003-06-08 Ulrich Drepper <drepper@redhat.com>
2679 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
2681 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
2684 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
2685 hand-written CFI generation code. Since ENTRY/END also initiated
2686 CFI frames this caused two CFI sets to be generated.
2688 2003-06-07 Ulrich Drepper <drepper@redhat.com>
2690 * cleanup_routine.c: New file.
2691 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
2692 * sysdeps/pthread/pthread.h: Add support for fully exception-based
2694 * Makefile (libpthread-routines): Add cleanup_routine.
2695 Add more CFLAGS variables to compile with exceptions. Add comments
2696 why which file needs unwind tables.
2697 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
2699 * tst-cancelx1.c: New file.
2700 * tst-cancelx2.c: New file.
2701 * tst-cancelx3.c: New file.
2702 * tst-cancelx4.c: New file.
2703 * tst-cancelx5.c: New file.
2704 * tst-cancelx6.c: New file.
2705 * tst-cancelx7.c: New file.
2706 * tst-cancelx8.c: New file.
2707 * tst-cancelx9.c: New file.
2708 * tst-cancelx10.c: New file.
2709 * tst-cancelx11.c: New file.
2710 * tst-cancelx12.c: New file.
2711 * tst-cancelx13.c: New file.
2712 * tst-cancelx14.c: New file.
2713 * tst-cancelx15.c: New file.
2714 * tst-cleanupx0.c: New file.
2715 * tst-cleanupx0.expect: New file.
2716 * tst-cleanupx1.c: New file.
2717 * tst-cleanupx2.c: New file.
2718 * tst-cleanupx3.c: New file.
2720 * tst-cleanup0.c: Make standard compliant.
2721 * tst-cleanup1.c: Likewise.
2723 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
2724 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2725 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2726 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2727 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2728 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2729 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
2731 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2732 * tst-cancel12.c: New file.
2733 * tst-cancel13.c: New file.
2734 * tst-cancel14.c: New file.
2735 * tst-cancel15.c: New file.
2736 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
2739 * tst-cancel1.c: Add some comments.
2741 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
2744 2003-06-06 Ulrich Drepper <drepper@redhat.com>
2746 * Makefile (CFLAGS-pthread_cancel.c): Define.
2748 2003-06-05 Ulrich Drepper <drepper@redhat.com>
2750 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
2751 Change type of __writer element to int.
2752 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2753 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2754 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2755 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2756 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2757 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
2758 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2759 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
2760 Compare with TID to determine deadlocks.
2761 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
2762 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
2763 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
2764 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
2765 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2766 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2768 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2770 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2771 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2772 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2774 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2776 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2777 * Makefile (tests): Add tst-rwlock12.
2778 * tst-rwlock12.c: New file.
2780 2003-06-05 Jakub Jelinek <jakub@redhat.com>
2782 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
2783 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
2784 Remove bogus hidden_proto.
2785 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
2787 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
2788 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
2789 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
2790 ___lll_mutex_timedlock): Likewise.
2792 2003-06-04 Ulrich Drepper <drepper@redhat.com>
2794 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2795 (__pthread_cond_signal): Add some code to eventually handle
2798 2003-06-01 Ulrich Drepper <drepper@redhat.com>
2800 * Makefile (tests): Add tst-exec4.
2801 (tst-exec4-ARGS): Define.
2802 * tst-exec4.c: New file.
2804 2003-05-31 Ulrich Drepper <drepper@redhat.com>
2806 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2807 Also fail if tv_nsec < 0.
2808 (__lll_timedwait_tid): Likewise.
2809 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2810 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
2812 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
2814 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
2816 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
2818 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
2820 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
2823 * Makefile (tests): Add tst-sem8 and tst-sem9.
2824 * tst-sem8.c: New file.
2825 * tst-sem9.c: New file.
2826 * sem_open.c: Fix creation of in_use record if the file exists but
2829 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
2832 * sysdeps/pthread/timer_create.c (timer_create): In case
2833 evp==NULL, assign timer ID to sival_ptr.
2835 * descr.h (struct pthread_unwind_buf): Change type of prev element to
2836 struct pthread_unwind_buf *.
2837 (struct pthread): Likewise for cleanup_jmp_buf element.
2839 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
2840 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
2841 * unwind.c (__pthread_unwind_next): Likewise.
2843 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2845 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
2846 (lll_futex_timed_wait): Use int for futex value parameter.
2847 (lll_futex_wake): Likewise.
2848 (lll_futex_requeue): Likewise.
2850 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
2851 Replace one memory operation with one register operation.
2853 * tst-join4.c (do_test): Fix error message.
2855 * tst-rwlock6.c (do_test): Use correct format specifier.
2857 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
2858 (__lll_mutex_lock_wait): Replace one memory operation with one
2860 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
2861 (__lll_mutex_lock_wait): Likewise.
2863 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
2864 (__lll_mutex_cond_lock): Add one to value parameter of
2865 __lll_lock_wait to reflect reality in the futex syscall.
2866 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2867 (lll_mutex_cond_lock): Likewise.
2869 2003-05-30 Jakub Jelinek <jakub@redhat.com>
2871 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
2873 (lll_mutex_cond_lock): Define.
2875 2003-05-29 Ulrich Drepper <drepper@redhat.com>
2877 * Makefile (tests): Add tst-signal6.
2878 * tst-signal6.c: New file.
2880 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
2881 (__lll_mutex_unlock_force): New function
2882 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
2884 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
2885 (__lll_mutex_unlock_force): New function.
2886 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
2888 * tst-rwlock7.c (do_test): Use correct format specifier.
2890 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
2891 Find break parameter in correct asm argument.
2893 2003-05-27 Jakub Jelinek <jakub@redhat.com>
2895 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
2897 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
2899 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2901 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
2902 lll_futex_requeue, lll_mutex_unlock_force): Define.
2904 2003-05-30 Jakub Jelinek <jakub@redhat.com>
2906 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2907 (pthread_cond_t): Add __mutex.
2908 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
2909 lll_futex_requeue, lll_mutex_unlock_force): Define.
2911 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2913 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
2914 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2916 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
2918 (lll_futex_wait, lll_futex_wake): Define.
2919 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
2920 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
2921 FUTEX_REQUEUE instead of FUTEX_WAIT.
2922 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
2923 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
2924 mutex which was used in condvar structure. Call
2925 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
2926 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2928 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
2929 include tcb-offsets.h. Read wakeup value in locked region.
2930 Use the value of gbr register as THREAD_ID.
2931 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2932 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2933 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2935 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
2938 2003-05-28 Ulrich Drepper <drepper@redhat.com>
2940 * sysdeps/pthread/pthread_cond_broadcast.c
2941 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
2943 2003-05-26 Ulrich Drepper <drepper@redhat.com>
2945 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
2946 typo in register name.
2947 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
2948 correctly. Actually use requeue. Little optimization.
2949 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
2950 mutex address early. Handle cancellation state as 32-bit value.
2951 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2952 Remove unnecessary label.
2954 2003-05-25 Ulrich Drepper <drepper@redhat.com>
2956 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
2957 instead of FUTEX_WAIT.
2958 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
2959 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2960 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2961 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
2962 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2963 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
2964 used in condvar structure. Call __pthread_mutex_cond_lock instead
2965 of __pthread_mutex_lock_internal.
2966 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2967 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2968 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2969 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
2970 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2971 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2972 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
2973 Add pthread_mutex_cond_lock.
2974 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
2975 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
2976 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
2977 lll_mutex_cond_lock.
2978 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2979 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2980 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2982 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2983 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2985 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
2986 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2988 * pthreadP.h: Declare __pthread_mutex_cond_lock.
2989 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
2990 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
2991 macro don't define aliases.
2993 * cancellation.c: Remove __pthread_enable_asynccancel_2.
2994 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
2995 * sysdeps/pthread/pthread_cond_timedwait.c: Use
2996 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
2997 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2998 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2999 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
3000 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3001 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3003 2003-05-17 Ulrich Drepper <drepper@redhat.com>
3005 * sem_open.c: Fix one endless loop. Implement correct semantics
3006 wrt opening the same semaphore more then once.
3007 * sem_close.c: Adjust for sem_open change.
3008 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
3009 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
3010 * Makefile (tests): Add tst-sem7.
3011 * tst-sem7.c: New file.
3013 2003-05-16 Roland McGrath <roland@redhat.com>
3015 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
3016 uninitialized variable braino.
3018 2003-05-16 Ulrich Drepper <drepper@redhat.com>
3020 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
3021 test for syscall availability.
3023 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
3024 __no_posix_timers to -1 if the syscalls don't exist.
3026 * pthread_join.c (pthread_join): Set tid field of the joined
3027 thread to -1. This isn't necessary but helps to recognize some
3028 error conditions with almost no cost.
3030 * allocatestack.c (FREE_P): Also negative values indicate an
3033 * unwind.c: Include <unistd.h>.
3035 2003-05-14 Ulrich Drepper <drepper@redhat.com>
3037 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
3039 2003-05-14 Jakub Jelinek <jakub@redhat.com>
3041 * Makefile (crti-objs, crtn-objs): New variables.
3042 (omit-deps, extra-objs): Add crtn.
3043 ($(objpfx)libpthread.so): Depend on both crti and crtn
3044 and links to them in multidir.
3045 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
3047 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
3049 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3050 (lll_mutex_unlock): Use atomic_exchange_rel.
3052 2003-05-11 Ulrich Drepper <drepper@redhat.com>
3054 * cond-perf.c (cons): Add missing locking around setting of alldone.
3056 2003-05-10 Ulrich Drepper <drepper@redhat.com>
3058 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
3060 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
3062 2003-05-09 Ulrich Drepper <drepper@redhat.com>
3064 * tst-sem6.c: New file.
3065 * Makefile (tests): Add tst-sem6.
3067 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
3068 Use atomic_exchange_rel instead of atomic_exchange.
3069 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
3072 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
3073 code for lll_futex_wait and lll_futex_wake in static apps. Use
3074 vsyscall is possible.
3076 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
3077 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
3078 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
3079 pthread_setaffinity_np.
3080 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
3081 and pthread_setaffinity_np.
3082 * Makefile (libpthread-routines): Add pthread_getaffinity and
3083 pthread_setaffinity.
3085 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
3086 use it in case mmap to allocate the stack fails.
3087 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
3088 ARCH_MAP_FLAGS here.
3089 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
3092 2003-05-08 Ulrich Drepper <drepper@redhat.com>
3094 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
3095 handler implementation. It is now lockless in fork().
3096 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3097 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3098 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
3099 declare the __fork_*_lists.
3100 (struct fork_handler): Include pointers to all three functions.
3101 Add next, refcntr and need_signal elements.
3102 (__fork_handlers): New declaration.
3103 (__register_atfork_malloc): Remove declaration.
3104 (HAVE_register_atfork_malloc): Remove definition.
3105 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
3106 __pthread_child_handler variable.
3107 (__libc_pthread_init): Use __register_atfork instead of explicitly
3109 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
3111 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3113 * unwind.c (unwind_cleanup): Print error message and then abort. This
3114 function must never be reached.
3116 * cond-perf.c: New file.
3118 2003-05-05 Ulrich Drepper <drepper@redhat.com>
3120 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
3122 2003-05-04 Roland McGrath <roland@redhat.com>
3124 * Makefile ($(objpfx)../libc.so): New target.
3126 2003-05-02 Ulrich Drepper <drepper@redhat.com>
3128 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3129 (pthread_condattr_t): Size is only an int, don't use long for
3131 (pthread_mutexattr_t): Likewise.
3132 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3133 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3134 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3136 2003-05-01 Ulrich Drepper <drepper@redhat.com>
3138 * sysdeps/i386/tls.h: Define THREAD_ID.
3139 * sysdeps/ia64/tls.h: Likewise.
3140 * sysdeps/powerpc/tls.h: Likewise.
3141 * sysdeps/s390/tls.h: Likewise.
3142 * sysdeps/sh/tls.h: Likewise.
3143 * sysdeps/x86_64/tls.h: Likewise.
3144 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
3146 * pthread_mutex_timedlock.c: Likewise.
3147 * pthread_mutex_trylock.c: Likewise.
3148 * pthread_mutex_unlock.c: Likewise.
3149 * pthread_rwlock_trywrlock.c: Likewise.
3150 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
3151 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
3152 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
3153 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3155 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
3158 2003-04-29 Jakub Jelinek <jakub@redhat.com>
3160 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
3161 (__SIZEOF_PTHREAD_COND_T): Define to 48.
3162 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
3163 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3164 Make __align long long instead of long.
3165 (pthread_rwlock_t): Formatting.
3166 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3167 (pthread_rwlock_t): Formatting.
3168 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3169 (pthread_cond_t): Make __align long long instead of long.
3170 (pthread_rwlock_t): Move __flags field to the same position as in
3173 2003-04-30 Ulrich Drepper <drepper@redhat.com>
3175 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
3176 * tst-rwlock7.c (do_test): Likewise.
3178 2003-04-26 Roland McGrath <roland@redhat.com>
3180 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
3182 2003-04-22 Jakub Jelinek <jakub@redhat.com>
3184 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
3185 sizeof (struct pthread).
3186 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
3188 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
3190 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
3192 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
3194 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
3196 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
3198 (NO_TLS_OFFSET): Define.
3199 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
3200 add TLS_TCB_SIZE unnecessarily.
3202 2003-04-22 Roland McGrath <roland@redhat.com>
3204 * Makeconfig (shared-thread-library): Reverse link order to work
3207 2003-04-22 Ulrich Drepper <drepper@redhat.com>
3209 * semaphore.h: Fix typo in comment.
3211 2003-04-21 Ulrich Drepper <drepper@redhat.com>
3213 * sysdeps/pthread/sigfillset.c: New file.
3215 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
3216 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
3217 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
3218 * sysdeps/pthread/sigaction.c: Likewise.
3219 * sysdeps/pthread/sigprocmask.c: New file.
3220 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
3222 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3223 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
3226 2003-04-19 Ulrich Drepper <drepper@redhat.com>
3228 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
3229 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
3231 * sysdeps/unix/sysv/linux/unregister-atfork.c
3232 (__unregister_atfork): Don't free memory not allocated dynamically.
3234 * semaphore.h: Remove __THROW marker from cancellation points.
3235 * nptl/sysdeps/pthread/pthread.h: Likewise.
3237 2003-04-18 Ulrich Drepper <drepper@redhat.com>
3239 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
3240 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
3243 2003-04-16 Jakub Jelinek <jakub@redhat.com>
3245 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
3247 2003-04-15 Roland McGrath <roland@redhat.com>
3249 * forward.c (__pthread_unwind): Tweak to avoid warning.
3251 2003-04-15 Ulrich Drepper <drepper@redhat.com>
3253 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
3255 2003-04-14 Ulrich Drepper <drepper@redhat.com>
3257 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
3258 overflow CFA advance instructions.
3259 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3261 2003-04-14 Jakub Jelinek <jakub@redhat.com>
3263 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
3264 * sysdeps/i386/pthread_spin_lock.c: Likewise.
3265 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
3268 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
3269 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
3270 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
3271 DW_CFA_advance_loc for .Laddl-.Lsubl.
3273 2003-04-13 Ulrich Drepper <drepper@redhat.com>
3275 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
3276 position-independent unwind data for static libraries.
3277 Add missing unwind info. Add comments.
3279 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
3280 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3281 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3282 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3284 2003-04-12 Ulrich Drepper <drepper@redhat.com>
3286 * Makefile: Make sure all cancellation points are compiled with
3287 exception and asynchronous unwind tables.
3289 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
3290 which mishandles loading of global object addresses in PIC.
3291 (THREAD_SETMEM_NC): Likewise.
3293 2003-04-11 Ulrich Drepper <drepper@redhat.com>
3295 * pthread.h: Define new data structure for cleanup buffer. Declare
3296 new cleanup handler interfaces.
3297 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
3298 (struct pthread): Add cleanup_jmp_buf pointer. Define
3299 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
3300 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
3301 it. Declare old cleanup handler installation functions.
3302 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
3304 * cleanup_defer.c: Likewise.
3305 * cleanup_compat.c: New file. Old cleanup code.
3306 * cleanup_def_compat.c: New file. Old cleanup code.
3307 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
3308 if own thread descriptor.
3309 * unwind.c: New file.
3310 * forward.c: Add __pthread_unwind.
3311 * init.c (pthread_functions): Add __pthread_unwind.
3312 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
3313 Add ptr___pthread_unwind.
3314 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
3315 and unwind function.
3316 * Makefile (libpthread-routines): Add cleanup_compat,
3317 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
3318 table generation if necessary.
3319 * version.c: Record whether unwind support is compiled in.
3320 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
3321 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
3323 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
3324 complication to generate unwind information for syscall wrappers.
3325 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3326 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3327 __cleanup_fct_attribute.
3329 * Makefile: Add rules to build and run tst-cleanup0.
3330 * tst-cleanup0.c: New file.
3331 * tst-cleanup0.expect: New file.
3333 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
3334 caller. Optimize to avoid often unecessary local variable.
3336 2003-04-11 Roland McGrath <roland@redhat.com>
3338 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
3339 sets variable `multidir'; include that.
3340 (generated): Add it.
3341 ($(objpfx)$(multidir)/crti.o): New target.
3342 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
3344 2003-04-11 Ulrich Drepper <drepper@redhat.com>
3346 * tst-attr2.c (do_test): Add cast to avoid warning.
3347 * tst-mutex4.c (do_test): Likewise.
3349 2003-04-10 Ulrich Drepper <drepper@redhat.com>
3351 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
3354 2003-04-09 Ulrich Drepper <drepper@redhat.com>
3356 * Makefile (tests): Add tst-detach1.
3357 * tst-detach1.c: New file.
3359 2003-04-08 Ulrich Drepper <drepper@redhat.com>
3361 * sysdeps/pthread/pthread.h: Remove duplicate
3362 pthread_cleanup_{push,pop} definitions.
3364 * tst-barrier2.c: Eliminate warnings.
3365 * tst-cancel4.c: Likewise.
3366 * tst-cond4.c: Likewise.
3367 * tst-cond6.c: Likewise.
3368 * tst-detach1.c: Likewise.
3369 * tst-rwlock4.c: Likewise.
3370 * tst-rwlock6.c: Likewise.
3371 * tst-rwlock7.c: Likewise.
3372 * tst-sem3.c: Likewise.
3373 * tst-spin2.c: Likewise.
3374 * tst-umask1.c: Likewise.
3376 2003-04-07 Ulrich Drepper <drepper@redhat.com>
3378 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
3380 2003-04-06 Ulrich Drepper <drepper@redhat.com>
3382 * descr.h (struct pthread): Move cancelhandling member to the front.
3384 2003-04-05 Ulrich Drepper <drepper@redhat.com>
3386 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
3387 malloc_parent, and malloc_child statically.
3388 (__register_atfork_malloc): New function.
3389 (free_mem): Don't free any of the malloc_* variables on the list.
3390 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
3391 Define HAVE_register_atfork_malloc.
3393 2003-04-04 Ulrich Drepper <drepper@redhat.com>
3395 * sysdeps/pthread/createthread.c (create_thread): Add some more
3396 comments explaining when to set multiple_threads and when not.
3398 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
3399 THREAD_ATOMIC_BIT_SET if not already defined.
3400 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
3401 THREAD_ATOMIC_BIT_SET:
3402 * sysdeps/x86_64/tls.h: Likewise.
3403 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
3404 THREAD_ATOMIC_CMPXCHG_VAL.
3405 (_pthread_cleanup_pop_restore): Likewise.
3406 * cancellation.c (__pthread_enable_asynccancel): Likewise.
3407 (__pthread_enable_asynccancel_2): Likewise.
3408 (__pthread_disable_asynccancel): Likewise.
3409 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
3410 (__libc_disable_asynccancel): Likewise.
3411 * init.c (sigcancel_handler): Likewise.
3412 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
3413 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
3415 2003-04-03 Ulrich Drepper <drepper@redhat.com>
3417 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
3418 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
3419 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
3420 * Makefile (tests): Add tst-cancel11.
3421 * tst-cancel11.c: New file.
3423 2003-04-01 Ulrich Drepper <drepper@redhat.com>
3425 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
3426 round, not the first. Use specific_used flag instead of local
3427 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
3428 (__free_tcb): Don't call deallocate_tsd here.
3429 (start_thread): Call deallocate_tsd here.
3430 * pthread_setspecific.c: Set specific_used flag really only when
3432 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
3433 * tst-tsd3.c: New file.
3434 * tst-tsd4.c: New file.
3436 2003-03-31 Ulrich Drepper <drepper@redhat.com>
3438 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
3439 Use atomic_exchange_and_add instead of __lll_add.
3440 (__lll_mutex_timedlock): Likewise.
3441 Patch by Ian Wienand.
3443 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
3445 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3446 (SINGLE_THREAD_P): Fix typo.
3447 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
3449 2003-03-31 Ulrich Drepper <drepper@redhat.com>
3451 * Makefile (tests): Add tst-align.
3452 * tst-align.c: New file.
3453 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
3455 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
3458 * tst-tsd2.c: Add casts to avoid warnings.
3460 2003-03-30 Ulrich Drepper <drepper@redhat.com>
3462 * descr.h (struct pthread): Move most often used elements to the front.
3464 2003-03-29 Ulrich Drepper <drepper@redhat.com>
3466 * Makefile (libpthread-routines): Add pthread_atfork.
3467 (libpthread-static-only-routines): Add pthread_atfork.
3469 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3471 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
3473 (INSTALL_DTV): Add parens.
3474 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
3475 Use passed descr instead of THREAD_SELF.
3476 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
3477 (__lll_mutex_timedlock_wait): Correct expected value after
3479 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
3480 Release lock before waking up the waiters.
3481 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
3482 criteria. Reorderstruct passed to cleanup handler. Fix
3483 handling of cancellation and failung pthread_mutex_unlock call.
3484 Use __pthread_enable_asynccancel_2 instead of
3485 __pthread_enable_asynccancel.
3486 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3487 Return result of lock re-get if it fails.
3488 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
3489 for __pthread_cleanup_push.
3490 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
3491 completely broken rwlock implementation.
3492 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3493 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3494 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3495 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3496 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3497 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
3498 versioned_symbol macro.
3499 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
3500 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
3502 2003-03-27 Ulrich Drepper <drepper@redhat.com>
3504 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
3505 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
3507 (struct timer): Remove th and bar field.
3508 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
3509 debugging code. Create only one helper thread.
3510 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
3512 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3513 Renamed. Define statically. Use thread info from siginfo.
3514 (__helper_once): New variable.
3515 (__helper_tid): New variable.
3516 (__reset_helper_control): New function.
3517 (__start_helper_thread): New function.
3519 * pthread_create.c (start_thread): Don't use setjmp inside
3520 __builtin_expect to work around gcc bug.
3522 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
3523 timer_delete syscall fails, but not with ENOSYS, set
3526 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
3527 (timer_settime): Fix typo.
3528 * sysdeps/unix/sysv/linux/timer_getoverr.c
3529 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
3531 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3533 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
3534 offset of cleanupbuf.__prev.
3536 2003-03-26 Jakub Jelinek <jakub@redhat.com>
3538 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
3541 2003-03-26 Ulrich Drepper <drepper@redhat.com>
3543 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
3544 NULL provide default definition to syscall.
3546 2003-03-25 Roland McGrath <roland@redhat.com>
3548 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
3549 (timer_id2ptr): Fix typo.
3551 2003-03-25 Ulrich Drepper <drepper@redhat.com>
3553 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
3554 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
3555 * sysdeps/ia64/pthreaddef.h: Likewise.
3556 * sysdeps/powerpc/pthreaddef.h: Likewise.
3557 * sysdeps/s390/pthreaddef.h: Likewise.
3558 * sysdeps/sh/pthreaddef.h: Likewise.
3559 * sysdeps/x86_64/pthreaddef.h: Likewise.
3560 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
3561 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
3563 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3564 SIGTIMER is not unblocked.
3565 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
3567 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
3569 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
3570 pass pointer through as ID.
3571 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
3572 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
3573 * sysdeps/unix/sysv/linux/timer_create.c: New file.
3574 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
3575 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
3576 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
3577 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
3578 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
3579 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
3580 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
3581 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
3582 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
3583 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
3584 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
3585 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
3586 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
3587 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
3588 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
3589 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
3590 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
3591 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
3592 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
3593 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
3594 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
3595 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
3596 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
3597 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
3598 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
3599 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
3600 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
3601 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
3602 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
3603 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
3605 * pthreadP.h: Remove FRAME_LEFT definition.
3606 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
3607 already left frame. Programs which have this problem are not POSIX
3609 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
3611 2003-03-24 Ulrich Drepper <drepper@redhat.com>
3613 * sysdeps/pthread/tst-timer.c: Check return values of the
3616 2003-03-23 Roland McGrath <roland@redhat.com>
3618 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
3619 * tst-tls3mod.c: Likewise.
3620 * tst-tls1.c: Likewise.
3621 * tst-tls2.c: Likewise.
3623 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
3626 * tst-join5.c (tf1, tf2): Add a cast.
3628 * Makeconfig (includes): Append -I$(..)nptl to this variable.
3630 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
3631 Don't test anything.
3632 * tst-cond4.c: Likewise.
3633 * tst-cond6.c: Likewise.
3634 * tst-flock2.c: Likewise.
3635 * tst-mutex4.c: Likewise.
3636 * tst-rwlock4.c: Likewise.
3637 * tst-signal1.c: Likewise.
3638 * tst-spin2.c: Likewise.
3639 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
3641 * tst-mutex4.c: Use test-skeleton.c.
3642 * tst-spin2.c: Likewise.
3643 * tst-sysconf.c: Likewise.
3644 * tst-barrier2.c: Likewise.
3645 * tst-cond4.c: Likewise.
3646 * tst-cond6.c: Likewise.
3647 * tst-rwlock4.c: Likewise.
3648 * tst-unload.c: Likewise.
3649 * tst-flock2.c (do_test): Use return instead of exit.
3651 2003-03-22 Jakub Jelinek <jakub@redhat.com>
3653 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
3655 2003-03-21 Ulrich Drepper <drepper@redhat.com>
3657 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
3658 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
3659 instead of __lll_compare_and_swap.
3660 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3662 Removed definition if __lll_compare_and_swap.
3664 * cancellation.c: Adjust for new form of compare&exchange macros.
3665 * cleanup_defer.c: Likewise.
3667 * libc-cancellation.c: Likewise.
3668 * old_pthread_cond_broadcast.c: Likewise.
3669 * old_pthread_cond_signal.c: Likewise.
3670 * old_pthread_cond_timedwait.c: Likewise.
3671 * old_pthread_cond_wait.c: Likewise.
3672 * pthread_cancel.c: Likewise.
3673 * pthread_create.c: Likewise.
3674 * pthread_detach.c: Likewise.
3675 * pthread_join.c: Likewise.
3676 * pthread_key_delete.c: Likewise.
3677 * pthread_setcancelstate.c: Likewise.
3678 * pthread_setcanceltype.c: Likewise.
3679 * pthread_timedjoin.c: Likewise.
3680 * pthread_tryjoin.c: Likewise.
3681 * sysdeps/pthread/createthread.c: Likewise.
3683 2003-03-20 Ulrich Drepper <drepper@redhat.com>
3685 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
3686 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
3687 definitions. Replace uses with calls to atomic_* functions.
3688 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3689 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
3690 __lll_test_and_set calls with atomic_exchange_and_add and
3691 atomic_exchange calls respectively.
3692 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3693 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3694 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
3695 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3696 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
3697 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
3698 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
3700 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
3701 returns the old value.
3703 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
3705 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
3706 int for variable OLDVAL and correct inline assembler contraint.
3707 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
3708 type int for variable OLD.
3710 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
3712 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3713 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
3714 instead of multiple_threads field in the TCB.
3716 2003-03-19 Ulrich Drepper <drepper@redhat.com>
3718 * sysdeps/i386/i686/bits/atomic.h: Removed.
3719 * sysdeps/i386/i586/bits/atomic.h: Removed.
3720 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
3721 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
3722 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
3723 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
3724 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
3725 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
3726 * atomic.h: Removed. Moved to glibc.
3728 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
3729 support for clock selection.
3731 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
3734 2003-03-18 Roland McGrath <roland@redhat.com>
3736 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
3737 Add __lll_rel_instr first. Add memory clobber.
3738 (lll_mutex_unlock): Use __lll_test_and_set.
3739 From Paul Mackerras <paulus@samba.org>.
3741 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
3743 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3744 (SINGLE_THREAD_P): Add `header.' prefix.
3745 From Paul Mackerras <paulus@samba.org>.
3747 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
3748 pthread_timedjoin_np to ...
3749 (libpthread: GLIBC_2.3.3): ... here.
3750 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
3752 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3753 Avoid shadowing VAL variable.
3755 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
3758 2003-03-18 Ulrich Drepper <drepper@redhat.com>
3760 * Makefile (tests): Add tst-cond11.
3761 * tst-cond11.c: New file.
3763 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
3764 struct passed to cleanup handler to eliminate one more
3766 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3768 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
3769 (pthrad_cond_t): Replace __unused field with __clock.
3771 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
3772 waken all waiters in cleanup handler.
3773 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3774 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3776 * pthread_condattr_getclock.c: New file.
3777 * pthread_condattr_setclock.c: New file.
3778 * sysdeps/pthread/pthread.h: Declare these new functions.
3779 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
3780 * Makefile (libpthread-routines): Add the new functions.
3781 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
3782 Renamed field to value. Document use of the bits.
3783 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
3785 * pthread_condattr_setpshared.c: Likewise.
3786 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
3787 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
3788 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3790 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3791 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3792 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3793 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3794 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3795 Implement clock selection.
3796 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
3797 * pthread-errnos.sym: Add ENOSYS.
3798 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3799 _POSIX_CLOCK_SELECTION.
3800 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3802 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
3803 invalid .size directive.
3805 2003-03-17 Roland McGrath <roland@redhat.com>
3807 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
3810 2003-03-17 Ulrich Drepper <drepper@redhat.com>
3812 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
3813 Use __lll_add instead of spelling it out. Use protected symbol names.
3814 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
3816 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
3817 Renamed from lll_compare_and_swap. Use new name where necessary.
3818 (__lll_add): Defined.
3819 (__lll_dec_if_positive): Defined.
3820 (__lll_test_and_set): Defined.
3821 * sysdeps/ia64/pthread_spin_init.c: Removed.
3822 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
3823 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
3824 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
3825 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
3826 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
3827 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
3828 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
3829 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
3830 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3831 __sync_lock_release_si.
3832 Patch by Jakub Jelinek.
3834 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
3835 Fix timeout handling.
3836 (__lll_timedwait_tid): Likewise.
3837 (lll_unlock_wake_cb): Wake up other waiters if necessary.
3838 Patch by Jakub Jelinek.
3840 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
3842 2003-03-17 Roland McGrath <roland@redhat.com>
3844 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
3845 * sysdeps/pthread/pthread_spin_init.c: New file.
3846 * sysdeps/pthread/pthread_spin_unlock.c: New file.
3847 * sysdeps/powerpc/Makefile: New file.
3848 * sysdeps/powerpc/pthread_spin_lock.c: New file.
3849 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
3850 * sysdeps/powerpc/pthreaddef.h: New file.
3851 * sysdeps/powerpc/tcb-offsets.sym: New file.
3852 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
3853 * sysdeps/powerpc/tls.h: New file.
3854 * sysdeps/powerpc/bits/atomic.h: New file.
3855 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
3856 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
3857 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
3859 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
3860 * sysdeps/unix/sysv/linux/sem_post.c: New file.
3861 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
3862 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
3863 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
3864 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
3865 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
3866 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
3867 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
3868 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
3869 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
3870 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
3871 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
3872 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
3873 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
3875 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
3877 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
3878 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
3879 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
3880 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
3881 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
3883 2003-03-17 Ulrich Drepper <drepper@redhat.com>
3885 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
3886 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
3887 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3888 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3889 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
3891 2003-03-16 Roland McGrath <roland@redhat.com>
3893 * tst-fork4.c: Include <string.h>.
3894 * tst-signal2.c: Likewise.
3895 * tst-mutex5.c (do_test): exit -> return.
3896 * tst-mutex2.c: Include <stdlib.h>.
3898 2003-03-16 Ulrich Drepper <drepper@redhat.com>
3900 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
3901 (__lll_mutex_timedlock_wait): Correct expected value after
3902 spurious wakeup. Otherwise we would never wait again.
3904 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
3905 zone versus inline asm stupidity. Use correct instructions.
3907 * tst-rwlock6.c: Add some more status output.
3909 2003-03-15 Roland McGrath <roland@redhat.com>
3911 * sysdeps/pthread/configure.in: New file.
3912 * sysdeps/pthread/configure: New file (generated).
3914 2003-03-15 Ulrich Drepper <drepper@redhat.com>
3916 * allocatestack.c (allocate_stack): Store the exact stack size of
3917 user allocated stacks.
3919 2003-03-15 Jakub Jelinek <jakub@redhat.com>
3921 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3922 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
3923 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
3924 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
3925 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3926 Use `header.' prefix.
3927 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
3929 2003-03-15 Ulrich Drepper <drepper@redhat.com>
3931 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
3932 __builtin_frame_address, use stack pointer.
3934 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
3935 instead of __builtin_frame_pointer.
3937 2003-03-14 Ulrich Drepper <drepper@redhat.com>
3939 * tst-basic1.c (do_test): Add cast to avoid warning.
3940 * tst-basic2.c (do_test): Likewise.
3942 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
3943 amount of stack correction.
3945 * tst-fork4.c: Use test-skeleton.c.
3947 2003-03-14 Roland McGrath <roland@redhat.com>
3949 * init.c: Fix typo "#eli" for "#else".
3951 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
3953 * allocatestack.c (__stack_user): Use hidden_data_def.
3954 * pthread_create.c (__pthread_keys): Likewise.
3956 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
3958 2003-03-14 Roland McGrath <roland@redhat.com>
3960 * tst-fork4.c: New file.
3961 * Makefile (tests): Add it.
3963 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
3964 we always define the padding space.
3965 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
3966 stopped supporting its own extensions fully.
3967 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
3968 struct also called `header', so `header.multiple_threads' is the field
3969 name to use on all machines.
3970 * allocatestack.c (allocate_stack): Use `header.' prefix.
3971 * sysdeps/pthread/createthread.c (create_thread): Likewise.
3972 * pthread_create.c (__pthread_create_2_1): Likewise.
3973 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
3974 (THREAD_SELF): Likewise.
3975 * sysdeps/x86_64/tls.h: Likewise.
3976 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
3977 (SINGLE_THREAD_P): Likewise.
3978 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
3979 (SINGLE_THREAD_P): Likewise.
3980 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3981 (SINGLE_THREAD_P): Likewise.
3983 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
3986 2003-03-14 Ulrich Drepper <drepper@redhat.com>
3988 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
3989 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
3991 * pthread_create.c (start_thread): setjmp is expected to return 0.
3993 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
3994 (THREAD_GETMEM_NC): Likewise.
3996 2003-03-13 Ulrich Drepper <drepper@redhat.com>
3998 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
3999 and the size of the stack which must be allocated is a multiple,
4000 allocate one more page.
4001 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
4002 MULTI_PAGE_ALIASING.
4004 2003-03-13 Roland McGrath <roland@redhat.com>
4006 * pthread_create.c (start_thread): Set EXITING_BIT after the
4007 event-reporting (and destructors), not before.
4009 2003-03-13 Jakub Jelinek <jakub@redhat.com>
4011 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
4012 lll_futex_wake): Declare register variables as long int instead of
4013 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
4014 Make syscall arguments clobbered by the syscall.
4015 (lll_futex_wait): Define using lll_futex_timed_wait.
4017 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
4020 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
4023 * allocatestack.c (nptl_ncreated): Only declare if
4024 COLORING_INCREMENT != 0.
4026 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
4027 (__libc_enable_asynccancel_2): Remove prototype.
4029 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
4030 ctid to match kernel.
4032 2003-03-12 Ulrich Drepper <drepper@redhat.com>
4034 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
4035 libc_multiple_threads.
4036 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
4037 __libc_multiple_threads to...
4038 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
4040 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
4042 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4043 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4045 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
4046 (__pthread_once_internal): Define.
4048 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
4049 macros instead of .symver directly.
4050 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4051 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4053 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
4054 * sysdeps/x86_64/tcb-offsets.sym: New file.
4055 * sysdeps/x86_64/Makefile: New file.
4057 * sysdeps/i386/tcb-offsets.sym: Add SELF.
4058 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
4059 to access own pthread_t in TCB.