1 2004-09-02 Ulrich Drepper <drepper@redhat.com>
3 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4 * sysdeps/i386/jmpbuf-unwind.h: Likewise
5 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
7 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
8 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
9 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
10 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
13 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
14 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
15 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
17 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
18 Decrement __nwaiters. If pthread_cond_destroy has been called and
19 this is the last waiter, signal pthread_cond_destroy caller and
20 avoid using the pthread_cond_t structure after unlock.
21 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
22 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
23 Read clock type from the least significant bits of __nwaiters instead
25 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
26 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
28 2004-08-31 Jakub Jelinek <jakub@redhat.com>
31 * Makefile (tests): Add tst-cond20 and tst-cond21.
32 * tst-cond20.c: New test.
33 * tst-cond21.c: New test.
34 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
35 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
37 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
39 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
40 (pthread_cond_t): Likewise.
41 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
43 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
45 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
47 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
50 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
51 if there are waiters not signalled yet.
52 Wait until all already signalled waiters wake up.
53 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
54 __nwaiters. If pthread_cond_destroy has been called and this is the
55 last waiter, signal pthread_cond_destroy caller and avoid using
56 the pthread_cond_t structure after unlock.
57 (__pthread_cond_wait): Increment __nwaiters in the beginning,
58 decrement it when leaving. If pthread_cond_destroy has been called
59 and this is the last waiter, signal pthread_cond_destroy caller.
60 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
61 Likewise. Read clock type from the least significant bits of
62 __nwaiters instead of __clock.
63 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
64 whether clock ID can be encoded in COND_CLOCK_BITS bits.
65 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
66 clock type just from the last COND_CLOCK_BITS bits of value.
67 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
68 instead of __clock, just from second bit of condattr's value.
70 2004-08-30 Jakub Jelinek <jakub@redhat.com>
72 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
73 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
75 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
77 2004-08-15 Roland McGrath <roland@frob.com>
79 * pthread_atfork.c: Update copyright terms including special exception
80 for these trivial files, which are statically linked into executables
81 that use dynamic linking for the significant library code.
83 2004-08-09 Jakub Jelinek <jakub@redhat.com>
85 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
86 pthread_rwlock_rdlock.
87 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
88 Decrease __nr_readers_queued after reacquiring lock.
89 * sysdeps/pthread/pthread_rwlock_timedrdlock
90 (pthread_rwlock_timedrdlock): Likewise.
91 Reported by Bob Cook <bobcook47@hotmail.com>.
93 2004-08-11 Jakub Jelinek <jakub@redhat.com>
95 * tst-rwlock14.c (tf): Read main thread handle from *ARG
96 before pthread_barrier_wait.
98 2004-08-07 Ulrich Drepper <drepper@redhat.com>
100 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
101 Remove unnecessary exception handling data.
103 2004-07-23 Jakub Jelinek <jakub@redhat.com>
106 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
107 instead of clockid_t.
109 2004-07-21 Roland McGrath <roland@redhat.com>
111 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
113 2004-07-19 Roland McGrath <roland@redhat.com>
115 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
117 2004-07-02 Roland McGrath <roland@redhat.com>
119 * configure: Don't exit.
121 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
123 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
124 (__pthread_cond_timedwait): Check for invalid nanosecond in
127 2004-07-07 Ulrich Drepper <drepper@redhat.com>
129 * Makefile: Add rules to build and run tst-fini1.
130 * tst-fini1.c: New file.
131 * tst-fini1mod.c: New file.
133 2004-07-05 Ulrich Drepper <drepper@redhat.com>
135 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
136 if no cancellation support is needed.
137 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
138 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
139 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
140 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
141 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
142 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
143 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
144 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
145 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
147 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
148 only if not already defined.
150 2004-07-05 Jakub Jelinek <jakub@redhat.com>
152 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
153 constraint "m" instead of "0" for futex.
155 * shlib-versions: Add powerpc64-.*-linux.*.
157 2004-07-04 Jakub Jelinek <jakub@redhat.com>
159 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
160 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
162 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
163 1 billion and 64-bit tv_nsec which is valid when truncated to 32
166 2004-06-29 Roland McGrath <roland@redhat.com>
168 * Banner: NPTL no longer has its own version number.
169 * Makefile (nptl-version): Variable removed.
170 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
171 using $(version), the glibc version number.
173 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
175 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
176 Fix branch offset for a PLT entry.
177 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
179 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
181 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
183 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
186 2004-06-28 Jakub Jelinek <jakub@redhat.com>
188 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
191 2004-06-28 Jakub Jelinek <jakub@redhat.com>
193 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
194 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
196 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
197 (pthread_rwlock_timedrdlock): Likewise.
199 2004-06-22 Jakub Jelinek <jakub@redhat.com>
201 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
202 Set __r7 to val, not mutex.
204 2004-06-27 Ulrich Drepper <drepper@redhat.com>
206 * Makefile: Add rules to build tst-rwlock14.
207 * tst-rwlock14.c: New file.
209 2004-06-24 Boris Hu <boris.hu@intel.com>
211 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
213 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
215 2004-06-19 Andreas Jaeger <aj@suse.de>
217 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
218 assembler in last patch.
220 2004-06-17 Ulrich Drepper <drepper@redhat.com>
222 * sysdeps/pthread/pthread_cond_timedwait.c
223 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
224 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
225 (__pthread_cond_timedwait): Check for invalid nanosecond in
227 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
228 * tst-cond19.c: New file.
229 * Makefile: Add rules to build and run tst-cond19.
231 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
233 * tst-context1.c (GUARD_PATTERN): Defined.
234 (tst_context_t): Define struct containing ucontext_t & guard words.
235 (ctx): Declare as an array of tst_context_t.
236 (fct): Verify uc_link & guard words are still valid.
237 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
239 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
241 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
242 Add __data.__futex field, reshuffle __data.__clock.
243 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
244 (__pthread_cond_signal): Increment __futex at the same time as
245 __wakeup_seq or __total_seq. Pass address of __futex instead of
246 address of low 32-bits of __wakeup_seq to futex syscall.
247 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
248 (__pthread_cond_wait): Likewise. Pass __futex value from before
249 releasing internal lock to FUTEX_WAIT.
250 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
251 (__pthread_cond_timedwait): Likewise.
252 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
253 (FUTEX_CMP_REQUEUE): Define.
254 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
255 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
256 Pass __futex value from before the unlock and __futex address instead
257 of address of low 32-bits of __wakeup_seq to futex syscall.
258 Fallback to FUTEX_WAKE all on any errors.
260 2004-06-08 Jakub Jelinek <jakub@redhat.com>
262 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
264 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
265 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
266 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
267 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
268 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
270 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
272 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
273 Add memory clobber to inline assembly.
274 (__lll_mutex_trylock): Likewise.
275 (__lll_mutex_cond_trylock): Likewise.
277 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
279 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
280 Pass val argument as 6th system call argument in %r7.
282 2004-05-21 Jakub Jelinek <jakub@redhat.com>
284 * Makefile (tests): Add tst-cond16.
285 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
286 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
287 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
288 Add __data.__futex field, reshuffle __data.__clock.
289 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
290 (__pthread_cond_signal): Increment __futex at the same time as
291 __wakeup_seq or __total_seq. Pass address of __futex instead of
292 address of low 32-bits of __wakeup_seq to futex syscall.
293 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
294 (__pthread_cond_wait): Likewise. Pass __futex value from before
295 releasing internal lock to FUTEX_WAIT.
296 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
297 (__pthread_cond_timedwait): Likewise.
298 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
299 (FUTEX_CMP_REQUEUE): Define.
300 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
301 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
302 Pass __futex value from before the unlock and __futex address instead
303 of address of low 32-bits of __wakeup_seq to futex syscall.
304 Fallback to FUTEX_WAKE all on any errors.
305 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
307 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
308 internally. Return non-zero if error, zero if success.
309 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
310 Add __data.__futex field, reshuffle __data.__clock.
311 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
313 (lll_futex_requeue): Add val argument, return 1 unconditionally
315 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
316 Add __data.__futex field, reshuffle __data.__clock.
317 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
319 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
320 internally. Return non-zero if error, zero if success.
321 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
322 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
323 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
325 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
326 internally. Return non-zero if error, zero if success.
327 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
328 Add __data.__futex field, reshuffle __data.__clock.
329 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
331 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
332 internally. Return non-zero if error, zero if success.
333 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
334 Add __data.__futex field, reshuffle __data.__clock.
335 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
336 Add __data.__futex field, reshuffle __data.__clock.
337 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
338 Increment __futex at the same time as __wakeup_seq or __total_seq.
339 Pass address of __futex instead of address of low 32-bits of
340 __wakeup_seq to futex syscall.
341 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
342 Pass __futex value from before releasing internal lock
344 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
345 Likewise. Avoid unnecessary shadowing of variables.
346 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
347 Set __futex to 2 * __total_seq. Pass __futex value from before the
348 unlock and __futex address instead of address of low 32-bits of
349 __wakeup_seq to futex_requeue macro, adjust for new return value
351 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
352 (__pthread_cond_signal): Increment __futex at the same time as
353 __wakeup_seq or __total_seq. Pass address of __futex instead of
354 address of low 32-bits of __wakeup_seq to futex syscall.
355 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
356 (__pthread_cond_wait): Likewise. Pass __futex value from before
357 releasing internal lock to FUTEX_WAIT.
358 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
359 (__pthread_cond_timedwait): Likewise.
360 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
361 (FUTEX_CMP_REQUEUE): Define.
362 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
363 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
364 Pass __futex value from before the unlock and __futex address instead
365 of address of low 32-bits of __wakeup_seq to futex syscall.
366 Fallback to FUTEX_WAKE all on any errors.
368 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
370 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
371 Add nop to align the end of critical section.
372 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
374 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
376 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
377 Add __broadcast_seq field.
378 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
379 all waiters as woken with woken_seq and bump broadcast counter.
380 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
381 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
382 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
383 Comment typo fixes. Avoid returning -ETIMEDOUT.
385 2004-06-01 Ulrich Drepper <drepper@redhat.com>
387 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
388 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
389 Reported by Kaz Kojima.
391 2004-05-25 Jakub Jelinek <jakub@redhat.com>
393 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
395 2004-05-21 Jakub Jelinek <jakub@redhat.com>
397 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
398 __broadcast_seq with bc_seq after acquiring internal lock instead of
401 2004-05-18 Jakub Jelinek <jakub@redhat.com>
403 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
405 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
406 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
407 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
408 (pthread_cond_t): Add __data.__broadcast_seq field.
409 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
410 (FRAME_SIZE): Define.
411 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
413 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
415 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
417 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
418 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
421 2004-05-18 Ulrich Drepper <drepper@redhat.com>
423 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
424 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
425 Add __broadcast_seq field.
426 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
427 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
428 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
429 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
430 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
431 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
432 all waiters as woken with woken_seq and bump broadcast counter.
433 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
434 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
435 __broadcast_seq field.
436 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
437 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
438 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
439 * pthread_cond_init.c: Initialize __broadcast_seq field.
440 * Makefile (tests): Add tst-cond17 and tst-cond18.
441 Add .NOTPARALLEL goal.
442 * tst-cond16.c: New file. From Jakub.
443 * tst-cond17.c: New file. From Jakub.
444 * tst-cond18.c: New file. From Jakub.
446 2004-05-16 Ulrich Drepper <drepper@redhat.com>
448 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
451 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
452 Parametrize frame size. Correct some unwind info.
453 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
455 2004-05-04 Jakub Jelinek <jakub@redhat.com>
457 * tst-stack3.c: Note testing functionality beyond POSIX.
459 2004-05-04 Jakub Jelinek <jakub@redhat.com>
461 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
462 Change conditional from ifdef to if.
464 2004-04-23 Jakub Jelinek <jakub@redhat.com>
466 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
467 SYSDEP_CANCEL_ERROR): Define.
470 2004-05-01 Jakub Jelinek <jakub@redhat.com>
472 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
474 2004-04-20 Jakub Jelinek <jakub@redhat.com>
476 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
478 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
480 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
481 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
482 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
483 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
485 2004-04-19 Ulrich Drepper <drepper@redhat.com>
487 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
488 thread has all signals blocked.
490 2004-04-18 Andreas Jaeger <aj@suse.de>
492 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
493 (SEM_VALUE_MAX): Add missing brace.
495 2004-04-17 Jakub Jelinek <jakub@redhat.com>
497 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
499 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
500 * sysdeps/pthread/tst-mqueue8x.c: New test.
501 * tst-cancel4.c: Update comment about message queues.
503 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
504 return it_value { 0, 0 }.
505 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
507 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
508 assertion for SIGEV_NONE.
509 (thread_attr_compare): Compare all attributes, not just a partial
512 2004-04-17 Jakub Jelinek <jakub@redhat.com>
514 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
516 2004-04-17 Ulrich Drepper <drepper@redhat.com>
518 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
519 Just use a plain number.
520 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
521 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
522 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
523 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
524 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
525 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
526 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
528 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
530 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
532 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
534 2004-04-15 Jakub Jelinek <jakub@redhat.com>
536 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
537 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
538 of calling sigwaitinfo.
540 2004-04-16 Ulrich Drepper <drepper@redhat.com>
542 * allocatestack.c (allocate_stack): Set reported_guardsize
544 * pthread_getattr_np.c (pthread_getattr_np): Use
545 reported_guardsize instead of guardsize.
546 * descr.h (struct pthread): Add reported_guardsize field.
548 2004-04-13 Jakub Jelinek <jakub@redhat.com>
550 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
552 2004-04-12 Ulrich Drepper <drepper@redhat.com>
554 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
556 2004-04-08 Jakub Jelinek <jakub@redhat.com>
558 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
559 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
560 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
561 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
562 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
564 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
565 (_POSIX_MESSAGE_PASSING): Define.
566 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
567 (_POSIX_MESSAGE_PASSING): Define.
568 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
569 (_POSIX_MESSAGE_PASSING): Define.
571 2004-04-04 Ulrich Drepper <drepper@redhat.com>
573 * tst-context1.c (fct): Check whether correct stack is used.
575 2004-04-03 Ulrich Drepper <drepper@redhat.com>
577 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
578 matching constraints for asm mem parameters.
580 * tst-clock2.c (tf): Don't define unless needed.
582 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
584 * Makefile (link-libc-static): Use $(static-gnulib) instead of
587 2004-03-30 Ulrich Drepper <drepper@redhat.com>
589 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
590 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
591 * pthreadP.h: Declare __nptl_deallocate_tsd.
592 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
595 * Makefile (tests): Add tst-tsd5.
596 * tst-tsd5.c: New file.
598 2004-03-29 Ulrich Drepper <drepper@redhat.com>
600 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
601 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
602 is SHLIB_COMPAT check.
603 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
604 (__pthread_attr_getaffinity_old): Likewise.
605 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
606 (__pthread_getaffinity_old): Likewise.
607 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
608 (__pthread_setaffinity_old): Likewise.
610 2004-03-26 Ulrich Drepper <drepper@redhat.com>
612 * allocatestack.c (_make_stacks_executable): Call
613 _dl_make_stack_executable first.
615 2004-03-24 Roland McGrath <roland@redhat.com>
617 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
618 constraint instead of "0".
620 2004-03-24 Ulrich Drepper <drepper@redhat.com>
622 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
623 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
625 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
626 code to avoid warning.
628 2004-03-24 Andreas Jaeger <aj@suse.de>
630 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
631 (__pthread_attr_setaffinity_old): Remove const.
633 2004-03-23 Ulrich Drepper <drepper@redhat.com>
635 * sysdeps/unix/sysv/linux/smp.h: New file.
636 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
637 * init.c: Define __is_smp.
638 (__pthread_initialize_minimal_internal): Call is_smp_system to
640 * pthreadP.h: Declare __is_smp.
641 Define MAX_ADAPTIVE_COUNT is necessary.
642 * pthread_mutex_init.c: Add comment regarding __spins field.
643 * pthread_mutex_lock.c: Implement adaptive mutex type.
644 * pthread_mutex_timedlock.c: Likewise.
645 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
646 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
648 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
649 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
650 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
651 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
652 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
653 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
654 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
655 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
656 lll_mutex_cond_trylock.
657 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
658 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
659 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
660 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
661 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
662 Define BUSY_WAIT_NOP.
663 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
664 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
666 * tst-mutex5.c: Add support for testing adaptive mutexes.
667 * tst-mutex7.c: Likewise.
668 * tst-mutex5a.c: New file.
669 * tst-mutex7a.c: New file.
670 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
672 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
673 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
674 vgettimeofday call might destroy the content.
676 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
679 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
680 No need to restrict type of ret. Make it int. Add comment.
682 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
683 Remove unnecessary setne instruction.
685 2004-03-22 Jakub Jelinek <jakub@redhat.com>
687 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
688 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
689 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
690 If realloc fails, break out of the loop.
692 2004-03-20 Andreas Jaeger <aj@suse.de>
694 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
695 (__pthread_setaffinity_old): Fix interface.
696 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
697 (__pthread_getaffinity_old): Likewise.
699 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
700 (__pthread_setaffinity_new): Remove duplicate declaration.
702 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
704 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
705 the return value to a safe register.
706 (CDISABLE): Set the function argument correctly.
708 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
710 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
711 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
712 Rewrite so that only one locked memory operation per round is needed.
713 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
714 (pthread_barrier_wait): After wakeup, release lock only when the
715 last thread stopped using the barrier object.
716 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
717 (__pthread_cond_wait): Don't store mutex address if the current
718 value is ~0l. Add correct cleanup support and unwind info.
719 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
720 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
721 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
722 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
723 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
724 Add correct cleanup support and unwind info.
725 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
726 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
727 information for syscall wrappers.
729 2004-03-18 Ulrich Drepper <drepper@redhat.com>
731 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
732 cpusetsize field, remove next.
733 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
734 parameter for size of the CPU set.
735 (pthread_setaffinity_np): Likewise.
736 (pthread_attr_getaffinity_np): Likewise.
737 (pthread_attr_setaffinity_np): Likewise.
738 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
739 interface change, keep compatibility code.
740 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
741 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
742 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
743 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
744 __pthread_getaffinity_np.
745 * Versions: Add version for changed interfaces.
746 * tst-attr3.c: Adjust test for interface change.
747 * pthread_getattr_np.c: Query the kernel about the affinity mask with
748 increasing buffer sizes.
749 * pthread_attr_destroy.c: Remove unused list handling.
750 * pthread_attr_init.c: Likewise.
752 2004-03-17 Roland McGrath <roland@redhat.com>
754 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
755 first argument to clock_getres so we ever enable kernel timers.
757 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
759 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
761 2004-03-12 Richard Henderson <rth@redhat.com>
763 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
764 oldvalue from CENABLE to CDISABLE.
766 2004-03-12 Ulrich Drepper <drepper@redhat.com>
768 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
769 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
770 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
771 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
773 2004-03-11 Richard Henderson <rth@redhat.com>
775 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
776 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
777 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
779 2004-03-11 Jakub Jelinek <jakub@redhat.com>
781 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
782 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
783 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
785 2004-03-11 Jakub Jelinek <jakub@redhat.com>
787 * forward.c (__pthread_cond_broadcast_2_0,
788 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
789 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
790 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
792 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
794 * sysdeps/sh/tcb-offsets.sym: Add PID.
795 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
796 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
798 2004-03-10 Ulrich Drepper <drepper@redhat.com>
800 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
801 include <sysdep-cancel.h>, vfork is no cancellation point.
802 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
803 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
804 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
806 2004-03-10 Jakub Jelinek <jakub@redhat.com>
808 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
810 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
811 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
813 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
815 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
816 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
817 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
818 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
819 of DO_CALL_VIA_BREAK. Work around a gas problem.
821 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
822 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
823 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
824 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
825 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
826 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
828 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
829 a local register for saving old PID. Negate PID in parent upon exit.
831 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
833 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
834 before syscall, set to the old value in the parent afterwards.
835 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
836 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
838 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
839 before syscall, set to the old value in the parent afterwards.
840 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
841 * sysdeps/s390/tcb-offsets.sym: Add PID.
843 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
844 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
845 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
846 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
847 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
848 * sysdeps/sparc/tcb-offsets.sym: Add PID.
850 2004-03-10 Andreas Schwab <schwab@suse.de>
852 * sysdeps/ia64/tcb-offsets.sym: Add PID.
853 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
854 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
856 2004-03-09 Jakub Jelinek <jakub@redhat.com>
858 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
859 * tst-cancel21.c (do_one_test): Likewise.
860 Reported by Gordon Jin <gordon.jin@intel.com>.
862 2004-02-09 Jakub Jelinek <jakub@redhat.com>
864 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
865 if non-zero and set to INT_MIN if zero.
866 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
867 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
868 (SAVE_PID, RESTORE_PID): Define.
870 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
871 Use relative path to avoid including NPTL i386/vfork.S.
872 (SAVE_PID, RESTORE_PID): Define.
873 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
874 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
875 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
877 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
878 * tst-vfork1.c: New test.
879 * tst-vfork2.c: New test.
880 * tst-vfork1x.c: New test.
881 * tst-vfork2x.c: New test.
883 2004-03-08 Ulrich Drepper <drepper@redhat.com>
885 * sysdeps/i386/tcb-offsets.sym: Add PID.
886 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
887 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
888 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
890 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
892 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
894 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
896 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
899 2004-03-07 Ulrich Drepper <drepper@redhat.com>
901 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
904 * tst-once4.c: Remove unnecessary macro definition.
906 * tst-mutex7.c (do_test): Limit thread stack size.
907 * tst-once2.c (do_test): Likewise.
908 * tst-tls3.c (do_test): Likewise.
909 * tst-tls1.c (do_test): Likewise.
910 * tst-signal3.c (do_test): Likewise.
911 * tst-kill6.c (do_test): Likewise.
912 * tst-key4.c (do_test): Likewise.
913 * tst-join4.c (do_test): Likewise.
914 * tst-fork1.c (do_test): Likewise.
915 * tst-context1.c (do_test): Likewise.
916 * tst-cond2.c (do_test): Likewise.
917 * tst-cond10.c (do_test): Likewise.
918 * tst-clock2.c (do_test): Likewise.
919 * tst-cancel10.c (do_test): Likewise.
920 * tst-basic2.c (do_test): Likewise.
921 * tst-barrier4.c (do_test): Likewise.
923 2004-03-05 Ulrich Drepper <drepper@redhat.com>
925 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
927 2004-03-01 Ulrich Drepper <drepper@redhat.com>
929 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
930 (__pthread_cond_timedwait): Optimize wakeup test.
931 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
932 (__pthread_cond_wait): Likewise.
933 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
934 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
937 2004-02-29 Ulrich Drepper <drepper@redhat.com>
939 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
940 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
941 the atomic instruction needed.
942 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
943 (__lll_mutex_lock_wait): Likewise.
945 2004-02-28 Ulrich Drepper <drepper@redhat.com>
947 * Makefile (tests): Add tst-cond14 and tst-cond15.
948 * tst-cond14.c: New file.
949 * tst-cond15.c: New file.
951 2004-02-27 Ulrich Drepper <drepper@redhat.com>
953 * sysdeps/pthread/createthread.c (create_thread): Remove use of
954 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
955 needs to be implemented differently to be useful.
957 2004-02-26 Ulrich Drepper <drepper@redhat.com>
959 * pthread_attr_setschedparam.c: Don't test priority against limits
960 here. Set ATTR_FLAG_SCHED_SET flag.
961 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
962 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
963 from parent thread to child. If attribute is used and scheduling
964 parameters are not inherited, copy parameters from attribute or
965 compute them. Check priority value.
966 * pthread_getschedparam.c: If the parameters aren't known yet get
967 them from the kernel.
968 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
969 ATTR_FLAG_POLICY_SET flag for thread.
970 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
971 and ATTR_FLAG_POLICY_SET.
973 * sysdeps/pthread/createthread.c: Use tgkill if possible.
975 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
976 fail if stack address hasn't been set. Just return 0.
978 2004-02-25 Ulrich Drepper <drepper@redhat.com>
980 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
981 libpthread for the files in this list.
982 (CFLAGS-tst-unload): Removed.
983 * tst-unload.c (do_test): Don't use complete path for
986 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
989 2004-02-22 Ulrich Drepper <drepper@redhat.com>
991 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
992 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
993 operation per round is needed.
994 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
995 (__lll_mutex_lock_wait): Likewise.
997 2004-02-20 Ulrich Drepper <drepper@redhat.com>
999 * tst-cancel9.c (cleanup): Don't print to stderr.
1001 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1003 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
1005 2004-02-20 Jakub Jelinek <jakub@redhat.com>
1007 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1008 (__syscall_error_handler2): Call CDISABLE.
1009 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1010 (__syscall_error_handler2): Call CDISABLE.
1012 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1013 Release lock before the loop, don't reacquire it.
1015 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
1017 2004-02-19 Andreas Schwab <schwab@suse.de>
1019 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1022 2004-02-18 Ulrich Drepper <drepper@redhat.com>
1024 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
1025 (pthread_barrier_wait): After wakeup, release lock only when the
1026 last thread stopped using the barrier object.
1027 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
1028 (pthread_barrier_wait): Likewise.
1029 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1031 * Makefile (tests): Add tst-barrier4.
1032 * tst-barrier4.c: New file.
1034 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1035 (__pthread_cond_timedwait): Perform timeout test while holding
1036 internal lock to prevent wakeup race.
1037 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
1038 * sysdeps/pthread/pthread_cond_timedwait.c
1039 (__pthread_cond_timedwait): Likewise.
1040 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1041 (__pthread_cond_timedwait): Likewise.
1043 2004-02-18 Jakub Jelinek <jakub@redhat.com>
1045 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
1046 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
1047 * Makefile (tests): Add tst-rwlock13.
1048 * tst-rwlock13.c: New test.
1050 2004-02-16 Ulrich Drepper <drepper@redhat.com>
1052 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1053 (__condvar_tw_cleanup): Little optimization.
1054 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
1056 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
1058 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
1059 libpthread as "lib" parameter to SHLIB_COMPAT.
1060 (__novmx_siglongjmp): Fix typo in function name.
1061 (__novmx_longjmp): Fix typo in function name.
1063 2004-02-13 Ulrich Drepper <drepper@redhat.com>
1065 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
1068 * sysdeps/generic/pt-longjmp.c: Moved to...
1069 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
1071 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
1073 * Makefile (libpthread-routines): Add pt-cleanup.
1074 * pt-longjmp.c: Removed.
1075 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
1076 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
1077 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
1078 Version longjmp, siglongjmp for GLIBC_2.3.4.
1079 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
1081 2004-02-13 Ulrich Drepper <drepper@redhat.com>
1083 * sysdeps/pthread/pthread_cond_timedwait.c
1084 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
1085 Reuse code. Add __builtin_expects.
1087 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1088 (__pthread_cond_timedwait): Get internal lock in case timeout has
1089 passed before the futex syscall.
1090 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1092 2004-01-20 Ulrich Drepper <drepper@redhat.com>
1094 * allocatestack.c: Pretty printing.
1096 * sysdeps/pthread/createthread.c (create_thread): Don't add
1097 CLONE_DETACHED bit if it is not necessary.
1099 2004-01-16 Ulrich Drepper <drepper@redhat.com>
1101 * pthread_getattr_np.c: Include ldsodefs.h.
1103 2004-01-16 Richard Henderson <rth@redhat.com>
1105 * allocatestack.c: Don't declare __libc_stack_end.
1106 * init.c (__pthread_initialize_minimal_internal): Likewise.
1107 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
1109 2004-01-15 Richard Henderson <rth@redhat.com>
1111 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
1112 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
1113 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
1114 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
1115 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
1116 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
1117 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1118 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
1120 2004-01-14 Ulrich Drepper <drepper@redhat.com>
1122 * init.c (pthread_functions): Make array const.
1124 2004-01-13 Ulrich Drepper <drepper@redhat.com>
1126 * allocatestack.c (__make_stacks_executable): Change interface.
1127 Check parameters. Pass parameter on to libc counterpart.
1128 * pthreadP.h: Change declaration.
1130 2004-01-13 Richard Henderson <rth@redhat.com>
1132 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
1134 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
1137 * sysdeps/alpha/Makefile: New file.
1138 * sysdeps/alpha/tcb-offsets.sym: New file.
1139 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1140 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
1142 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
1145 2004-01-08 Jakub Jelinek <jakub@redhat.com>
1147 * Makefile (tests): Add tst-backtrace1.
1148 * tst-backtrace1.c: New test.
1150 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
1152 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
1153 register as second parameter to the REGISTER macro.
1154 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
1155 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
1156 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
1157 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
1158 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
1159 of thread register as second parameter to REGISTER macro in 64 case.
1161 2004-01-03 Ulrich Drepper <drepper@redhat.com>
1163 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
1164 (CFLAGS-getpid.o): Defined.
1165 (CFLAGS-getpid.os): Defined.
1167 2003-12-31 Ulrich Drepper <drepper@redhat.com>
1169 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
1170 returned for main thread does not overlap with any other VMA.
1171 Patch by Jakub Jelinek.
1173 2003-12-29 Jakub Jelinek <jakub@redhat.com>
1175 * tst-raise1.c: Include stdio.h.
1177 2003-12-23 Jakub Jelinek <jakub@redhat.com>
1179 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
1180 setting with __ASSUME_TGKILL || defined __NR_tgkill.
1181 If pid is 0, set it to selftid.
1182 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
1183 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
1184 != 0, return self->tid without doing a syscall.
1185 * descr.h (struct pthread): Move pid field after tid.
1187 * Makefile (tests): Add tst-raise1.
1188 * tst-raise1.c: New file.
1190 2003-12-23 Roland McGrath <roland@redhat.com>
1192 * tst-oddstacklimit.c: New file.
1193 * Makefile (tests): Add it.
1194 (tst-oddstacklimit-ENV): New variable.
1196 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
1197 value up to page size for __default_stacksize.
1199 2003-12-21 Ulrich Drepper <drepper@redhat.com>
1201 * Makefile (tests): Add tst-eintr5.
1202 * tst-eintr5.c: New file.
1204 * eintr.c (eintr_source): Prevent sending signal to self.
1206 * tst-eintr2.c (tf1): Improve error message.
1208 2003-12-20 Ulrich Drepper <drepper@redhat.com>
1210 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
1211 * sysdeps/unix/sysv/linux/getpid.c: New file.
1212 * pthread_cancel.c: Add comment explaining use of PID field.
1213 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
1214 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
1215 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
1216 temporarily to signal the field must not be relied on and updated
1218 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
1219 temporarily negative.
1220 * sysdeps/unix/sysv/linux/raise.c: Likewise.
1222 2003-12-19 Ulrich Drepper <drepper@redhat.com>
1224 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
1225 (eintr_source): If ARG != NULL, use pthread_kill.
1226 * tst-eintr1.c: Adjust for this change.
1227 * tst-eintr2.c: Likewise.
1228 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
1229 * tst-eintr3.c: New file.
1230 * tst-eintr4.c: New file.
1232 2003-12-19 Jakub Jelinek <jakub@redhat.com>
1234 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
1235 if CANCELSTATE_BITMASK is set.
1236 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
1239 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
1240 (tests-reverse): Add tst-cancel23.
1241 * tst-cancel22.c: New test.
1242 * tst-cancel23.c: New test.
1244 2003-12-18 Ulrich Drepper <drepper@redhat.com>
1246 * tst-eintr1.c: Better error messages.
1248 * Makefile (tests): Add tst-eintr2.
1249 * tst-eintr2.c: New file.
1251 2003-12-18 Jakub Jelinek <jakub@redhat.com>
1253 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
1254 (CFLAGS-tst-cancelx21.c): Set.
1255 * tst-cancel21.c: New test.
1256 * tst-cancelx21.c: New test.
1258 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
1260 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
1261 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
1262 * pt-longjmp.c: Include jmpbuf-unwind.h.
1263 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
1264 _JMPBUF_UNWINDS. Adjust compared pointers.
1265 * init.c (__pthread_initialize_minimal_internal): Initialize
1266 pd->stackblock_size.
1267 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
1268 * sysdeps/alpha/jmpbuf-unwind.h: New file.
1269 * sysdeps/i386/jmpbuf-unwind.h: New file.
1270 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
1271 * sysdeps/s390/jmpbuf-unwind.h: New file.
1272 * sysdeps/sh/jmpbuf-unwind.h: New file.
1273 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
1274 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
1275 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
1276 (_JMPBUF_CFA_UNWINDS): Remove.
1277 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
1279 2003-12-12 Jakub Jelinek <jakub@redhat.com>
1281 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
1282 (CFLAGS-tst-cancelx20.c): Set.
1283 * tst-cancel20.c: New test.
1284 * tst-cancelx20.c: New test.
1286 2003-12-17 Ulrich Drepper <drepper@redhat.com>
1288 * init.c (__pthread_initialize_minimal_internal): Don't treat
1289 architectures with separate register stack special here when
1290 computing default stack size.
1292 2003-12-17 Roland McGrath <roland@redhat.com>
1294 * Makefile (tst-cancelx7-ARGS): New variable.
1295 Reportd by Greg Schafer <gschafer@zip.com.au>.
1297 2003-12-17 Jakub Jelinek <jakub@redhat.com>
1299 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
1300 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
1301 (tst-stack3-ENV): Set.
1302 ($(objpfx)tst-stack3-mem): New.
1303 * tst-stack3.c: New test.
1305 2003-12-10 David Mosberger <davidm@hpl.hp.com>
1307 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
1308 Add unwind directives. Drop unused .regstk directive.
1309 (_fini_EPILOG_BEGINS): Add unwind directives.
1311 2003-12-11 Ulrich Drepper <drepper@redhat.com>
1313 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
1314 Assume parameter is a pointer.
1315 (lll_futex_wake): Likewise.
1316 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
1318 (lll_futex_wake): Likewise.
1319 Reported by Boris Hu.
1320 * sysdeps/unix/sysv/linux/unregister-atfork.c
1321 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
1323 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
1325 2003-12-10 Ulrich Drepper <drepper@redhat.com>
1327 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
1328 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
1329 __rtld_lock_initialize for ld.so lock.
1330 Patch in part by Adam Li <adam.li@intel.com>.
1332 2003-12-02 David Mosberger <davidm@hpl.hp.com>
1334 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
1335 in $(gnulib). Also, remove stale comment.
1337 2003-11-12 David Mosberger <davidm@hpl.hp.com>
1339 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
1340 advantage of new syscall stub and optimize accordingly.
1342 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
1343 from SYS_futex, to match expectations of
1344 sysdep.h:DO_INLINE_SYSCALL.
1345 (lll_futex_clobbers): Remove.
1346 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
1347 (lll_futex_wake): Likewise.
1348 (lll_futex_requeue): Likewise.
1349 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
1350 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
1352 (__lll_mutex_lock): Likewise.
1353 (__lll_mutex_cond_lock): Likewise.
1354 (__lll_mutex_timed_lock): Likewise.
1355 (__lll_mutex_unlock): Likewise.
1356 (__lll_mutex_unlock_force): Likewise.
1358 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
1359 comes before the include of <sysdep.h>.
1360 (THREAD_SELF_SYSINFO): New macro.
1361 (THREAD_SYSINFO): Likewise.
1362 (INIT_SYSINFO): New macro.
1363 (TLS_INIT_TP): Call INIT_SYSINFO.
1365 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
1367 * sysdeps/pthread/createthread.c (create_thread): Use
1368 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
1369 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
1370 THREAD_SELF_SYSINFO instead of open code.
1371 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
1372 (THREAD_SYSINFO): Likewise.
1374 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
1376 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
1378 2003-12-06 Ulrich Drepper <drepper@redhat.com>
1380 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
1381 instead of .init. Patch by David Mosberger.
1383 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
1385 * sysdeps/pthread/configure.in: Remove broken declaration in C
1386 cleanup handling check.
1388 2003-11-30 Andreas Jaeger <aj@suse.de>
1390 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
1391 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
1394 2003-11-27 Jakub Jelinek <jakub@redhat.com>
1396 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
1397 * pthread_attr_destroy.c: Include shlib-compat.h.
1398 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
1399 is set in iattr->flags.
1400 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
1402 2003-11-21 Jakub Jelinek <jakub@redhat.com>
1404 * Makefile (distribute): Add tst-cleanup4aux.c.
1406 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
1409 2003-11-21 Ulrich Drepper <drepper@redhat.com>
1411 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
1412 pthread_cond_signal.
1414 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
1415 store mutex address if the current value is ~0l.
1416 * sysdeps/pthread/pthread_cond_timedwait.c
1417 (__pthread_cond_timedwait): Likewise.
1418 * sysdeps/pthread/pthread_cond_broadcast.c
1419 (__pthread_cond_broadcast): Don't use requeue for pshared
1422 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1423 (__pthread_cond_wait): Don't store mutex address if the current
1425 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1426 (__pthread_cond_timedwait): Likewise.
1427 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1428 (__pthread_cond_broadcast): Don't use requeue for pshared
1431 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
1432 element with ~0l for pshared condvars, with NULL otherwise.
1434 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
1435 (__pthread_cond_wait): Don't store mutex address if the current
1437 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1438 (__pthread_cond_timedwait): Likewise.
1439 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1440 (__pthread_cond_broadcast): Don't use requeue for pshared
1443 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
1444 * tst-cond12.c: New file.
1445 * tst-cond13.c: New file.
1447 2003-11-17 Ulrich Drepper <drepper@redhat.com>
1449 * sysdeps/pthread/configure.in: Make missing forced unwind support
1452 2003-11-11 Ulrich Drepper <drepper@redhat.com>
1454 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
1456 2003-11-06 Ulrich Drepper <drepper@redhat.com>
1458 * Makefile: Add magic to clean up correctly.
1460 2003-11-05 Jakub Jelinek <jakub@redhat.com>
1462 * unwind.c (FRAME_LEFT): Define.
1463 (unwind_stop): Handle old style cleanups here.
1464 (__pthread_unwind): Handle old style cleanups only if
1465 !HAVE_FORCED_UNWIND.
1466 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
1467 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
1468 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
1469 ($(objpfx)tst-cleanupx4): Likewise.
1470 * tst-cleanup4.c: New test.
1471 * tst-cleanup4aux.c: New.
1472 * tst-cleanupx4.c: New test.
1474 2003-11-04 Ulrich Drepper <drepper@redhat.com>
1476 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
1477 lll_mutex_*lock macros to skip atomic operations on some archs.
1479 2003-11-03 Ulrich Drepper <drepper@redhat.com>
1481 * sysdeps/pthread/tst-timer.c (main): Initialize
1482 sigev2.sigev_value as well.
1484 2003-10-15 Roland McGrath <roland@redhat.com>
1486 * sysdeps/pthread/configure.in: Barf if visibility attribute support
1488 * sysdeps/pthread/configure: Regenerated.
1490 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1492 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
1493 locking macros. No distinction between normal and mutex locking
1495 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
1496 Merge bits from lowlevelmutex.S we still need.
1497 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
1498 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
1499 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
1500 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
1501 new mutex implementation.
1502 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
1503 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
1504 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1505 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1506 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1507 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1508 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1509 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1510 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1511 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
1512 symbol for entry point to avoid cancellation.
1514 2003-10-07 Jakub Jelinek <jakub@redhat.com>
1516 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
1518 (SAVE_OLDTYPE_0): Fix a typo.
1520 2003-10-03 Ulrich Drepper <drepper@redhat.com>
1522 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
1523 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
1525 2003-10-02 Ulrich Drepper <drepper@redhat.com>
1527 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
1530 2003-10-02 Jakub Jelinek <jakub@redhat.com>
1532 * Makefile (tests): Add tst-cancel19.
1533 * tst-cancel19.c: New test.
1535 2003-10-02 Ulrich Drepper <drepper@redhat.com>
1537 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
1538 restoring of the old cancellation type.
1540 2003-09-30 Jakub Jelinek <jakub@redhat.com>
1542 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
1544 2003-09-27 Wolfram Gloger <wg@malloc.de>
1546 * sysdeps/pthread/malloc-machine.h: New file
1548 2003-09-24 Roland McGrath <roland@redhat.com>
1550 * allocatestack.c (__make_stacks_executable): Don't ignore return
1551 value from _dl_make_stack_executable.
1553 2003-09-24 Ulrich Drepper <drepper@redhat.com>
1555 * allocatestack.c (__make_stacks_executable): Also change
1556 permission of the currently unused stacks.
1558 * allocatestack.c (change_stack_perm): Split out from
1559 __make_stacks_executable.
1560 (allocate_stack): If the required permission changed between the time
1561 we started preparing the stack and queueing it, change the permission.
1562 (__make_stacks_executable): Call change_stack_perm.
1564 * Makefile: Build tst-execstack-mod locally.
1565 * tst-execstack-mod.c: New file.
1567 2003-09-23 Jakub Jelinek <jakub@redhat.com>
1569 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
1571 2003-09-23 Roland McGrath <roland@redhat.com>
1573 * tst-execstack.c: New file.
1574 * Makefile (tests): Add it.
1575 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
1576 (LDFLAGS-tst-execstack): New variable.
1578 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
1579 whether to use PROT_EXEC for stack mmap.
1580 (__make_stacks_executable): New function.
1581 * pthreadP.h: Declare it.
1582 * init.c (__pthread_initialize_minimal_internal): Set
1583 GL(dl_make_stack_executable_hook) to that.
1585 2003-09-22 Ulrich Drepper <drepper@redhat.com>
1587 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
1588 recommendation from AMD re avoidance of lock prefix.
1590 2003-09-22 Jakub Jelinek <jakub@redhat.com>
1592 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
1593 lll_futex_timed_wait instead of lll_futex_wait.
1594 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
1595 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
1596 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
1597 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
1598 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
1599 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
1600 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
1601 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
1602 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
1603 Completely revamp the locking macros. No distinction between
1604 normal and mutex locking anymore.
1605 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1606 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
1607 __lll_lock_timedwait): Fix prototypes.
1608 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
1609 __lll_lock_timedwait): Likewise.
1610 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
1611 macros, add __builtin_expect.
1612 (lll_mutex_timedlock): Likewise. Fix return value.
1613 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
1614 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
1615 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
1616 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
1617 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
1618 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
1619 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
1620 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
1622 2003-09-22 Ulrich Drepper <drepper@redhat.com>
1624 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1625 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
1626 operation if possible.
1628 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
1629 like jumping over the lock prefix.
1631 2003-09-21 Ulrich Drepper <drepper@redhat.com>
1633 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
1634 locking macros. No distinction between normal and mutex locking
1636 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1637 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1638 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1639 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
1640 locking. Merge bits from lowlevelmutex.S we still need.
1641 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1642 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1643 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
1644 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
1645 * Makefile (routines): Remove libc-lowlevelmutex.
1646 (libpthread-rountines): Remove lowlevelmutex.
1647 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
1648 for new mutex implementation.
1649 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1650 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1651 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1652 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1653 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1655 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1657 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1658 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1659 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
1660 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1661 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1662 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1663 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1664 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1666 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1668 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1669 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1670 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1672 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1673 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
1675 2003-09-20 Ulrich Drepper <drepper@redhat.com>
1677 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
1678 in parameters of asm with output parameters.
1680 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
1681 type of DECR parameter to int.
1682 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
1684 2003-09-18 Jakub Jelinek <jakub@redhat.com>
1686 * tst-attr3.c (tf, do_test): Print stack start/end/size and
1687 guardsize for each thread.
1689 2003-09-17 Jakub Jelinek <jakub@redhat.com>
1691 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
1692 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
1693 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
1695 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
1696 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
1698 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
1699 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
1700 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
1701 (pthread_getaffinity_np): Add hidden_def.
1703 * Makefile (tests): Add tst-attr3.
1704 * tst-attr3.c: New test.
1706 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
1708 2003-09-15 Jakub Jelinek <jakub@redhat.com>
1710 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
1711 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
1713 2003-09-17 Jakub Jelinek <jakub@redhat.com>
1715 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
1716 * tst-align.c: Include tst-stack-align.h.
1717 (tf, do_test): Use TEST_STACK_ALIGN macro.
1719 2003-09-17 Ulrich Drepper <drepper@redhat.com>
1721 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
1724 2003-09-16 Ulrich Drepper <drepper@redhat.com>
1726 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
1727 stack-related values for the initial thread.
1729 2003-09-15 Jakub Jelinek <jakub@redhat.com>
1731 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
1733 2003-09-11 Ulrich Drepper <drepper@redhat.com>
1735 * pthread_mutex_lock.c: Minor code rearrangements.
1737 2003-09-05 Roland McGrath <roland@redhat.com>
1739 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
1740 Instead, include ../nptl_db/db_info.c to do its magic.
1741 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
1742 (__pthread_pthread_key_2ndlevel_size): Likewise.
1743 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
1744 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
1745 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
1746 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
1747 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
1748 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
1749 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
1750 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
1751 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
1752 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
1753 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
1754 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
1755 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
1756 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
1757 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
1758 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
1759 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
1761 2003-09-08 Ulrich Drepper <drepper@redhat.com>
1763 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
1764 of pthread_t to be compatible with LT.
1765 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1766 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1767 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1768 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1769 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
1770 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1771 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1773 2003-09-04 Ulrich Drepper <drepper@redhat.com>
1775 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
1777 2003-09-04 Jakub Jelinek <jakub@redhat.com>
1779 * unwind-forcedunwind.c: Move to...
1780 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
1781 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
1782 * sysdeps/pthread/jmpbuf-unwind.h: New file.
1783 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
1784 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
1785 * unwind.c: Include jmpbuf-unwind.h.
1786 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
1788 2003-09-02 Jakub Jelinek <jakub@redhat.com>
1790 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
1791 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
1792 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
1793 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
1794 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
1795 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
1796 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
1797 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
1798 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
1799 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
1800 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
1802 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
1803 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
1804 * Makefile (tests): Add tst-stack2.
1805 * tst-stack2.c: New test.
1806 * tst-stack1.c: Include limits.h and sys/param.h.
1807 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
1809 * pthread_condattr_setpshared.c: Include errno.h.
1810 (pthread_condattr_setpshared): Return EINVAL if pshared
1811 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
1813 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
1814 defined symbol for entry point to avoid cancellation.
1815 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1817 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1819 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
1821 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
1823 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1825 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
1826 __close_nocancel, __read_nocancel, __write_nocancel,
1827 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
1828 libpthread.so or librt.so, define to corresponding function
1829 without _nocancel suffix.
1830 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
1831 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
1832 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
1834 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
1836 2003-09-02 Ulrich Drepper <drepper@redhat.com>
1838 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1839 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
1841 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
1842 in subsections has a symbol associated with it.
1844 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
1845 defined symbol for entry point to avoid cancellation.
1846 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
1848 2003-09-01 Jakub Jelinek <jakub@redhat.com>
1850 * Makefile (tests): Add tst-tls5.
1851 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
1852 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
1853 ($(objpfx)tst-tls5): New.
1854 ($(objpfx)tst-tls6.out): Likewise.
1855 (tests): Depend on $(objpfx)tst-tls6.out.
1856 * tst-tls3.c: Include stdint.h and pthreaddef.h.
1857 (do_test): Check pthread_self () return value alignment.
1858 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
1859 (tf): Check pthread_self () return value alignment.
1860 * tst-tls5.c: New test.
1862 * tst-tls5mod.c: New.
1863 * tst-tls5moda.c: New.
1864 * tst-tls5modb.c: New.
1865 * tst-tls5modc.c: New.
1866 * tst-tls5modd.c: New.
1867 * tst-tls5mode.c: New.
1868 * tst-tls5modf.c: New.
1869 * tst-tls6.sh: New test.
1871 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
1872 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
1873 * init.c (pthread_functions): Initialize them.
1874 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
1875 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
1876 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
1877 pthread_cond_timedwait@@GLIBC_2.3.2.
1879 2003-09-01 Jakub Jelinek <jakub@redhat.com>
1881 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
1882 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
1883 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
1884 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
1885 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
1886 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
1888 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
1890 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
1891 _POSIX_THREAD_PRIORITY_SCHEDULING.
1892 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1894 2003-08-31 Ulrich Drepper <drepper@redhat.com>
1896 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
1897 nested function, use static inline function from libio.h.
1898 Code by Richard Henderson.
1900 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
1903 2003-08-30 Jakub Jelinek <jakub@redhat.com>
1905 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
1906 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
1907 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
1908 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
1909 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
1910 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
1911 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
1912 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
1913 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
1914 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
1915 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
1916 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
1917 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
1918 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
1919 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
1920 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
1921 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
1922 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
1923 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
1924 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
1925 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
1926 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
1927 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
1928 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
1929 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
1930 * sysdeps/sparc/tls.h: New file.
1931 * sysdeps/sparc/tcb-offsets.sym: New file.
1932 * sysdeps/sparc/Makefile: New file.
1933 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
1934 * init.c [__sparc__] (__NR_set_tid_address): Define.
1936 2003-08-29 Jakub Jelinek <jakub@redhat.com>
1938 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
1939 _IO_release_lock): Define.
1941 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
1943 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
1944 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
1946 2003-08-27 Ulrich Drepper <drepper@redhat.com>
1948 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
1949 (__pthread_cleanup_class): Add missing return types of member
1952 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
1954 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1955 (lll_mutex_unlock_force): Add memory barrier between store and futex
1958 2003-08-25 Ulrich Drepper <drepper@redhat.com>
1960 * tst-cancel4.c (do_test): Also unlink tempfname and remove
1961 tempmsg in first loop.
1963 2003-08-18 Ulrich Drepper <drepper@redhat.com>
1965 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1966 _POSIX_THREAD_PRIORITY_SCHEDULING.
1967 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1969 2003-08-07 Jakub Jelinek <jakub@redhat.com>
1971 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
1972 (__rtld_lock_default_lock_recursive,
1973 __rtld_lock_default_unlock_recursive): Define.
1974 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
1975 __rtld_lock_unlock_recursive): Define using
1976 GL(_dl_rtld_*lock_recursive).
1977 * init.c (__pthread_initialize_minimal_internal): Initialize
1978 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
1979 Lock GL(_dl_load_lock) the same number of times as
1980 GL(_dl_load_lock) using non-mt implementation was nested.
1982 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
1983 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
1985 2003-08-06 Jakub Jelinek <jakub@redhat.com>
1987 * tst-cancel17.c (do_test): Make len2 maximum of page size and
1990 2003-08-07 Jakub Jelinek <jakub@redhat.com>
1992 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
1994 2003-08-03 Jakub Jelinek <jakub@redhat.com>
1996 * sysdeps/pthread/createthread.c (do_clone): Move error handling
1997 to first syscall error check. Move syscall error check for tkill
1998 into __ASSUME_CLONE_STOPPED #ifdef.
2000 2003-08-02 Ulrich Drepper <drepper@redhat.com>
2002 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
2003 is not defined, do explicit synchronization.
2004 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
2005 is not defined also unlock pd->lock for non-debugging case in case
2007 * pthread_create.c (start_thread): Always get and release pd->lock
2008 if __ASSUME_CLONE_STOPPED is not defined.
2009 (start_thread_debug): Removed. Adjust users.
2010 * allocatestack.c (allocate_stack): Always initialize lock if
2011 __ASSUME_CLONE_STOPPED is not defined.
2012 * Makefile (tests): Add tst-sched1.
2013 * tst-sched1.c: New file.
2015 * sysdeps/pthread/createthread.c (do_clone): Only use
2016 sched_setschduler and pass correct parameters.
2018 2003-07-31 Jakub Jelinek <jakub@redhat.com>
2020 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
2021 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
2022 PTHREAD_STACK_MIN in comments.
2024 2003-07-31 Jakub Jelinek <jakub@redhat.com>
2026 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2027 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
2029 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
2030 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
2031 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
2032 (__pthread_cleanup_upto): Fix prototype.
2033 (_longjmp_unwind): Adjust caller.
2034 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
2035 Change second argument to const struct pointer.
2036 * tst-sem8.c (main): Remove unused s2 and s3 variables.
2037 * tst-sem9.c (main): Likewise.
2038 * unwind.c: Include string.h for strlen prototype.
2040 2003-07-31 Ulrich Drepper <drepper@redhat.com>
2042 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2043 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
2044 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
2046 Patch by Nicholas Miell <nmiell@attbi.com>.
2048 2003-07-30 Jakub Jelinek <jakub@redhat.com>
2050 * init.c (__pthread_initialize_minimal_internal): Initialize
2051 GL(dl_init_static_tls).
2052 * pthreadP.h (__pthread_init_static_tls): New prototype.
2053 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
2055 * Makefile (tests): Add tst-tls4.
2056 (modules-names): Add tst-tls4moda and tst-tls4modb.
2057 ($(objpfx)tst-tls4): Link against libdl and libpthread.
2058 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
2060 * tst-tls4.c: New file.
2061 * tst-tls4moda.c: New file.
2062 * tst-tls4modb.c: New file.
2064 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
2066 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
2067 before __timer_dealloc.
2068 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
2069 Don't call list_unlink.
2071 2003-07-29 Roland McGrath <roland@redhat.com>
2073 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
2075 2003-07-25 Jakub Jelinek <jakub@redhat.com>
2077 * tst-cancel17.c (do_test): Check if aio_cancel failed.
2078 Don't reuse struct aiocb A if it failed.
2079 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
2080 not just one byte, as that does not block.
2082 2003-07-22 Jakub Jelinek <jakub@redhat.com>
2084 * sysdeps/pthread/unwind-resume.c: New file.
2085 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
2086 unwind-resume in csu subdir.
2087 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
2089 (librt-sysdep_routines, librt-shared-only-routines): Add
2091 * sysdeps/pthread/rt-unwind-resume.c: New file.
2092 * unwind-forcedunwind.c: New file.
2093 * Makefile (libpthread-routines): Add unwind-forcedunwind.
2094 (libpthread-shared-only-routines): Likewise.
2095 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
2096 * pthreadP.h (pthread_cancel_init): New prototype.
2097 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
2099 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
2100 attr argument const struct pthread_attr *.
2102 * res.c (__res_state): Return __resp.
2103 * descr.h: Include resolv.h.
2104 (struct pthread): Add res field.
2105 * pthread_create.c: Include resolv.h.
2106 (start_thread): Initialize __resp.
2107 * Makefile (tests): Add tst-_res1.
2108 (module-names): Add tst-_res1mod1, tst-_res1mod2.
2109 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
2110 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
2112 * tst-_res1.c: New file.
2113 * tst-_res1mod1.c: New file.
2114 * tst-_res1mod2.c: New file.
2116 2003-07-21 Ulrich Drepper <drepper@redhat.com>
2118 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
2120 * Makefile: Define various *-no-z-defs variables for test DSOs
2121 which has undefined symbols.
2123 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
2125 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2126 Retry if the stwcx fails to store once_control.
2128 2003-07-20 Ulrich Drepper <drepper@redhat.com>
2130 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
2131 pthread_attr_setaffinity.
2132 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
2133 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
2134 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
2135 * pthread_attr_destroy.c: Free cpuset element if allocated.
2136 * pthread_create.c: Pass iattr as additional parameter to
2138 * sysdeps/pthread/createthread.c: If attribute is provided and
2139 a new thread is created with affinity set or scheduling parameters,
2140 start thread with CLONE_STOPPED.
2141 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
2142 pthread_attr_setaffinity.
2143 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
2146 2003-07-15 Ulrich Drepper <drepper@redhat.com>
2148 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
2150 2003-07-14 Ulrich Drepper <drepper@redhat.com>
2152 * sysdeps/pthread/configure.in: Require CFI directives also for
2155 2003-07-15 Jakub Jelinek <jakub@redhat.com>
2157 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
2160 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2162 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
2164 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
2165 registers as variables. Call __pthread_mutex_unlock_usercnt.
2166 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2167 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
2168 not self pointer in __writer. Compare with TID to determine
2170 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2171 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2173 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2175 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
2176 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
2177 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
2178 macros also when compiling librt.
2180 2003-07-11 Jakub Jelinek <jakub@redhat.com>
2182 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
2183 -fasynchronous-unwind-tables.
2184 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2185 (PSEUDO): Add cfi directives.
2186 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
2188 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
2191 2003-07-08 Jakub Jelinek <jakub@redhat.com>
2193 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
2194 __pthread_unregister_cancel): Add prototypes and hidden_proto.
2195 * unwind.c (__pthread_unwind_next): Add hidden_def.
2196 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
2198 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2199 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2200 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2202 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
2203 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2205 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
2206 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
2207 __pthread_unregister_cancel and __pthread_unwind_next.
2209 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2211 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
2212 different symbol for the cancellation syscall wrapper and
2213 non-cancellation syscall wrapper.
2214 (PSEUDO_END): Define.
2216 2003-07-05 Richard Henderson <rth@redhat.com>
2218 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
2219 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
2220 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
2221 return actual return value from the syscall, not 0.
2223 2003-07-07 Ulrich Drepper <drepper@redhat.com>
2225 * descr.h (struct pthread): Add pid field.
2226 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
2227 (__reclaim_stacks): Likewise.
2228 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
2229 also check for PID of the signal source.
2230 (__pthread_initialize_minimal_internal): Also initialize pid field
2231 of initial thread's descriptor.
2232 * pthread_cancel.c: Use tgkill instead of tkill if possible.
2233 * sysdeps/unix/sysv/linux/fork.c: Likewise.
2234 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
2235 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
2236 * sysdeps/unix/sysv/linux/raise.c: Likewise.
2238 2003-07-05 Ulrich Drepper <drepper@redhat.com>
2240 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
2241 Fix use of parameter.
2242 (__libc_cleanup_pop): Likewise.
2244 2003-07-04 Ulrich Drepper <drepper@redhat.com>
2246 * init.c (sigcancel_handler): Change parameters to match handler
2247 for SA_SIGACTION. Check signal number and code to recognize
2248 invalid invocations.
2250 2003-07-03 Roland McGrath <roland@redhat.com>
2252 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
2253 Apply sizeof (struct pthread) bias to r13 value.
2255 2003-07-03 Ulrich Drepper <drepper@redhat.com>
2257 * sysdeps/pthread/configure.in: Require CFI directives.
2259 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
2261 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
2262 libpthread compilation.
2263 * unwind.c (__pthread_unwind): Add hidden_def.
2264 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
2266 2003-07-01 Ulrich Drepper <drepper@redhat.com>
2268 * libc-cancellation.c (__libc_cleanup_routine): Define.
2269 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
2270 (__pthread_cleanup_pop): Define.
2272 2003-07-01 Richard Henderson <rth@redhat.com>
2274 * sysdeps/alpha/elf/pt-initfini.c: New file.
2275 * sysdeps/alpha/pthread_spin_lock.S: New file.
2276 * sysdeps/alpha/pthread_spin_trylock.S: New file.
2277 * sysdeps/alpha/pthreaddef.h: New file.
2278 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
2279 * sysdeps/alpha/tls.h: New file.
2280 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
2281 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
2282 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
2283 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
2284 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
2285 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
2286 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
2287 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
2288 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
2289 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
2291 2003-07-01 Ulrich Drepper <drepper@redhat.com>
2293 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
2294 cleanup support and unwind info.
2296 2003-06-30 Ulrich Drepper <drepper@redhat.com>
2298 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
2299 Use correct cleanup handler registration. Add unwind info.
2300 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
2301 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
2302 * tst-once3.c: Add cleanup handler and check it is called.
2303 * tst-once4.c: Likewise.
2304 * tst-oncex3.c: New file.
2305 * tst-oncex4.c: New file.
2306 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
2308 2003-06-29 Ulrich Drepper <drepper@redhat.com>
2310 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
2312 2003-06-27 Ulrich Drepper <drepper@redhat.com>
2314 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
2315 (tf_msgsnd): Likewise.
2317 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
2318 premature returns a bit more.
2320 2003-06-26 Ulrich Drepper <drepper@redhat.com>
2322 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
2323 definition to the front.
2325 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
2326 the cleanup functions to make the names unique. Fix dwarf opcode
2328 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
2329 functions to make the names unique. Fix CFA offset for two blocks.
2331 2003-06-25 Ulrich Drepper <drepper@redhat.com>
2333 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
2334 missing closing braces.
2335 Patch by Christophe Saout <christophe@saout.de>.
2337 2003-06-24 Roland McGrath <roland@redhat.com>
2339 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
2341 2003-06-24 Ulrich Drepper <drepper@redhat.com>
2343 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
2344 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
2346 * pthreadP.h: Declare __find_thread_by_id.
2347 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
2348 * pthread_clock_gettime.c: Allow using other thread's clock.
2349 * pthread_clock_settime.c: Likewise.
2350 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
2351 * Makefile: Add rules to build and run tst-clock2.
2352 * tst-clock2.c: New file.
2354 2003-06-23 Ulrich Drepper <drepper@redhat.com>
2356 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
2357 to use exception-based cleanup handler.
2358 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2360 * tst-cond8.c (ch): Announce that we are done.
2362 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
2364 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
2365 Also test aio_suspend with timeout value.
2367 2003-06-22 Ulrich Drepper <drepper@redhat.com>
2369 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
2370 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
2373 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
2374 (__pthread_mutex_lock_internal): Likewise.
2375 (__pthread_mutex_unlock_internal): Likewise.
2376 (__pthread_mutex_unlock_usercnt): Declare.
2377 * pthread_mutex_destroy.c: Always fail if used in any way.
2378 * pthread_mutex_init.c: Update comment.
2379 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
2380 * pthread_mutex_timedlock.c: Adjust __nusers.
2381 * pthread_mutex_trylock.c: Adjust __nusers.
2382 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
2383 and public interfaces are wrapper with pass additional parameter.
2384 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
2386 * tst-mutex8.c: New file.
2387 * Makefile (tests): Add tst-mutex8.
2388 * sysdeps/pthread/pthread_cond_timedwait.c: Call
2389 __pthread_mutex_unlock_usercnt.
2390 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2391 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2392 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2393 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2394 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2395 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
2396 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2398 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2399 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2400 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2401 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2402 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2404 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
2405 * pthread_mutex_timedlock.c: Likewise.
2406 * pthread_mutex_trylock.c: Adjust __nusers.
2407 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
2408 * tst-mutex9.c: New file.
2409 * Makefile (tests): Add tst-mutex9.
2410 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
2411 * sysdeps/ia64/tls.h: Likewise.
2412 * sysdeps/powerpc/tls.h: Likewise.
2413 * sysdeps/s390/tls.h: Likewise.
2414 * sysdeps/sh/tls.h: Likewise.
2415 * sysdeps/x86_64/tls.h: Likewise.
2416 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2417 Change type of __owner.
2418 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2419 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2420 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2421 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2422 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2424 2003-06-19 Jakub Jelinek <jakub@redhat.com>
2426 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
2427 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
2429 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
2430 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
2431 instead of nr to lll_futex_wake. Only set errno and return -1
2434 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
2435 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
2436 return actual return value from the syscall, not 0.
2438 2003-06-18 Ulrich Drepper <drepper@redhat.com>
2440 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
2441 find a random value.
2442 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
2445 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
2446 compat_timer_settime.
2447 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
2448 compat_timer_gettime.
2449 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
2450 compat_timer_getoverrun.
2451 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
2452 compat_timer_delete.
2454 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
2455 error-checking mutex detect busy mutexes.
2457 2003-06-17 Ulrich Drepper <drepper@redhat.com>
2459 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
2460 Add ax to clobber list.
2461 (lll_mutex_cond_lock): Likewise.
2462 (lll_mutex_unlock): Likewise.
2463 (lll_lock): Likewise.
2464 (lll_unlock): Likewise.
2466 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
2467 * tst-cancel18.c: New file.
2468 * tst-cancelx18.c: New file.
2470 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
2473 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
2474 * tst-cancel17.c: New file.
2475 * tst-cancelx17.c: New file.
2477 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
2478 * sysdeps/unix/sysv/linux/sigwait.c: New file.
2479 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
2481 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
2483 2003-06-16 Jakub Jelinek <jakub@redhat.com>
2485 * sysdeps/pthread/createthread.c (create_thread): Set
2486 header.multiple_threads unconditionally.
2487 * allocatestack.c (allocate_stack): Likewise.
2488 * descr.h (struct pthread): Add header.multiple_threads
2490 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
2491 Define for librt. #error if neither libpthread, libc nor librt.
2492 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
2494 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
2495 CDISABLE): Likewise.
2496 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
2497 CDISABLE): Likewise.
2498 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
2499 CDISABLE): Likewise.
2500 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
2501 CDISABLE): Likewise. Access header.multiple_threads outside of
2502 libc and libpthread.
2503 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
2505 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
2506 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
2508 2003-06-17 Ulrich Drepper <drepper@redhat.com>
2510 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
2511 Also test early cancellation before the thread reaches the cancellation
2514 * Makefile: Compile forward.c with exceptions.
2516 * sysdeps/unix/sysv/linux/sleep.c: New file.
2518 2003-06-16 Ulrich Drepper <drepper@redhat.com>
2520 * Makefile: Add CFLAGS definition to compile function wrappers
2521 duplicated from libc with exceptions.
2522 * tst-cancel4.c: Also check cancellation handlers.
2524 * Makefile: Add rules to build and run tst-cancel16 and
2525 tst-cancelx16. Add missing CFLAGS definitions.
2526 * tst-cancel16.c: New file.
2527 * tst-cancelx16.c: New file.
2529 2003-06-15 Ulrich Drepper <drepper@redhat.com>
2531 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
2532 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
2533 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
2534 (DL_SYSINFO_IMPLEMENTATION): Likewise.
2536 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
2537 (LIBC_CANCEL_RESET): Likewise.
2538 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
2539 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
2541 (CFLAGS-libcrt-cancellation.c): Define.
2542 * sysdeps/pthread/librt-cancellation.c: New file.
2543 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
2544 macros also when compiling librt.
2545 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2546 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2547 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2548 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2549 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2550 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2551 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2553 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
2554 compat_timer_create.
2556 2003-06-14 Ulrich Drepper <drepper@redhat.com>
2558 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
2560 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
2562 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2563 Add libc_hidden_def.
2565 2003-06-13 Roland McGrath <roland@redhat.com>
2567 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
2568 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
2570 2003-06-11 Ulrich Drepper <drepper@redhat.com>
2572 * allocatestack.c (queue_stack): Always inline.
2573 * ptreadhP.h (__do_cancel): Likewise.
2575 2003-06-10 Jakub Jelinek <jakub@redhat.com>
2577 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
2580 2003-06-10 Ulrich Drepper <drepper@redhat.com>
2582 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2583 (__pthread_cond_signal): Remove incorrect second addition for
2586 2003-06-09 Ulrich Drepper <drepper@redhat.com>
2588 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2589 (__pthread_cond_signal): Use correct futex pointer in
2590 __lll_mutex_lock_wait call.
2592 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2593 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
2595 2003-06-08 Ulrich Drepper <drepper@redhat.com>
2597 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
2599 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
2602 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
2603 hand-written CFI generation code. Since ENTRY/END also initiated
2604 CFI frames this caused two CFI sets to be generated.
2606 2003-06-07 Ulrich Drepper <drepper@redhat.com>
2608 * cleanup_routine.c: New file.
2609 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
2610 * sysdeps/pthread/pthread.h: Add support for fully exception-based
2612 * Makefile (libpthread-routines): Add cleanup_routine.
2613 Add more CFLAGS variables to compile with exceptions. Add comments
2614 why which file needs unwind tables.
2615 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
2617 * tst-cancelx1.c: New file.
2618 * tst-cancelx2.c: New file.
2619 * tst-cancelx3.c: New file.
2620 * tst-cancelx4.c: New file.
2621 * tst-cancelx5.c: New file.
2622 * tst-cancelx6.c: New file.
2623 * tst-cancelx7.c: New file.
2624 * tst-cancelx8.c: New file.
2625 * tst-cancelx9.c: New file.
2626 * tst-cancelx10.c: New file.
2627 * tst-cancelx11.c: New file.
2628 * tst-cancelx12.c: New file.
2629 * tst-cancelx13.c: New file.
2630 * tst-cancelx14.c: New file.
2631 * tst-cancelx15.c: New file.
2632 * tst-cleanupx0.c: New file.
2633 * tst-cleanupx0.expect: New file.
2634 * tst-cleanupx1.c: New file.
2635 * tst-cleanupx2.c: New file.
2636 * tst-cleanupx3.c: New file.
2638 * tst-cleanup0.c: Make standard compliant.
2639 * tst-cleanup1.c: Likewise.
2641 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
2642 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2643 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2644 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2645 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2646 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2647 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
2649 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2650 * tst-cancel12.c: New file.
2651 * tst-cancel13.c: New file.
2652 * tst-cancel14.c: New file.
2653 * tst-cancel15.c: New file.
2654 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
2657 * tst-cancel1.c: Add some comments.
2659 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
2662 2003-06-06 Ulrich Drepper <drepper@redhat.com>
2664 * Makefile (CFLAGS-pthread_cancel.c): Define.
2666 2003-06-05 Ulrich Drepper <drepper@redhat.com>
2668 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
2669 Change type of __writer element to int.
2670 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2671 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2672 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2673 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2674 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2675 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
2676 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2677 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
2678 Compare with TID to determine deadlocks.
2679 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
2680 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
2681 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
2682 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
2683 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2684 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2686 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2688 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2689 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2690 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2692 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2694 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2695 * Makefile (tests): Add tst-rwlock12.
2696 * tst-rwlock12.c: New file.
2698 2003-06-05 Jakub Jelinek <jakub@redhat.com>
2700 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
2701 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
2702 Remove bogus hidden_proto.
2703 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
2705 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
2706 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
2707 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
2708 ___lll_mutex_timedlock): Likewise.
2710 2003-06-04 Ulrich Drepper <drepper@redhat.com>
2712 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2713 (__pthread_cond_signal): Add some code to eventually handle
2716 2003-06-01 Ulrich Drepper <drepper@redhat.com>
2718 * Makefile (tests): Add tst-exec4.
2719 (tst-exec4-ARGS): Define.
2720 * tst-exec4.c: New file.
2722 2003-05-31 Ulrich Drepper <drepper@redhat.com>
2724 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2725 Also fail if tv_nsec < 0.
2726 (__lll_timedwait_tid): Likewise.
2727 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2728 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
2730 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
2732 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
2734 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
2736 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
2738 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
2741 * Makefile (tests): Add tst-sem8 and tst-sem9.
2742 * tst-sem8.c: New file.
2743 * tst-sem9.c: New file.
2744 * sem_open.c: Fix creation of in_use record if the file exists but
2747 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
2750 * sysdeps/pthread/timer_create.c (timer_create): In case
2751 evp==NULL, assign timer ID to sival_ptr.
2753 * descr.h (struct pthread_unwind_buf): Change type of prev element to
2754 struct pthread_unwind_buf *.
2755 (struct pthread): Likewise for cleanup_jmp_buf element.
2757 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
2758 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
2759 * unwind.c (__pthread_unwind_next): Likewise.
2761 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2763 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
2764 (lll_futex_timed_wait): Use int for futex value parameter.
2765 (lll_futex_wake): Likewise.
2766 (lll_futex_requeue): Likewise.
2768 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
2769 Replace one memory operation with one register operation.
2771 * tst-join4.c (do_test): Fix error message.
2773 * tst-rwlock6.c (do_test): Use correct format specifier.
2775 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
2776 (__lll_mutex_lock_wait): Replace one memory operation with one
2778 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
2779 (__lll_mutex_lock_wait): Likewise.
2781 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
2782 (__lll_mutex_cond_lock): Add one to value parameter of
2783 __lll_lock_wait to reflect reality in the futex syscall.
2784 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2785 (lll_mutex_cond_lock): Likewise.
2787 2003-05-30 Jakub Jelinek <jakub@redhat.com>
2789 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
2791 (lll_mutex_cond_lock): Define.
2793 2003-05-29 Ulrich Drepper <drepper@redhat.com>
2795 * Makefile (tests): Add tst-signal6.
2796 * tst-signal6.c: New file.
2798 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
2799 (__lll_mutex_unlock_force): New function
2800 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
2802 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
2803 (__lll_mutex_unlock_force): New function.
2804 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
2806 * tst-rwlock7.c (do_test): Use correct format specifier.
2808 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
2809 Find break parameter in correct asm argument.
2811 2003-05-27 Jakub Jelinek <jakub@redhat.com>
2813 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
2815 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
2817 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2819 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
2820 lll_futex_requeue, lll_mutex_unlock_force): Define.
2822 2003-05-30 Jakub Jelinek <jakub@redhat.com>
2824 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2825 (pthread_cond_t): Add __mutex.
2826 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
2827 lll_futex_requeue, lll_mutex_unlock_force): Define.
2829 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2831 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
2832 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2834 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
2836 (lll_futex_wait, lll_futex_wake): Define.
2837 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
2838 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
2839 FUTEX_REQUEUE instead of FUTEX_WAIT.
2840 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
2841 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
2842 mutex which was used in condvar structure. Call
2843 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
2844 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2846 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
2847 include tcb-offsets.h. Read wakeup value in locked region.
2848 Use the value of gbr register as THREAD_ID.
2849 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2850 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2851 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2853 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
2856 2003-05-28 Ulrich Drepper <drepper@redhat.com>
2858 * sysdeps/pthread/pthread_cond_broadcast.c
2859 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
2861 2003-05-26 Ulrich Drepper <drepper@redhat.com>
2863 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
2864 typo in register name.
2865 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
2866 correctly. Actually use requeue. Little optimization.
2867 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
2868 mutex address early. Handle cancellation state as 32-bit value.
2869 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2870 Remove unnecessary label.
2872 2003-05-25 Ulrich Drepper <drepper@redhat.com>
2874 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
2875 instead of FUTEX_WAIT.
2876 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
2877 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2878 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2879 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
2880 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2881 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
2882 used in condvar structure. Call __pthread_mutex_cond_lock instead
2883 of __pthread_mutex_lock_internal.
2884 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2885 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2886 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2887 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
2888 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2889 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2890 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
2891 Add pthread_mutex_cond_lock.
2892 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
2893 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
2894 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
2895 lll_mutex_cond_lock.
2896 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2897 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2898 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2900 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2901 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2903 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
2904 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2906 * pthreadP.h: Declare __pthread_mutex_cond_lock.
2907 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
2908 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
2909 macro don't define aliases.
2911 * cancellation.c: Remove __pthread_enable_asynccancel_2.
2912 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
2913 * sysdeps/pthread/pthread_cond_timedwait.c: Use
2914 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
2915 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2916 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2917 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2918 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2919 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2921 2003-05-17 Ulrich Drepper <drepper@redhat.com>
2923 * sem_open.c: Fix one endless loop. Implement correct semantics
2924 wrt opening the same semaphore more then once.
2925 * sem_close.c: Adjust for sem_open change.
2926 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
2927 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
2928 * Makefile (tests): Add tst-sem7.
2929 * tst-sem7.c: New file.
2931 2003-05-16 Roland McGrath <roland@redhat.com>
2933 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
2934 uninitialized variable braino.
2936 2003-05-16 Ulrich Drepper <drepper@redhat.com>
2938 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
2939 test for syscall availability.
2941 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
2942 __no_posix_timers to -1 if the syscalls don't exist.
2944 * pthread_join.c (pthread_join): Set tid field of the joined
2945 thread to -1. This isn't necessary but helps to recognize some
2946 error conditions with almost no cost.
2948 * allocatestack.c (FREE_P): Also negative values indicate an
2951 * unwind.c: Include <unistd.h>.
2953 2003-05-14 Ulrich Drepper <drepper@redhat.com>
2955 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
2957 2003-05-14 Jakub Jelinek <jakub@redhat.com>
2959 * Makefile (crti-objs, crtn-objs): New variables.
2960 (omit-deps, extra-objs): Add crtn.
2961 ($(objpfx)libpthread.so): Depend on both crti and crtn
2962 and links to them in multidir.
2963 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
2965 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
2967 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2968 (lll_mutex_unlock): Use atomic_exchange_rel.
2970 2003-05-11 Ulrich Drepper <drepper@redhat.com>
2972 * cond-perf.c (cons): Add missing locking around setting of alldone.
2974 2003-05-10 Ulrich Drepper <drepper@redhat.com>
2976 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
2978 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
2980 2003-05-09 Ulrich Drepper <drepper@redhat.com>
2982 * tst-sem6.c: New file.
2983 * Makefile (tests): Add tst-sem6.
2985 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
2986 Use atomic_exchange_rel instead of atomic_exchange.
2987 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
2990 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
2991 code for lll_futex_wait and lll_futex_wake in static apps. Use
2992 vsyscall is possible.
2994 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
2995 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
2996 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
2997 pthread_setaffinity_np.
2998 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
2999 and pthread_setaffinity_np.
3000 * Makefile (libpthread-routines): Add pthread_getaffinity and
3001 pthread_setaffinity.
3003 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
3004 use it in case mmap to allocate the stack fails.
3005 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
3006 ARCH_MAP_FLAGS here.
3007 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
3010 2003-05-08 Ulrich Drepper <drepper@redhat.com>
3012 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
3013 handler implementation. It is now lockless in fork().
3014 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3015 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3016 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
3017 declare the __fork_*_lists.
3018 (struct fork_handler): Include pointers to all three functions.
3019 Add next, refcntr and need_signal elements.
3020 (__fork_handlers): New declaration.
3021 (__register_atfork_malloc): Remove declaration.
3022 (HAVE_register_atfork_malloc): Remove definition.
3023 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
3024 __pthread_child_handler variable.
3025 (__libc_pthread_init): Use __register_atfork instead of explicitly
3027 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
3029 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3031 * unwind.c (unwind_cleanup): Print error message and then abort. This
3032 function must never be reached.
3034 * cond-perf.c: New file.
3036 2003-05-05 Ulrich Drepper <drepper@redhat.com>
3038 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
3040 2003-05-04 Roland McGrath <roland@redhat.com>
3042 * Makefile ($(objpfx)../libc.so): New target.
3044 2003-05-02 Ulrich Drepper <drepper@redhat.com>
3046 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3047 (pthread_condattr_t): Size is only an int, don't use long for
3049 (pthread_mutexattr_t): Likewise.
3050 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3051 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3052 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3054 2003-05-01 Ulrich Drepper <drepper@redhat.com>
3056 * sysdeps/i386/tls.h: Define THREAD_ID.
3057 * sysdeps/ia64/tls.h: Likewise.
3058 * sysdeps/powerpc/tls.h: Likewise.
3059 * sysdeps/s390/tls.h: Likewise.
3060 * sysdeps/sh/tls.h: Likewise.
3061 * sysdeps/x86_64/tls.h: Likewise.
3062 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
3064 * pthread_mutex_timedlock.c: Likewise.
3065 * pthread_mutex_trylock.c: Likewise.
3066 * pthread_mutex_unlock.c: Likewise.
3067 * pthread_rwlock_trywrlock.c: Likewise.
3068 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
3069 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
3070 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
3071 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3073 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
3076 2003-04-29 Jakub Jelinek <jakub@redhat.com>
3078 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
3079 (__SIZEOF_PTHREAD_COND_T): Define to 48.
3080 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
3081 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3082 Make __align long long instead of long.
3083 (pthread_rwlock_t): Formatting.
3084 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3085 (pthread_rwlock_t): Formatting.
3086 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3087 (pthread_cond_t): Make __align long long instead of long.
3088 (pthread_rwlock_t): Move __flags field to the same position as in
3091 2003-04-30 Ulrich Drepper <drepper@redhat.com>
3093 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
3094 * tst-rwlock7.c (do_test): Likewise.
3096 2003-04-26 Roland McGrath <roland@redhat.com>
3098 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
3100 2003-04-22 Jakub Jelinek <jakub@redhat.com>
3102 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
3103 sizeof (struct pthread).
3104 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
3106 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
3108 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
3110 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
3112 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
3114 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
3116 (NO_TLS_OFFSET): Define.
3117 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
3118 add TLS_TCB_SIZE unnecessarily.
3120 2003-04-22 Roland McGrath <roland@redhat.com>
3122 * Makeconfig (shared-thread-library): Reverse link order to work
3125 2003-04-22 Ulrich Drepper <drepper@redhat.com>
3127 * semaphore.h: Fix typo in comment.
3129 2003-04-21 Ulrich Drepper <drepper@redhat.com>
3131 * sysdeps/pthread/sigfillset.c: New file.
3133 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
3134 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
3135 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
3136 * sysdeps/pthread/sigaction.c: Likewise.
3137 * sysdeps/pthread/sigprocmask.c: New file.
3138 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
3140 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3141 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
3144 2003-04-19 Ulrich Drepper <drepper@redhat.com>
3146 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
3147 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
3149 * sysdeps/unix/sysv/linux/unregister-atfork.c
3150 (__unregister_atfork): Don't free memory not allocated dynamically.
3152 * semaphore.h: Remove __THROW marker from cancellation points.
3153 * nptl/sysdeps/pthread/pthread.h: Likewise.
3155 2003-04-18 Ulrich Drepper <drepper@redhat.com>
3157 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
3158 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
3161 2003-04-16 Jakub Jelinek <jakub@redhat.com>
3163 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
3165 2003-04-15 Roland McGrath <roland@redhat.com>
3167 * forward.c (__pthread_unwind): Tweak to avoid warning.
3169 2003-04-15 Ulrich Drepper <drepper@redhat.com>
3171 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
3173 2003-04-14 Ulrich Drepper <drepper@redhat.com>
3175 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
3176 overflow CFA advance instructions.
3177 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3179 2003-04-14 Jakub Jelinek <jakub@redhat.com>
3181 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
3182 * sysdeps/i386/pthread_spin_lock.c: Likewise.
3183 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
3186 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
3187 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
3188 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
3189 DW_CFA_advance_loc for .Laddl-.Lsubl.
3191 2003-04-13 Ulrich Drepper <drepper@redhat.com>
3193 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
3194 position-independent unwind data for static libraries.
3195 Add missing unwind info. Add comments.
3197 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
3198 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3199 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3200 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3202 2003-04-12 Ulrich Drepper <drepper@redhat.com>
3204 * Makefile: Make sure all cancellation points are compiled with
3205 exception and asynchronous unwind tables.
3207 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
3208 which mishandles loading of global object addresses in PIC.
3209 (THREAD_SETMEM_NC): Likewise.
3211 2003-04-11 Ulrich Drepper <drepper@redhat.com>
3213 * pthread.h: Define new data structure for cleanup buffer. Declare
3214 new cleanup handler interfaces.
3215 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
3216 (struct pthread): Add cleanup_jmp_buf pointer. Define
3217 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
3218 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
3219 it. Declare old cleanup handler installation functions.
3220 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
3222 * cleanup_defer.c: Likewise.
3223 * cleanup_compat.c: New file. Old cleanup code.
3224 * cleanup_def_compat.c: New file. Old cleanup code.
3225 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
3226 if own thread descriptor.
3227 * unwind.c: New file.
3228 * forward.c: Add __pthread_unwind.
3229 * init.c (pthread_functions): Add __pthread_unwind.
3230 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
3231 Add ptr___pthread_unwind.
3232 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
3233 and unwind function.
3234 * Makefile (libpthread-routines): Add cleanup_compat,
3235 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
3236 table generation if necessary.
3237 * version.c: Record whether unwind support is compiled in.
3238 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
3239 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
3241 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
3242 complication to generate unwind information for syscall wrappers.
3243 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3244 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3245 __cleanup_fct_attribute.
3247 * Makefile: Add rules to build and run tst-cleanup0.
3248 * tst-cleanup0.c: New file.
3249 * tst-cleanup0.expect: New file.
3251 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
3252 caller. Optimize to avoid often unecessary local variable.
3254 2003-04-11 Roland McGrath <roland@redhat.com>
3256 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
3257 sets variable `multidir'; include that.
3258 (generated): Add it.
3259 ($(objpfx)$(multidir)/crti.o): New target.
3260 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
3262 2003-04-11 Ulrich Drepper <drepper@redhat.com>
3264 * tst-attr2.c (do_test): Add cast to avoid warning.
3265 * tst-mutex4.c (do_test): Likewise.
3267 2003-04-10 Ulrich Drepper <drepper@redhat.com>
3269 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
3272 2003-04-09 Ulrich Drepper <drepper@redhat.com>
3274 * Makefile (tests): Add tst-detach1.
3275 * tst-detach1.c: New file.
3277 2003-04-08 Ulrich Drepper <drepper@redhat.com>
3279 * sysdeps/pthread/pthread.h: Remove duplicate
3280 pthread_cleanup_{push,pop} definitions.
3282 * tst-barrier2.c: Eliminate warnings.
3283 * tst-cancel4.c: Likewise.
3284 * tst-cond4.c: Likewise.
3285 * tst-cond6.c: Likewise.
3286 * tst-detach1.c: Likewise.
3287 * tst-rwlock4.c: Likewise.
3288 * tst-rwlock6.c: Likewise.
3289 * tst-rwlock7.c: Likewise.
3290 * tst-sem3.c: Likewise.
3291 * tst-spin2.c: Likewise.
3292 * tst-umask1.c: Likewise.
3294 2003-04-07 Ulrich Drepper <drepper@redhat.com>
3296 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
3298 2003-04-06 Ulrich Drepper <drepper@redhat.com>
3300 * descr.h (struct pthread): Move cancelhandling member to the front.
3302 2003-04-05 Ulrich Drepper <drepper@redhat.com>
3304 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
3305 malloc_parent, and malloc_child statically.
3306 (__register_atfork_malloc): New function.
3307 (free_mem): Don't free any of the malloc_* variables on the list.
3308 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
3309 Define HAVE_register_atfork_malloc.
3311 2003-04-04 Ulrich Drepper <drepper@redhat.com>
3313 * sysdeps/pthread/createthread.c (create_thread): Add some more
3314 comments explaining when to set multiple_threads and when not.
3316 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
3317 THREAD_ATOMIC_BIT_SET if not already defined.
3318 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
3319 THREAD_ATOMIC_BIT_SET:
3320 * sysdeps/x86_64/tls.h: Likewise.
3321 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
3322 THREAD_ATOMIC_CMPXCHG_VAL.
3323 (_pthread_cleanup_pop_restore): Likewise.
3324 * cancellation.c (__pthread_enable_asynccancel): Likewise.
3325 (__pthread_enable_asynccancel_2): Likewise.
3326 (__pthread_disable_asynccancel): Likewise.
3327 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
3328 (__libc_disable_asynccancel): Likewise.
3329 * init.c (sigcancel_handler): Likewise.
3330 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
3331 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
3333 2003-04-03 Ulrich Drepper <drepper@redhat.com>
3335 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
3336 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
3337 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
3338 * Makefile (tests): Add tst-cancel11.
3339 * tst-cancel11.c: New file.
3341 2003-04-01 Ulrich Drepper <drepper@redhat.com>
3343 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
3344 round, not the first. Use specific_used flag instead of local
3345 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
3346 (__free_tcb): Don't call deallocate_tsd here.
3347 (start_thread): Call deallocate_tsd here.
3348 * pthread_setspecific.c: Set specific_used flag really only when
3350 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
3351 * tst-tsd3.c: New file.
3352 * tst-tsd4.c: New file.
3354 2003-03-31 Ulrich Drepper <drepper@redhat.com>
3356 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
3357 Use atomic_exchange_and_add instead of __lll_add.
3358 (__lll_mutex_timedlock): Likewise.
3359 Patch by Ian Wienand.
3361 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
3363 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3364 (SINGLE_THREAD_P): Fix typo.
3365 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
3367 2003-03-31 Ulrich Drepper <drepper@redhat.com>
3369 * Makefile (tests): Add tst-align.
3370 * tst-align.c: New file.
3371 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
3373 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
3376 * tst-tsd2.c: Add casts to avoid warnings.
3378 2003-03-30 Ulrich Drepper <drepper@redhat.com>
3380 * descr.h (struct pthread): Move most often used elements to the front.
3382 2003-03-29 Ulrich Drepper <drepper@redhat.com>
3384 * Makefile (libpthread-routines): Add pthread_atfork.
3385 (libpthread-static-only-routines): Add pthread_atfork.
3387 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3389 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
3391 (INSTALL_DTV): Add parens.
3392 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
3393 Use passed descr instead of THREAD_SELF.
3394 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
3395 (__lll_mutex_timedlock_wait): Correct expected value after
3397 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
3398 Release lock before waking up the waiters.
3399 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
3400 criteria. Reorderstruct passed to cleanup handler. Fix
3401 handling of cancellation and failung pthread_mutex_unlock call.
3402 Use __pthread_enable_asynccancel_2 instead of
3403 __pthread_enable_asynccancel.
3404 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3405 Return result of lock re-get if it fails.
3406 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
3407 for __pthread_cleanup_push.
3408 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
3409 completely broken rwlock implementation.
3410 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3411 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3412 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3413 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3414 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3415 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
3416 versioned_symbol macro.
3417 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
3418 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
3420 2003-03-27 Ulrich Drepper <drepper@redhat.com>
3422 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
3423 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
3425 (struct timer): Remove th and bar field.
3426 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
3427 debugging code. Create only one helper thread.
3428 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
3430 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3431 Renamed. Define statically. Use thread info from siginfo.
3432 (__helper_once): New variable.
3433 (__helper_tid): New variable.
3434 (__reset_helper_control): New function.
3435 (__start_helper_thread): New function.
3437 * pthread_create.c (start_thread): Don't use setjmp inside
3438 __builtin_expect to work around gcc bug.
3440 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
3441 timer_delete syscall fails, but not with ENOSYS, set
3444 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
3445 (timer_settime): Fix typo.
3446 * sysdeps/unix/sysv/linux/timer_getoverr.c
3447 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
3449 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3451 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
3452 offset of cleanupbuf.__prev.
3454 2003-03-26 Jakub Jelinek <jakub@redhat.com>
3456 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
3459 2003-03-26 Ulrich Drepper <drepper@redhat.com>
3461 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
3462 NULL provide default definition to syscall.
3464 2003-03-25 Roland McGrath <roland@redhat.com>
3466 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
3467 (timer_id2ptr): Fix typo.
3469 2003-03-25 Ulrich Drepper <drepper@redhat.com>
3471 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
3472 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
3473 * sysdeps/ia64/pthreaddef.h: Likewise.
3474 * sysdeps/powerpc/pthreaddef.h: Likewise.
3475 * sysdeps/s390/pthreaddef.h: Likewise.
3476 * sysdeps/sh/pthreaddef.h: Likewise.
3477 * sysdeps/x86_64/pthreaddef.h: Likewise.
3478 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
3479 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
3481 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3482 SIGTIMER is not unblocked.
3483 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
3485 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
3487 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
3488 pass pointer through as ID.
3489 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
3490 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
3491 * sysdeps/unix/sysv/linux/timer_create.c: New file.
3492 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
3493 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
3494 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
3495 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
3496 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
3497 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
3498 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
3499 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
3500 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
3501 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
3502 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
3503 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
3504 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
3505 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
3506 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
3507 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
3508 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
3509 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
3510 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
3511 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
3512 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
3513 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
3514 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
3515 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
3516 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
3517 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
3518 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
3519 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
3520 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
3521 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
3523 * pthreadP.h: Remove FRAME_LEFT definition.
3524 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
3525 already left frame. Programs which have this problem are not POSIX
3527 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
3529 2003-03-24 Ulrich Drepper <drepper@redhat.com>
3531 * sysdeps/pthread/tst-timer.c: Check return values of the
3534 2003-03-23 Roland McGrath <roland@redhat.com>
3536 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
3537 * tst-tls3mod.c: Likewise.
3538 * tst-tls1.c: Likewise.
3539 * tst-tls2.c: Likewise.
3541 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
3544 * tst-join5.c (tf1, tf2): Add a cast.
3546 * Makeconfig (includes): Append -I$(..)nptl to this variable.
3548 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
3549 Don't test anything.
3550 * tst-cond4.c: Likewise.
3551 * tst-cond6.c: Likewise.
3552 * tst-flock2.c: Likewise.
3553 * tst-mutex4.c: Likewise.
3554 * tst-rwlock4.c: Likewise.
3555 * tst-signal1.c: Likewise.
3556 * tst-spin2.c: Likewise.
3557 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
3559 * tst-mutex4.c: Use test-skeleton.c.
3560 * tst-spin2.c: Likewise.
3561 * tst-sysconf.c: Likewise.
3562 * tst-barrier2.c: Likewise.
3563 * tst-cond4.c: Likewise.
3564 * tst-cond6.c: Likewise.
3565 * tst-rwlock4.c: Likewise.
3566 * tst-unload.c: Likewise.
3567 * tst-flock2.c (do_test): Use return instead of exit.
3569 2003-03-22 Jakub Jelinek <jakub@redhat.com>
3571 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
3573 2003-03-21 Ulrich Drepper <drepper@redhat.com>
3575 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
3576 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
3577 instead of __lll_compare_and_swap.
3578 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3580 Removed definition if __lll_compare_and_swap.
3582 * cancellation.c: Adjust for new form of compare&exchange macros.
3583 * cleanup_defer.c: Likewise.
3585 * libc-cancellation.c: Likewise.
3586 * old_pthread_cond_broadcast.c: Likewise.
3587 * old_pthread_cond_signal.c: Likewise.
3588 * old_pthread_cond_timedwait.c: Likewise.
3589 * old_pthread_cond_wait.c: Likewise.
3590 * pthread_cancel.c: Likewise.
3591 * pthread_create.c: Likewise.
3592 * pthread_detach.c: Likewise.
3593 * pthread_join.c: Likewise.
3594 * pthread_key_delete.c: Likewise.
3595 * pthread_setcancelstate.c: Likewise.
3596 * pthread_setcanceltype.c: Likewise.
3597 * pthread_timedjoin.c: Likewise.
3598 * pthread_tryjoin.c: Likewise.
3599 * sysdeps/pthread/createthread.c: Likewise.
3601 2003-03-20 Ulrich Drepper <drepper@redhat.com>
3603 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
3604 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
3605 definitions. Replace uses with calls to atomic_* functions.
3606 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3607 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
3608 __lll_test_and_set calls with atomic_exchange_and_add and
3609 atomic_exchange calls respectively.
3610 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3611 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3612 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
3613 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3614 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
3615 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
3616 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
3618 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
3619 returns the old value.
3621 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
3623 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
3624 int for variable OLDVAL and correct inline assembler contraint.
3625 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
3626 type int for variable OLD.
3628 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
3630 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3631 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
3632 instead of multiple_threads field in the TCB.
3634 2003-03-19 Ulrich Drepper <drepper@redhat.com>
3636 * sysdeps/i386/i686/bits/atomic.h: Removed.
3637 * sysdeps/i386/i586/bits/atomic.h: Removed.
3638 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
3639 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
3640 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
3641 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
3642 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
3643 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
3644 * atomic.h: Removed. Moved to glibc.
3646 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
3647 support for clock selection.
3649 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
3652 2003-03-18 Roland McGrath <roland@redhat.com>
3654 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
3655 Add __lll_rel_instr first. Add memory clobber.
3656 (lll_mutex_unlock): Use __lll_test_and_set.
3657 From Paul Mackerras <paulus@samba.org>.
3659 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
3661 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3662 (SINGLE_THREAD_P): Add `header.' prefix.
3663 From Paul Mackerras <paulus@samba.org>.
3665 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
3666 pthread_timedjoin_np to ...
3667 (libpthread: GLIBC_2.3.3): ... here.
3668 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
3670 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3671 Avoid shadowing VAL variable.
3673 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
3676 2003-03-18 Ulrich Drepper <drepper@redhat.com>
3678 * Makefile (tests): Add tst-cond11.
3679 * tst-cond11.c: New file.
3681 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
3682 struct passed to cleanup handler to eliminate one more
3684 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3686 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
3687 (pthrad_cond_t): Replace __unused field with __clock.
3689 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
3690 waken all waiters in cleanup handler.
3691 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3692 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3694 * pthread_condattr_getclock.c: New file.
3695 * pthread_condattr_setclock.c: New file.
3696 * sysdeps/pthread/pthread.h: Declare these new functions.
3697 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
3698 * Makefile (libpthread-routines): Add the new functions.
3699 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
3700 Renamed field to value. Document use of the bits.
3701 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
3703 * pthread_condattr_setpshared.c: Likewise.
3704 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
3705 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
3706 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3708 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3709 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3710 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3711 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3712 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3713 Implement clock selection.
3714 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
3715 * pthread-errnos.sym: Add ENOSYS.
3716 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3717 _POSIX_CLOCK_SELECTION.
3718 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3720 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
3721 invalid .size directive.
3723 2003-03-17 Roland McGrath <roland@redhat.com>
3725 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
3728 2003-03-17 Ulrich Drepper <drepper@redhat.com>
3730 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
3731 Use __lll_add instead of spelling it out. Use protected symbol names.
3732 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
3734 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
3735 Renamed from lll_compare_and_swap. Use new name where necessary.
3736 (__lll_add): Defined.
3737 (__lll_dec_if_positive): Defined.
3738 (__lll_test_and_set): Defined.
3739 * sysdeps/ia64/pthread_spin_init.c: Removed.
3740 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
3741 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
3742 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
3743 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
3744 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
3745 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
3746 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
3747 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
3748 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3749 __sync_lock_release_si.
3750 Patch by Jakub Jelinek.
3752 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
3753 Fix timeout handling.
3754 (__lll_timedwait_tid): Likewise.
3755 (lll_unlock_wake_cb): Wake up other waiters if necessary.
3756 Patch by Jakub Jelinek.
3758 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
3760 2003-03-17 Roland McGrath <roland@redhat.com>
3762 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
3763 * sysdeps/pthread/pthread_spin_init.c: New file.
3764 * sysdeps/pthread/pthread_spin_unlock.c: New file.
3765 * sysdeps/powerpc/Makefile: New file.
3766 * sysdeps/powerpc/pthread_spin_lock.c: New file.
3767 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
3768 * sysdeps/powerpc/pthreaddef.h: New file.
3769 * sysdeps/powerpc/tcb-offsets.sym: New file.
3770 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
3771 * sysdeps/powerpc/tls.h: New file.
3772 * sysdeps/powerpc/bits/atomic.h: New file.
3773 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
3774 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
3775 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
3777 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
3778 * sysdeps/unix/sysv/linux/sem_post.c: New file.
3779 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
3780 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
3781 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
3782 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
3783 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
3784 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
3785 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
3786 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
3787 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
3788 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
3789 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
3790 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
3791 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
3793 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
3795 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
3796 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
3797 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
3798 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
3799 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
3801 2003-03-17 Ulrich Drepper <drepper@redhat.com>
3803 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
3804 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
3805 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3806 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3807 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
3809 2003-03-16 Roland McGrath <roland@redhat.com>
3811 * tst-fork4.c: Include <string.h>.
3812 * tst-signal2.c: Likewise.
3813 * tst-mutex5.c (do_test): exit -> return.
3814 * tst-mutex2.c: Include <stdlib.h>.
3816 2003-03-16 Ulrich Drepper <drepper@redhat.com>
3818 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
3819 (__lll_mutex_timedlock_wait): Correct expected value after
3820 spurious wakeup. Otherwise we would never wait again.
3822 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
3823 zone versus inline asm stupidity. Use correct instructions.
3825 * tst-rwlock6.c: Add some more status output.
3827 2003-03-15 Roland McGrath <roland@redhat.com>
3829 * sysdeps/pthread/configure.in: New file.
3830 * sysdeps/pthread/configure: New file (generated).
3832 2003-03-15 Ulrich Drepper <drepper@redhat.com>
3834 * allocatestack.c (allocate_stack): Store the exact stack size of
3835 user allocated stacks.
3837 2003-03-15 Jakub Jelinek <jakub@redhat.com>
3839 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3840 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
3841 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
3842 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
3843 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3844 Use `header.' prefix.
3845 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
3847 2003-03-15 Ulrich Drepper <drepper@redhat.com>
3849 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
3850 __builtin_frame_address, use stack pointer.
3852 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
3853 instead of __builtin_frame_pointer.
3855 2003-03-14 Ulrich Drepper <drepper@redhat.com>
3857 * tst-basic1.c (do_test): Add cast to avoid warning.
3858 * tst-basic2.c (do_test): Likewise.
3860 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
3861 amount of stack correction.
3863 * tst-fork4.c: Use test-skeleton.c.
3865 2003-03-14 Roland McGrath <roland@redhat.com>
3867 * init.c: Fix typo "#eli" for "#else".
3869 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
3871 * allocatestack.c (__stack_user): Use hidden_data_def.
3872 * pthread_create.c (__pthread_keys): Likewise.
3874 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
3876 2003-03-14 Roland McGrath <roland@redhat.com>
3878 * tst-fork4.c: New file.
3879 * Makefile (tests): Add it.
3881 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
3882 we always define the padding space.
3883 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
3884 stopped supporting its own extensions fully.
3885 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
3886 struct also called `header', so `header.multiple_threads' is the field
3887 name to use on all machines.
3888 * allocatestack.c (allocate_stack): Use `header.' prefix.
3889 * sysdeps/pthread/createthread.c (create_thread): Likewise.
3890 * pthread_create.c (__pthread_create_2_1): Likewise.
3891 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
3892 (THREAD_SELF): Likewise.
3893 * sysdeps/x86_64/tls.h: Likewise.
3894 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
3895 (SINGLE_THREAD_P): Likewise.
3896 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
3897 (SINGLE_THREAD_P): Likewise.
3898 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3899 (SINGLE_THREAD_P): Likewise.
3901 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
3904 2003-03-14 Ulrich Drepper <drepper@redhat.com>
3906 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
3907 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
3909 * pthread_create.c (start_thread): setjmp is expected to return 0.
3911 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
3912 (THREAD_GETMEM_NC): Likewise.
3914 2003-03-13 Ulrich Drepper <drepper@redhat.com>
3916 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
3917 and the size of the stack which must be allocated is a multiple,
3918 allocate one more page.
3919 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
3920 MULTI_PAGE_ALIASING.
3922 2003-03-13 Roland McGrath <roland@redhat.com>
3924 * pthread_create.c (start_thread): Set EXITING_BIT after the
3925 event-reporting (and destructors), not before.
3927 2003-03-13 Jakub Jelinek <jakub@redhat.com>
3929 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
3930 lll_futex_wake): Declare register variables as long int instead of
3931 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
3932 Make syscall arguments clobbered by the syscall.
3933 (lll_futex_wait): Define using lll_futex_timed_wait.
3935 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
3938 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
3941 * allocatestack.c (nptl_ncreated): Only declare if
3942 COLORING_INCREMENT != 0.
3944 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
3945 (__libc_enable_asynccancel_2): Remove prototype.
3947 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
3948 ctid to match kernel.
3950 2003-03-12 Ulrich Drepper <drepper@redhat.com>
3952 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
3953 libc_multiple_threads.
3954 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
3955 __libc_multiple_threads to...
3956 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
3958 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
3960 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
3961 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3963 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
3964 (__pthread_once_internal): Define.
3966 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
3967 macros instead of .symver directly.
3968 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3969 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3971 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
3972 * sysdeps/x86_64/tcb-offsets.sym: New file.
3973 * sysdeps/x86_64/Makefile: New file.
3975 * sysdeps/i386/tcb-offsets.sym: Add SELF.
3976 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
3977 to access own pthread_t in TCB.
3978 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3980 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3982 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3984 2003-03-12 Roland McGrath <roland@redhat.com>
3986 * pthread-errnos.sym: New file.
3987 * Makefile (gen-as-const-headers): New variable, list that file.
3988 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
3989 header <pthread-errnos.h> instead of defining errno values here.
3990 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3991 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3992 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3993 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3994 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3996 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3998 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3999 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4000 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
4001 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4002 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4003 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4004 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4005 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4006 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4007 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
4008 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4009 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
4010 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
4011 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
4012 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
4013 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4014 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4015 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4016 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4017 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
4018 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
4019 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
4020 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
4021 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
4022 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
4023 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4024 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4026 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
4027 CLONE_CHILD_SETTID worked.
4029 2003-03-12 Ulrich Drepper <drepper@redhat.com>
4031 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
4033 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
4036 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4037 (pthread_cond_t): Add padding.
4039 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
4040 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
4041 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
4043 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
4044 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
4045 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
4046 (__pthread_rwlock_timedrdlock): Likewise.
4047 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
4048 (__pthread_rwlock_wrlock): Likewise.
4049 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
4050 (__pthread_rwlock_rdlock): Likewise.
4052 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
4054 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
4055 result of lock re-get if it fails.
4057 2003-03-11 Ulrich Drepper <drepper@redhat.com>
4059 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
4060 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4061 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
4062 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4063 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4064 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4065 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4066 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4067 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4068 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4070 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
4071 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
4073 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
4074 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
4075 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
4076 (create_thread): Likewise.
4077 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
4078 * init.c (__pthread_initialize_minimal_internal): Initialize
4079 __libc_multiple_threads_ptr if necessary.
4080 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
4081 __pthread_multiple_threads and __libc_multiple_threads_ptr.
4082 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
4083 __libc_multiple_threads.
4084 (__libc_pthread_init): Return pointer to __libc_pthread_init if
4087 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
4088 (THREAD_SETMEM_NC): Likewise.
4090 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
4091 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
4092 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
4093 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
4095 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
4096 Eliminate one entire instruction.
4098 * cancellation.c (__pthread_enable_asynccancel_2): New function.
4099 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
4100 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4101 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
4102 instead of __pthread_enable_asynccancel.
4103 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4104 (__pthread_cond_wait): Likewise.
4105 * sysdeps/pthread/pthread_cond_timedwait.c
4106 (__pthread_cond_timedwait): Likewise.
4107 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4109 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4110 (__condvar_cleanup): Wake up all waiters in case we got signaled
4111 after being woken up but before disabling asynchronous
4113 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
4114 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4115 (__condvar_cleanup): Likewise.
4117 * init.c (__NR_set_tid_address): If already defined, don't redefine.
4118 Make it an error if architecture has no #if case. Add x86-64.
4120 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
4121 pt-initfini.s generation.
4123 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
4124 (TLS_INIT_TP): Fix typo.
4126 2003-03-11 Jakub Jelinek <jakub@redhat.com>
4128 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
4129 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
4131 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
4132 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
4133 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
4134 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
4135 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
4136 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
4137 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
4138 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
4140 2003-03-11 Ulrich Drepper <drepper@redhat.com>
4142 * sysdeps/pthread/pthread_cond_timedwait.c
4143 (__pthread_cond_timedwait): Return the result of the final
4144 locking. If it succeeds, the regular function return value.
4146 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
4147 Return result of the final locking.
4148 * version.c (__nptl_main): Work around problems with the strange
4149 INTERNAL_SYSCALL macro on ppc32.
4150 * init.c (__pthread_initialize_minimal_internal): Unblock
4151 SIGCANCEL in case the parent blocked it.
4152 Reported by Paul Mackerras <paulus@samba.org>.
4154 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
4155 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
4156 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
4158 2003-03-11 Jakub Jelinek <jakub@redhat.com>
4160 * sysdeps/pthread/pthread_cond_timedwait.c
4161 (__pthread_cond_timedwait): Unlock and fail if
4162 __pthread_mutex_unlock_internal failed.
4164 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
4165 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
4167 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
4168 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
4169 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
4170 ALLOCATE_STACK): New macros.
4171 (TLS_TPADJ): New macro.
4172 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
4173 (allocate_stack): Handle TLS_DTV_AT_TP and
4174 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
4175 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
4177 * init.c [__ia64__] (__NR_set_tid_address): Define.
4179 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
4180 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
4181 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
4182 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
4183 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
4184 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
4185 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
4186 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
4187 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
4188 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
4189 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
4190 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
4191 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
4192 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
4193 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
4194 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
4195 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
4196 * sysdeps/ia64/bits/atomic.h: New file.
4197 * sysdeps/ia64/Makefile: New file.
4198 * sysdeps/ia64/pthread_spin_init.c: New file.
4199 * sysdeps/ia64/pthread_spin_lock.c: New file.
4200 * sysdeps/ia64/pthread_spin_trylock.c: New file.
4201 * sysdeps/ia64/pthread_spin_unlock.c: New file.
4202 * sysdeps/ia64/pthreaddef.h: New file.
4203 * sysdeps/ia64/tcb-offsets.sym: New file.
4204 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
4205 * sysdeps/ia64/tls.h: New file.
4207 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
4208 to syscall instead of no arguments.
4210 2003-03-10 Ulrich Drepper <drepper@redhat.com>
4212 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
4213 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
4214 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
4215 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
4217 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
4220 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
4222 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4223 lowlevelbarrier.sym.
4224 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
4225 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
4226 Include lowlevelbarrier.h and don't define offsets locally.
4227 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
4229 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4230 (__lll_mutex_lock_wait): Reverse order of first two parameters.
4231 (__lll_mutex_timedlock_wait): Likewise.
4232 (lll_mutex_lock): Adjust asm for that.
4233 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
4234 (lll_lock): Adjust asm for operand order change.
4235 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
4236 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
4238 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
4239 Reverse order of parameters.
4240 (__lll_timedwait_tid): Remove regparms attribute.
4241 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
4242 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
4244 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4245 (__lll_timedwait_tid): Remove one unnecessary instruction.
4247 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
4248 __lll_mutex_timedlock_wait only for NOT_IN_libc.
4249 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
4252 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
4253 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
4255 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
4258 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
4259 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
4261 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
4262 define LOCK here (if UP is not defined). The actual code is in
4265 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
4266 LOCK is already defined. Don't define lll_unlock_wake_cb and
4267 __lll_timedwait_tid for libc.so.
4268 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
4269 define LOCK here (if UP is not defined). The actual code is in
4272 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
4273 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
4274 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
4275 instead of lowlevelsem.h.
4276 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
4277 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
4278 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
4280 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4282 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
4283 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
4284 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
4286 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
4288 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
4291 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
4293 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
4294 of __libc_locking_needed.
4295 (lll_trylock): Initialize %eax to zero.
4297 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
4298 pthread_cond_t definition.
4300 2003-03-10 Roland McGrath <roland@redhat.com>
4302 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
4303 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
4304 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
4305 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
4306 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
4308 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
4309 Instead of setting PD->multiple_threads, set globals
4310 __pthread_multiple_threads and __libc_multiple_threads.
4311 * sysdeps/pthread/createthread.c (create_thread): Likewise.
4312 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
4313 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
4315 * descr.h (struct pthread): Conditionalize first member on
4316 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
4317 containing an anonymous tcbhead_t. Move `list' member out.
4318 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
4319 * allocatestack.c: Remove use of `header.data.' prefix.
4320 * pthread_create.c: Likewise.
4321 * init.c (__pthread_initialize_minimal_internal): Likewise.
4322 * sysdeps/pthread/createthread.c (create_thread): Likewise.
4323 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
4324 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
4325 * sysdeps/x86_64/tls.h: Likewise.
4326 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
4327 (SINGLE_THREAD_P): Likewise.
4328 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
4329 (SINGLE_THREAD_P): Likewise.
4330 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
4331 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
4333 2003-03-09 Ulrich Drepper <drepper@redhat.com>
4335 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
4337 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
4338 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
4340 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
4341 leftovers from the ia32 code.
4343 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
4345 (clear_once_control): Don't load %esi.
4347 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
4350 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
4352 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
4353 * sysdeps/unix/sysv/linux/createthread.c: ...here.
4355 * Makefile (tests): Add tst-cond10.
4356 * tst-cond10.c: New file.
4358 2003-03-08 Ulrich Drepper <drepper@redhat.com>
4360 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
4361 * tst-signal3.c (do_test): Likewise.
4362 * tst-sem5.c (do_test): Likewise.
4363 * tst-kill6.c (do_test): Likewise.
4364 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
4366 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
4368 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
4369 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
4370 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4371 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
4372 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4373 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4374 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4376 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4378 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4379 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4380 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4381 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
4382 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
4383 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4384 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
4385 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4387 * allocatestack.c (allocate_stack): If mprotect() fails free the
4390 2003-03-07 Ulrich Drepper <drepper@redhat.com>
4392 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
4394 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
4395 lll_wake_tid. This was used only to work around kernel limits in
4397 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4398 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
4399 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
4400 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4402 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
4403 (__pthread_initialize_minimal_internal): Change initialization of
4404 __static_tls_align_m1 appropriately.
4405 * pthreadP.h (__static_tls_align_m1): Renamed from
4407 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
4408 instead of __static_tls_align-1.
4410 2003-03-04 Ulrich Drepper <drepper@redhat.com>
4412 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
4414 * pthread_create.c: Define __pthread_keys using nocommon
4415 attribute, not by placing it explicitly in bss.
4416 Remove DEFINE_DEALLOC definition. Not needed anymore.
4418 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
4419 Use it in mmap call to allocate stacks.
4421 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
4423 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
4424 result of the thread function.
4426 2003-03-03 Ulrich Drepper <drepper@redhat.com>
4428 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
4429 version is just fine.
4431 * sysdeps/unix/sysv/linux/libc_pthread_init.c
4432 (__pthread_child_handler): Renamed from pthread_child_handler,
4433 exported, and marked hidden. Change all users.
4434 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
4435 free __pthread_child_handler from child list.
4437 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
4439 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
4441 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4442 Fix handling of cancellation and failing pthread_mutex_unlock call.
4443 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
4444 (__pthread_cond_wait): Likewise.
4446 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4447 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
4448 lll_futex_timed_wait call.
4449 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4450 (pthread_rwlock_timedwrlock): Likewise.
4452 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
4453 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
4454 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
4456 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
4457 check of lll_futex_wake return value.
4459 2003-03-03 Roland McGrath <roland@redhat.com>
4461 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
4463 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4464 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
4465 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
4467 2003-03-02 Ulrich Drepper <drepper@redhat.com>
4469 * sysdeps/pthread/timer_create.c (timer_create): Return correct
4470 error for CPU clocks.
4472 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4473 _POSIX_MONOTONIC_CLOCK.
4474 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4476 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
4479 2003-03-01 Ulrich Drepper <drepper@redhat.com>
4481 * descr.h (struct pthread): Move cleanup field to the front.
4483 2003-03-01 Roland McGrath <roland@redhat.com>
4485 * sem_open.c (sem_open): Braino fix.
4487 2003-03-01 Ulrich Drepper <drepper@redhat.com>
4489 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
4490 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
4491 __pthread_cleanup_pop functionality.
4492 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4494 * descr.h (struct pthread): Move tid field to the front now that
4497 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
4498 (__lll_mutex_timedlock_wait): Remove.
4499 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
4500 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
4501 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
4502 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4503 (lll_unlock_wake_cb): Don't save and restore %esi.
4504 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
4506 (__lll_timedwait_tid): Add alignment.
4507 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
4508 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
4510 (__lll_timedwait_tid): Removed.
4511 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
4512 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
4513 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4514 (pthread_barrier_wait): Don't save, load, and restore %esi for
4516 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4517 (__pthread_cond_signal): Don't save, load, and restore %esi.
4518 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
4519 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
4520 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
4521 Don't save, load, and restore %esi.
4523 2003-02-27 Ulrich Drepper <drepper@redhat.com>
4525 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
4526 Release lock before waking up the waiters.
4528 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
4530 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
4531 (reader_thread): Likewise.
4533 * sysdeps/pthread/pthread_rwlock_unlock.c
4534 (__pthread_rwlock_unlock): Release internal lock early. Don't try
4535 to wake up readers if there are none.
4537 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
4538 Release internal lock before wake threads.
4540 2003-02-26 Ulrich Drepper <drepper@redhat.com>
4542 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
4543 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
4545 * tst-rwlock9.c: Likewise.
4546 * tst-rwlock10.c: New file.
4547 * tst-rwlock11.c: New file.
4549 * Makefile (tests): Add tst-dlsym1.
4550 * tst-dlsym1.c: New file.
4552 * init.c (__pthread_initialize_minimal_internal): Set
4553 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
4554 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
4556 2003-02-24 Ulrich Drepper <drepper@redhat.com>
4558 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
4560 * tst-cond2.c: Fix sychronization with child.
4562 * tst-rwlock8.c (reader_thread): Remove unused variable.
4564 * Makefile: Add rules to build and run tst-tls3.
4565 * tst-tls3.c: New file.
4566 * tst-tls3mod.c: New file.
4568 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
4569 * tst-rwlock8.c: New file.
4570 * tst-rwlock9.c: New file.
4571 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
4572 complete broken rwlock implementation.
4573 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4575 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4577 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4578 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4579 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
4580 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4581 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4582 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
4583 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4585 2003-02-23 Roland McGrath <roland@redhat.com>
4587 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
4589 2003-02-23 Ulrich Drepper <drepper@redhat.com>
4591 * Makefile (tests): Add tst-context1.
4592 * tst-context1.c: New file.
4594 * Makefile (tests): Add tst-tls1 and tst-tls2.
4595 * tst-tls1.c: New file.
4596 * tst-tls2.c: New file.
4598 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
4601 * pthread_create.c (start_thread): Set EXITING_BIT early.
4603 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
4604 (THREAD_GETMEM_NC): Likewise.
4606 2003-02-22 Ulrich Drepper <drepper@redhat.com>
4608 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
4609 off 3 more bytes by using offset-less instructions when possible.
4611 * Makefile: Add dependency for $(objpfx)version.d.
4613 * eintr.c (eintr_source): Add unnecessary return but the compiler
4616 * tst-kill3.c: Include <unistd.h>.
4618 2003-02-21 Roland McGrath <roland@redhat.com>
4620 * pthread_create.c (start_thread): Call __libc_thread_freeres.
4622 2003-02-21 Ulrich Drepper <drepper@redhat.com>
4624 * Makefile (tests): Add tst-eintr1.
4625 (distribute): Add eintr.c.
4626 * tst-eintr1.c: New file.
4627 * eintr.c: New file.
4629 * pthread_cancel.c (pthread_cancel): Use tkill directly.
4631 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
4632 Disallow sending SIGCANCEL.
4634 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
4635 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
4636 * tst-kill1.c: New file.
4637 * tst-kill2.c: New file.
4638 * tst-kill3.c: New file.
4639 * tst-kill5.c: New file.
4640 * tst-kill6.c: New file.
4641 * tst-basic7.c: Renamed to...
4642 * tst-kill4.c: ...this.
4644 2003-02-21 Roland McGrath <roland@redhat.com>
4646 * Makefile (install-lib-ldscripts): New variable.
4648 2003-02-21 Ulrich Drepper <drepper@redhat.com>
4650 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
4651 * pthread_cancel.c: Use INVALID_TD_P.
4652 * pthread_detach.c: Likewise.
4653 * pthread_getschedparam.c: Likewise.
4654 * pthread_setschedparam.c: Likewise.
4655 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
4656 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4657 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
4658 * pthread_timedjoin.c: Likewise.
4660 * tst-basic7.c: Include <signal.h>.
4662 * pthread_join.c (pthread_join): Limited checking for invalid
4664 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
4666 2003-02-20 Ulrich Drepper <drepper@redhat.com>
4668 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
4669 beginning of the loop. Clear the entire first block of TSD.
4670 * Makefile (tests): Add tst-key4.
4671 * tst-key4.c: New file.
4673 2003-02-18 Ulrich Drepper <drepper@redhat.com>
4675 * Makefile (tests): Add tst-basic7.
4676 * tst-basic7.c: New file.
4678 * pthread_create.c (deallocate_tsd): Mark as internal_function.
4679 Add some more __builtin_expect.
4681 * pthreadP.h: Define dummy version of DEBUGGING_P.
4683 2003-02-17 Ulrich Drepper <drepper@redhat.com>
4685 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
4686 _POSIX_THREAD_PRIORITY_SCHEDULING.
4687 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
4688 _XOPEN_REALTIME_THREADS.
4689 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
4691 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
4692 kernel returns EINVAL for PID <= 0, work around it.
4694 * Makefile (tests): Add tst-signal5.
4695 * tst-signal5.c: New file.
4697 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
4700 * tst-cancel1.c (tf): Block all signals.
4702 * Makefile (tests): Add tst-basic6.
4703 * tst-basic6.c: New file.
4705 * tst-basic1.c: Add test for process ID.
4707 * Makefile (tests): Add tst-cancel10.
4708 * tst-cancel10.c: New file.
4710 * Makefile (tests): Add tst-signal4.
4711 * tst-signal4.c: New file.
4713 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
4714 __sigismember instead of sigismember. Add __builtin_expect.
4716 2003-02-16 Ulrich Drepper <drepper@redhat.com>
4718 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
4719 pthread_setcancelstate, and pthread_rwlock_setpshared.
4721 * tst-cancel7.c (do_test): Make sure the pid file exists before
4722 canceling the thread.
4724 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
4725 pthread_rwlock_timedrdlock tests.
4726 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
4727 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4728 Check for invalid tv_nsec field.
4729 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4732 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
4733 recursive mutex of overflow.
4735 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
4737 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
4738 going into an endless loop.
4739 * Makefile (tests): Add tst-cancel9.
4740 * tst-cancel9.c: New file.
4742 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
4744 2003-02-15 Ulrich Drepper <drepper@redhat.com>
4746 * tst-mutex5.c (do_test): Add more timedlock tests.
4748 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
4749 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
4751 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4752 use INLINE_SYSCALL. Error number is returned, not -1.
4754 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
4755 and __deallocate_stack with internal_function.
4756 * pthread_create.c: Adjust definitions appropriately.
4757 * allocatestack.c: Likewise.
4759 * pthread_join.c: Add one more __builtin_expect.
4760 * pthread_timedjoin.c: Likewise.
4762 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
4763 not data of sequence number does not match.
4764 Add one __builtin_expect.
4766 * Makefile (tests): Add tst-clock1.
4767 * tst-clock1.c: New file.
4769 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
4771 * Makefile (tests): Add tst-basic5.
4772 * tst-basic5.c: New file.
4774 2003-02-14 Ulrich Drepper <drepper@redhat.com>
4776 * Makefile (tests): Add tst-basic4.
4777 * tst-basic4.c: New file.
4779 * pthreadP.h: Add declaraction for __nptl_nthreads.
4780 * pthread_create.c: Define __nptl_nthreads
4781 (start_thread): Increment __nptl_nthreads at beginning. Decrement
4782 after thread is done. If then zero, call exit(0).
4783 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4784 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
4785 * init.c (pthread_functions): Initialize ptr_nthreads.
4786 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
4787 (__reclaim_stacks): Decrement __nptl_nthreads.
4788 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
4790 * Makefile (tests): Add tst-basic3.
4791 * tst-basic3.c: New file.
4793 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
4794 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
4795 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
4796 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
4797 if asynchronous canceling is enabled.
4798 * pthread_join.c (pthread_join): When recognizing circular joins,
4799 take into account the other thread might be already canceled.
4800 * Makefile (tests): Add tst-join5.
4801 * tst-join5.c: New file.
4803 * Makefile (tests): Add tst-join4.
4804 * tst-join4.c: New file.
4806 2003-02-13 Ulrich Drepper <drepper@redhat.com>
4808 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
4810 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
4812 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
4813 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
4814 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
4816 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
4818 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
4819 error if lll_futex_wake failed.
4821 2003-02-13 Ulrich Drepper <drepper@redhat.com>
4823 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
4824 handling of cancellation and failung pthread_mutex_unlock call.
4825 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4826 * Makefile (tests): Add tst-cond8 and tst-cond9.
4827 * tst-cond8.c: New file.
4828 * tst-cond9.c: New file.
4830 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
4832 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
4833 non-standard initializers with __USE_GNU.
4835 * Makefile (tests): Add tst-cleanup3.
4836 * tst-cleanup3.c: New file.
4838 2003-02-12 Ulrich Drepper <drepper@redhat.com>
4840 * Makefile (tests): Add tst-attr1 and tst-attr2.
4841 * tst-attr1.c: New file.
4842 * tst-attr2.c: New file.
4844 * Makefile: Add rules to build and run tst-atfork2 test.
4845 * tst-atfork2.c: New file.
4846 * tst-atfork2mod.c: New file.
4848 * sysdeps/unix/sysv/linux/unregister-atfork.c
4849 (__unregister_atfork): Free the memory allocated for the handlers
4850 after removing them from the lists.
4852 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
4855 * tst-atfork1.c (do_test): Wait for the child we forked.
4856 Report error in child.
4858 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
4860 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
4862 2003-02-10 Ulrich Drepper <drepper@redhat.com>
4864 * Makefile (tests): Add tst-cancel8.
4865 * tst-cancel8.c: New file.
4867 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
4868 clearing of control variable.
4869 * Makefile (tests): Add tst-once3 and tst-once4.
4870 * tst-once3.c: New file.
4871 * tst-once4.c: New file.
4873 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
4875 * sysdeps/sh/Makefile: New file.
4876 * sysdeps/sh/bits/atomic.h: New file.
4877 * sysdeps/sh/pthread_spin_init.c: New file.
4878 * sysdeps/sh/pthread_spin_lock.c: New file.
4879 * sysdeps/sh/pthread_spin_trylock.S: New file.
4880 * sysdeps/sh/pthread_spin_unlock.S: New file.
4881 * sysdeps/sh/pthreaddef.h: New file.
4882 * sysdeps/sh/tcb-offsets.sym: New file.
4883 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
4884 * sysdeps/sh/tls.h: New file.
4885 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
4886 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
4887 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
4888 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
4889 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
4890 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
4891 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
4892 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
4893 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
4894 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
4895 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
4896 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
4897 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
4898 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
4899 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
4900 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
4901 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
4902 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
4903 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
4904 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
4905 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
4906 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
4907 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
4908 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
4909 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
4910 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
4911 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
4912 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
4913 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
4914 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
4916 2003-02-08 Ulrich Drepper <drepper@redhat.com>
4918 * tst-cond2.c: Rearrange code to not rely on behavior undefined
4921 * tst-basic2.c (do_test): Lock mutex before creating the thread.
4923 2003-02-07 Ulrich Drepper <drepper@redhat.com>
4925 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
4926 (TLS_GET_FS): New #define.
4927 (TLS_SET_FS): New #define.
4928 Correct value of __NR_set_thread_area.
4930 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
4932 2003-02-06 Ulrich Drepper <drepper@redhat.com>
4934 * Makefile (tests): Add tst-popen1.
4935 * tst-popen1.c: New file.
4937 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
4938 but inactive generalization.
4939 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4940 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
4941 Minor optimization, remove one instruction.
4942 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
4944 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
4946 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
4948 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
4950 * init.c (__NR_set_tid_address): Add #ifdef for s390.
4951 * sysdeps/pthread/pthread_barrier_wait.c: New file.
4952 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
4953 * sysdeps/pthread/pthread_cond_signal.c: New file.
4954 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
4955 * sysdeps/pthread/pthread_cond_wait.c: New file.
4956 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
4957 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
4958 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
4959 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
4960 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
4961 * sysdeps/s390/Makefile: New file.
4962 * sysdeps/s390/bits/atomic.h: New file.
4963 * sysdeps/s390/pthread_spin_init.c: New file.
4964 * sysdeps/s390/pthread_spin_lock.c: New file.
4965 * sysdeps/s390/pthread_spin_trylock.c: New file.
4966 * sysdeps/s390/pthread_spin_unlock.c: New file.
4967 * sysdeps/s390/pthreaddef.h: New file.
4968 * sysdeps/s390/tcb-offsets.sym: New file.
4969 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
4970 * sysdeps/s390/tls.h: New file.
4971 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
4972 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
4973 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
4974 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
4975 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
4976 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
4977 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
4978 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
4979 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
4980 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
4981 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
4982 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
4983 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
4984 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
4985 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
4986 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
4987 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
4988 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
4989 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
4990 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
4991 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
4992 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
4993 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
4995 2003-02-04 Ulrich Drepper <drepper@redhat.com>
4997 * atomic.h: Add a couple more default implementations.
4998 (atomic_compare_and_exchange_acq): Use
4999 __arch_compare_and_exchange_32_acq in return value definition. It
5001 (atomic_bit_set): Renamed from atomic_set_bit.
5002 Add missing atomic_ prefixes.
5004 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
5005 thread library is available, use correct value to mark initialized
5008 2003-02-03 Ulrich Drepper <drepper@redhat.com>
5010 * allocatestack.c (allocate_stack): Use __getpagesize instead of
5011 __sysconf to determine pagesize.
5013 * pthread_create.c: Include <atomic.h>.
5014 * allocatestack.c (allocate_stack): Implement coloring of the
5015 allocated stack memory. Rename pagesize to pagesize_m1. It's the
5016 size minus one. Adjust users.
5017 * sysdeps/i386/i686/Makefile: New file.
5019 2003-02-02 Ulrich Drepper <drepper@redhat.com>
5021 * allocatestack.c: Improve comment throughout the file.
5023 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5024 (__lll_lock_wait): Add branch prediction.
5025 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
5026 (__lll_lock_wait): Likewise.
5027 (lll_unlock_wake_cb): Removed.
5029 2003-01-31 Ulrich Drepper <drepper@redhat.com>
5031 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
5032 _POSIX_THREAD_PRIORITY_SCHEDULING.
5034 2003-01-30 Jakub Jelinek <jakub@redhat.com>
5036 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5037 Fix return type of ptr___pthread_getspecific.
5039 2003-01-29 Ulrich Drepper <drepper@redhat.com>
5041 * Makefile (tests): Add tst-umask1.
5042 (tst-umask1-ARGS): Define.
5043 * tst-umask1.c: New file.
5045 2003-01-28 Ulrich Drepper <drepper@redhat.com>
5047 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
5048 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
5049 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
5050 pthread_rwlock_unlock.
5051 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
5052 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
5053 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
5054 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
5055 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5057 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
5058 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5060 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
5061 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
5062 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
5064 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
5065 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
5067 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
5068 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
5069 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
5071 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
5072 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
5074 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
5076 * Makefile (libpthread-routines): Remove lowlevelcond and
5077 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
5078 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
5079 and pthread_cond_broadcast.
5080 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
5081 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
5082 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
5083 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
5084 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
5085 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
5086 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
5087 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
5088 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
5089 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
5090 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
5091 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
5092 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
5093 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
5094 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
5095 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
5096 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
5097 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
5098 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
5099 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
5100 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
5101 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
5102 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
5103 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
5104 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
5105 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
5106 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
5107 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
5108 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
5109 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
5110 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
5112 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
5113 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
5114 of the code is moved to ...
5115 * sysdeps/pthread/createthread.c: ...here. New file.
5117 2003-01-27 Ulrich Drepper <drepper@redhat.com>
5119 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
5120 (__new_sem_post): Clear %eax before returning.
5121 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
5123 * Makefile (tests): Add tst-cleanup2.
5124 * tst-cleanup2.c: New file.
5126 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
5127 Interpret first parameter correctly.
5129 2003-01-17 Ulrich Drepper <drepper@redhat.com>
5131 * Makefile (headers): Add bits/semaphore.h.
5133 2003-01-16 Jakub Jelinek <jakub@redhat.com>
5135 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
5138 2003-01-14 Ulrich Drepper <drepper@redhat.com>
5140 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
5141 must be used and mapping failed.
5142 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
5144 * Makefile (CFLAGS-pthread_self.os): Define this, not
5145 CFLAGS-pthread_self.c.
5147 2003-01-13 Ulrich Drepper <drepper@redhat.com>
5149 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
5152 * Makefile (libpthread-routines): Add version. Add rules to build
5153 version.os and banner.h.
5154 * version.c: New file.
5156 2003-01-13 Jakub Jelinek <jakub@redhat.com>
5158 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
5159 the alias unconditional.
5160 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
5162 2003-01-13 Ulrich Drepper <drepper@redhat.com>
5164 * Makefile (CFLAGS-pthread_self.c): New definition.
5166 2003-01-06 Jakub Jelinek <jakub@redhat.com>
5168 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
5169 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
5170 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
5171 * init.c (__pthread_initialize_minimal_internal): Likewise.
5173 2003-01-07 Jakub Jelinek <jakub@redhat.com>
5175 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
5177 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
5178 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
5179 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
5180 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
5181 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
5182 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
5184 2003-01-06 Jakub Jelinek <jakub@redhat.com>
5186 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
5187 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
5188 * tst-cancel-wrappers.sh: Remove all exceptions.
5190 2003-01-05 Ulrich Drepper <drepper@redhat.com>
5192 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
5193 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
5195 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
5196 Use __libc_pthread_functions array if SHARED.
5198 * pthreadP.h: Move pthread_cond_2_0_t definition to...
5199 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
5201 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
5202 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
5203 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
5204 __libc_ptf_call instead of __libc_maybe_call.
5206 (__libc_cleanup_region_start): Wrap function name with PTF call.
5207 (__libc_cleanup_region_end): Likewise.
5208 (__libc_cleanup_end): Likewise.
5210 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
5211 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
5212 * pthread_key_create.c: Add __pthread_key_create_internal alias.
5213 * pthreadP.h: Add prototypes.
5215 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
5216 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
5217 __pthread_rwlock_unlock aliases.
5218 * pthreadP.h: Add prototypes for new aliases.
5220 * pthreadP.h (struct pthead_functions): Moved to...
5221 * sysdeps/pthread/pthread-functions.h: ...here. New file.
5222 * init.c (pthread_functions): Add initializers for new elements.
5224 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
5225 __pthread_cleanup_pop_restore aliases.
5226 * pthreadP.h: Add prototypes.
5228 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
5229 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
5230 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
5231 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
5232 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5233 * pthreadP.h: Adjust prototypes and callers.
5235 2003-01-04 Ulrich Drepper <drepper@redhat.com>
5237 * Makefile (tests): Add tst-cancel7.
5238 (tst-cancel7-ARGS): New variable.
5239 * tst-cancel7.c: New file.
5241 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
5242 around gcc defficiencies.
5243 * old_pthread_cond_signal.c: Likewise.
5244 * old_pthread_cond_timedwait.c: Likewise.
5245 * old_pthread_cond_wait.c: Likewise.
5247 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
5249 2003-01-03 Ulrich Drepper <drepper@redhat.com>
5251 * Makefile (tests): Add tst-cond7.
5252 * tst-cond7.c: New file.
5254 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
5255 (condvar_cleanup): Get condvar address from the right place.
5257 * atomic.h: Correct definitions of atomic_full_barrier,
5258 atomic_read_barrier, atomic_write_barrier.
5260 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
5262 * old_pthread_cond_signal.c: Likewise.
5263 * old_pthread_cond_timedwait.c: Likewise.
5264 * old_pthread_cond_wait.c: Likewise.
5266 2003-01-03 Jakub Jelinek <jakub@redhat.com>
5268 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
5270 2003-01-03 Ulrich Drepper <drepper@redhat.com>
5272 * pthreadP.h (pthread_cond_2_0_t): New type.
5273 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
5274 Use new type for the 2.0 condvar function prototypes.
5275 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
5276 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
5278 * old_pthread_cond_destroy.c: Likewise.
5279 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
5280 * old_pthread_cond_signal.c: Likewise.
5281 * old_pthread_cond_timedwait.c: Likewise.
5282 * old_pthread_cond_wait.c: Likewise.
5284 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
5285 (__pthread_cond_wait): Don't save cancellation mode and seq value
5288 * herrno.c (__h_errno_location): Don't define as weak.
5290 2003-01-02 Jakub Jelinek <jakub@redhat.com>
5292 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
5293 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
5294 and pthread_cond_wait.
5295 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
5297 (__pthread_cond_broadcast_2_0): ... this.
5298 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
5300 (__pthread_cond_destroy_2_0): ... this.
5301 * old_pthread_cond_init.c (__old_pthread_cond_init):
5303 (__pthread_cond_init_2_0): ... this.
5304 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
5306 (__pthread_cond_signal_2_0): ... this.
5307 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
5309 (__pthread_cond_wait_2_0): ... this.
5310 * pthread_cond_destroy.c: Include shlib-compat.h.
5311 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
5312 * pthread_cond_init.c: Include shlib-compat.h.
5313 (pthread_cond_init): Change strong_alias into versioned_symbol.
5314 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
5315 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
5317 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
5318 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
5319 __pthread_cond_wait_2_0): New prototypes.
5320 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
5321 __old_pthread_cond_init, __old_pthread_cond_signal,
5322 __old_pthread_cond_wait): Removed.
5323 * init.c: Include shlib-compat.h.
5324 (pthread_functions): Guard ptr___pthread_attr_init_2_0
5325 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
5326 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
5327 ptr___pthread_cond_*_2_0 fields.
5328 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
5329 pthread_cond_*@GLIBC_2.0 compatibility symbols.
5331 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
5332 LIBC_SIGACTION was not yet defined.
5333 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
5334 [!defined LIBC_SIGACTION] (__sigaction): New function and
5336 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
5337 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
5339 2003-01-02 Jakub Jelinek <jakub@redhat.com>
5341 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
5343 2003-01-02 Ulrich Drepper <drepper@redhat.com>
5345 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5346 New, larger type definition.
5347 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
5349 * Versions [libpthread]: Add definitions for new pthread_cond_*
5350 interfaces for version GLIBC_2.3.2.
5351 * pthread_cond_init.c: Update initialization for new type definition.
5352 * Makefile (libpthread-routines): Remove pthread_cond_wait,
5353 pthread_cond_timedwait, pthread_cond_signal, and
5354 pthread_cond_broadcast. Add old_pthread_cond_init,
5355 old_pthread_cond_destroy, old_pthread_cond_wait,
5356 old_pthread_cond_timedwait, old_pthread_cond_signal, and
5357 old_pthread_cond_broadcast.
5358 * old_pthread_cond_broadcast.c: New file.
5359 * old_pthread_cond_destroy.c: New file.
5360 * old_pthread_cond_init.c: New file.
5361 * old_pthread_cond_signal.c: New file.
5362 * old_pthread_cond_timedwait.c: New file.
5363 * old_pthread_cond_wait.c: New file.
5364 * pthreadP.h: Add prototypes for the compatibility interfaces.
5366 * pthread_cond_destroy.c: Don't include <errno.h>.
5368 2003-01-01 Ulrich Drepper <drepper@redhat.com>
5370 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
5371 unnecessary zero offset when addressing MUTEX.
5373 2002-12-31 Ulrich Drepper <drepper@redhat.com>
5375 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
5377 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
5378 for __register_atfork.
5380 2002-12-31 Jakub Jelinek <jakub@redhat.com>
5382 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
5383 instead of ASSEMBLER test macro.
5385 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
5386 __libc_current_sigrtmax): Add libc_hidden_def.
5388 * sysdeps/pthread/list.h: Remove assert.h include.
5390 2002-12-31 Ulrich Drepper <drepper@redhat.com>
5392 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
5393 __pthread_initialize_minimal_internal not
5394 __pthread_initialize_minimal.
5396 2002-12-30 Ulrich Drepper <drepper@redhat.com>
5398 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
5399 __pthread_initialize_minimal as hidden.
5401 * init.c (__pthread_initialize_minimal_internal): Don't mark as
5404 2002-12-31 Jakub Jelinek <jakub@redhat.com>
5406 * Makefile ($(inst_libdir)/libpthread.so): Depend on
5407 $(common-objpfx)format.lds, include that into the output script.
5409 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
5411 2002-12-28 Andreas Jaeger <aj@suse.de>
5413 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
5414 nsec resolution changes.
5415 (xstat64_conv): Likewise.
5416 (xstat32_conv): Likewise.
5417 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
5419 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
5420 structs stat and stat64.
5421 * time/time.h (__timespec_defined): Define for __USE_MISC.
5422 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
5424 2002-12-30 Jakub Jelinek <jakub@redhat.com>
5426 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
5428 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
5429 (pthread_exit): Use strong_alias to avoid warnings.
5430 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
5431 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
5432 ptr___pthread_attr_init_2_*.
5433 * init.c (pthread_functions): Adjust.
5435 2002-12-29 Ulrich Drepper <drepper@redhat.com>
5437 * forward.c: Make all functions available by default again. It
5438 caused too much trouble.
5440 * pt-siglongjmp.c: Removed.
5442 2002-12-28 Jakub Jelinek <jakub@redhat.com>
5444 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
5445 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
5446 * sysdeps/i386/Makefile: New file.
5447 * sysdeps/i386/tcb-offsets.sym: New file.
5448 * sysdeps/pthread/tcb-offsets.h: New file.
5449 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
5450 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
5452 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
5453 __register_atfork...
5454 (GLIBC_2.3.2): ...here.
5456 2002-12-28 Ulrich Drepper <drepper@redhat.com>
5458 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
5459 pthread_attr_setstackaddr with __attribute_deprecated__.
5461 2002-12-27 Jakub Jelinek <jakub@redhat.com>
5463 * pt-system.c (system): Remove cancellation handling.
5464 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
5465 cancellation routines.
5467 2002-12-28 Ulrich Drepper <drepper@redhat.com>
5469 * descr.h: Include <dl-sysdep.h>.
5470 (struct pthread): Move header.data.list to the back of the struct.
5471 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
5472 (MULTIPLE_THREADS_OFFSET): Adjust offset.
5473 (SYSINFO_OFFSEET): Likewise.
5475 2002-12-27 Jakub Jelinek <jakub@redhat.com>
5477 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
5479 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
5480 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
5481 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
5482 (USE_DL_SYSINFO): Undef.
5484 2002-12-22 Jakub Jelinek <jakub@redhat.com>
5486 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
5487 $(common-objpfx)libc.so.
5488 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
5489 it is bigger than pipe buffer size even on arches with bigger
5491 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
5493 2002-12-25 Ulrich Drepper <drepper@redhat.com>
5495 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
5496 correct errno access for case that USE___THREAD is not defined.
5498 2002-12-24 Ulrich Drepper <drepper@redhat.com>
5500 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
5501 Patch by Marijn Ros <marijn@mad.scientist.com>.
5503 2002-12-22 Roland McGrath <roland@redhat.com>
5505 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
5507 2002-12-20 Ulrich Drepper <drepper@redhat.com>
5509 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
5511 2002-12-19 Ulrich Drepper <drepper@redhat.com>
5513 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
5514 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
5515 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
5517 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
5519 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
5520 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
5521 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
5522 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5523 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
5524 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
5525 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
5526 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
5528 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
5530 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
5532 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
5534 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
5536 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
5537 that sysinfo is properly initialized.
5538 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
5539 to 1 only for ld.so.
5541 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
5542 RTLD_CORRECT_DYNAMIC_WEAK.
5544 2002-12-19 Jakub Jelinek <jakub@redhat.com>
5546 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
5547 Use return 0 as 6th argument to FORWARD4.
5548 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
5550 2002-12-18 Ulrich Drepper <drepper@redhat.com>
5552 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
5553 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
5554 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
5555 (INIT_SYSINFO): New #define.
5556 (TLS_TP_INIT): Use INIT_SYSINFO.
5557 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
5558 At test to make sure SYSINFO_OFFSET value is correct.
5559 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
5561 2002-12-18 Jakub Jelinek <jakub@redhat.com>
5563 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
5564 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
5565 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
5566 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
5567 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
5568 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
5569 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
5571 2002-12-18 Ulrich Drepper <drepper@redhat.com>
5573 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
5574 macro instead of using int $0x80 directly.
5576 * sysdeps/pthread/bits/stdio-lock.h: New file.
5577 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
5578 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
5579 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
5580 * Makefile (routines): Add libc-lowlevelmutex.
5582 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
5583 __i686.get_pc_thunk.dx.
5585 2002-12-17 Jakub Jelinek <jakub@redhat.com>
5587 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
5588 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
5589 ($(objpfx)tst-cancel-wrappers.out): New rule.
5590 * tst-cancel-wrappers.sh: New test.
5591 * tst-locale1.c: Include signal.h.
5592 (uselocale): Test static linking of __libc_current_sigrt*.
5594 2002-12-17 Ulrich Drepper <drepper@redhat.com>
5596 * Makefile (tests): Add tst-cancel6.
5597 * tst-cancel6.c: New file
5599 2002-12-17 Jakub Jelinek <jakub@redhat.com>
5601 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
5602 Define meaningfully for assembler as well.
5603 * pthreadP.h (struct pthread_functions): Remove
5604 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
5605 and ptr_pthread_attr_init_2_1 fields.
5606 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
5607 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
5608 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
5609 (FORWARD3): Define using FORWARD4.
5610 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
5612 * pt-system.c: Remove duplicate stdlib.h include.
5614 2002-12-16 Ulrich Drepper <drepper@redhat.com>
5616 * sem_init.c: Define sem_init@GLIBC_2.0.
5617 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
5618 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
5620 * flockfile.c: Moved to...
5621 * sysdeps/pthread/flockfile.c: ...here. New file.
5622 * funlockfile.c: Moved to...
5623 * sysdeps/pthread/funlockfile.c: ...here. New file.
5624 * ftrylockfile.c: Moved to...
5625 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
5627 2002-12-16 Jakub Jelinek <jakub@redhat.com>
5629 * libc-cancellation.c: Guard both function with
5630 #if !defined NOT_IN_libc.
5631 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
5632 automatically provided pthread wrappers.
5633 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
5634 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
5636 * pt-open.c: Removed.
5637 * pt-fcntl.c: Removed.
5638 * pt-fsync.c: Removed.
5639 * pt-lseek.c: Removed.
5640 * pt-msgrcv.c: Removed.
5641 * pt-msgsnd.c: Removed.
5642 * pt-msync.c: Removed.
5643 * pt-nanosleep.c: Removed.
5644 * pt-open64.c: Removed.
5645 * pt-pause.c: Removed.
5646 * pt-pread.c: Removed.
5647 * pt-pread64.c: Removed.
5648 * pt-pwrite.c: Removed.
5649 * pt-pwrite64.c: Removed.
5650 * pt-read.c: Removed.
5651 * pt-recv.c: Removed.
5652 * pt-recvfrom.c: Removed.
5653 * pt-recvmsg.c: Removed.
5654 * pt-send.c: Removed.
5655 * pt-sendto.c: Removed.
5656 * pt-sigtimedwait.c: Removed.
5657 * pt-sigwait.c: Removed.
5658 * pt-wait.c: Removed.
5659 * pt-waitpid.c: Removed.
5660 * pt-write.c: Removed.
5661 * pt-accept.c: Removed.
5662 * pt-close.c: Removed.
5663 * pt-connect.c: Removed.
5664 * pt-lseek64.c: Removed.
5665 * pt-sendmsg.c: Removed.
5666 * pt-tcdrain.c: Removed.
5668 2002-12-15 Ulrich Drepper <drepper@redhat.com>
5670 * init.c (__pthread_initialize_minimal_internal): Renamed from
5671 __pthread_initialize_minimal. Make old name an alias. This
5672 converts a normal relocation into a relative relocation.
5674 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
5676 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
5677 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
5678 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
5679 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
5680 pt-sigwaitinfo, pt-waitid, and pt-writev.
5681 * pt-creat.c: Removed.
5682 * pt-poll.c: Removed.
5683 * pt-pselect.c: Removed.
5684 * pt-readv.c: Removed.
5685 * pt-select.c: Removed.
5686 * pt-sigpause.c: Removed.
5687 * pt-sigsuspend.c: Removed.
5688 * pt-sigwaitinfo.c: Removed.
5689 * pt-waitid.c: Removed.
5690 * pt-writev.c: Removed.
5692 * init.c (pthread_functions): New variable.
5693 (__pthread_initialize_minimal): Pass pointer to pthread_functions
5694 (or NULL) to __libc_pthread_init.
5695 * forward.c: Rewrite to use __libc:pthread_functions array to get
5697 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
5699 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
5700 Take new parameter. Copy content of variable pointed to by it
5701 to __libc_pthread_init.
5703 * pthreadP.h (struct pthread_functions): New type.
5704 (__libc_pthread_init): Declare.
5706 * pthread_attr_destroy.c: Add namespace protected alias.
5707 * pthread_attr_getdetachstate.c: Likewise.
5708 * pthread_attr_getinheritsched.c: Likewise.
5709 * pthread_attr_getschedparam.c: Likewise.
5710 * pthread_attr_getschedpolicy.c: Likewise.
5711 * pthread_attr_getscope.c: Likewise.
5712 * pthread_attr_setdetachstate.c: Likewise.
5713 * pthread_attr_setinheritsched.c: Likewise.
5714 * pthread_attr_setschedparam.c: Likewise.
5715 * pthread_attr_setschedpolicy.c: Likewise.
5716 * pthread_attr_setscope.c: Likewise.
5717 * pthread_cond_broadcast.c: Likewise.
5718 * pthread_cond_destroy.c: Likewise.
5719 * pthread_cond_init.c: Likewise.
5720 * pthread_cond_signal.c: Likewise.
5721 * pthread_cond_wait.c: Likewise.
5722 * pthread_condattr_destroy.c: Likewise.
5723 * pthread_condattr_init.c: Likewise.
5724 * pthread_equal.c: Likewise.
5725 * pthread_exit.c: Likewise.
5726 * pthread_getschedparam.c: Likewise.
5727 * pthread_self.c: Likewise.
5728 * pthread_setcancelstate.c: Likewise.
5729 * pthread_setschedparam.c: Likewise.
5730 * pthread_mutex_destroy.c: Likewise.
5731 * pthread_mutex_init.c: Likewise.
5732 * pthreadP.h: Add prototypes for the aliases.
5734 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
5735 multiple_threads member in correct TCB to 1.
5737 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
5738 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
5739 member of thread decriptor, otherwise return unconditionally 1.
5741 2002-12-14 Ulrich Drepper <drepper@redhat.com>
5743 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
5744 regular Linux version. Remove file.
5745 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
5746 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
5747 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
5748 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
5749 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
5750 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
5751 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
5752 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
5753 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
5754 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
5755 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
5756 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
5757 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
5758 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
5759 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
5760 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
5761 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
5762 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
5763 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
5764 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
5765 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
5766 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
5767 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
5768 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
5769 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
5770 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
5771 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
5772 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
5773 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
5774 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
5776 2002-12-14 Jakub Jelinek <jakub@redhat.com>
5778 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
5779 * sysdeps/unix/sysv/linux/open.c: Removed.
5780 * sysdeps/unix/sysv/linux/fsync.c: Removed.
5781 * sysdeps/unix/sysv/linux/lseek.c: Removed.
5782 * sysdeps/unix/sysv/linux/msync.c: Removed.
5783 * sysdeps/unix/sysv/linux/read.c: Removed.
5784 * sysdeps/unix/sysv/linux/close.c: Removed.
5785 * sysdeps/unix/sysv/linux/creat.c: Removed.
5786 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
5787 * sysdeps/unix/sysv/linux/pause.c: Removed.
5788 * sysdeps/unix/sysv/linux/select.c: Removed.
5789 * sysdeps/unix/sysv/linux/write.c: Removed.
5791 2002-12-14 Ulrich Drepper <drepper@redhat.com>
5793 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
5794 element in TCB to see whether locking is needed.
5796 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
5797 MULTIPLE_THREADS_OFFSET value is correct.
5799 * sysdeps/unix/sysv/linux/close.c: New file.
5800 * sysdeps/unix/sysv/linux/connect.S: New file.
5801 * sysdeps/unix/sysv/linux/creat.c: New file.
5802 * sysdeps/unix/sysv/linux/fsync.c: New file.
5803 * sysdeps/unix/sysv/linux/llseek.c: New file.
5804 * sysdeps/unix/sysv/linux/lseek.c: New file.
5805 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
5806 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
5807 * sysdeps/unix/sysv/linux/msync.c: New file.
5808 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
5809 * sysdeps/unix/sysv/linux/open.c: New file.
5810 * sysdeps/unix/sysv/linux/open64.c: New file.
5811 * sysdeps/unix/sysv/linux/pause.c: New file.
5812 * sysdeps/unix/sysv/linux/poll.c: New file.
5813 * sysdeps/unix/sysv/linux/pread.c: New file.
5814 * sysdeps/unix/sysv/linux/pread64.c: New file.
5815 * sysdeps/unix/sysv/linux/pselect.c: New file.
5816 * sysdeps/unix/sysv/linux/pwrite.c: New file.
5817 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
5818 * sysdeps/unix/sysv/linux/readv.c: New file.
5819 * sysdeps/unix/sysv/linux/recv.S: New file.
5820 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
5821 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
5822 * sysdeps/unix/sysv/linux/select.c: New file.
5823 * sysdeps/unix/sysv/linux/send.S: New file.
5824 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
5825 * sysdeps/unix/sysv/linux/sendto.S: New file.
5826 * sysdeps/unix/sysv/linux/sigpause.c: New file.
5827 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
5828 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
5829 * sysdeps/unix/sysv/linux/sigwait.c: New file.
5830 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
5831 * sysdeps/unix/sysv/linux/system.c: New file.
5832 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
5833 * sysdeps/unix/sysv/linux/wait.c: New file.
5834 * sysdeps/unix/sysv/linux/waitid.c: New file.
5835 * sysdeps/unix/sysv/linux/waitpid.c: New file.
5836 * sysdeps/unix/sysv/linux/writev.c: New file.
5837 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
5839 * pt-readv.c: Fix comment.
5841 2002-12-14 Jakub Jelinek <jakub@redhat.com>
5843 * tst-cleanup1.c: Include stdlib.h.
5845 * tst-cancel5.c: New test.
5846 * Makefile (tests): Add tst-cancel5.
5847 (tst-cancel5): Link against libc.so libpthread.so in that order.
5849 2002-12-13 Ulrich Drepper <drepper@redhat.com>
5851 * forward.c (test_loaded): Prevent recursive calls.
5853 * Makefile (routines): Add libc-cancellation.
5854 * libc-cancellation.c: New file.
5855 * descr.h (struct pthread): Add multiple_threads field.
5856 * allocatestack.c (allocate_stack): Initialize multiple_header field of
5857 new thread descriptor to 1.
5858 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
5859 Initialize multiple_thread field after successful thread creation.
5860 * cancellation.c (__do_cancel): Move to pthreadP.h.
5861 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
5862 (__pthread_disable_asynccancel): Add internal_function attribute.
5863 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
5864 * pthread_setcancelstate.c: Likewise.
5865 * pthread_setcanceltype.c: Likewise.
5866 * pthread_exit.c: Likewise.
5867 * pthreadP.h (CANCELLATION_P): Likewise.
5868 (__do_cancel): Define as static inline.
5869 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
5870 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
5872 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
5873 fields. Define MULTIPLE_THREADS_OFFSET.
5874 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
5876 * sysdeps/unix/sysv/linux/accept.S: New file.
5877 * sysdeps/unix/sysv/linux/read.c: New file.
5878 * sysdeps/unix/sysv/linux/write.c: New file.
5879 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
5880 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
5881 initialization of __libc_locking_needed.
5882 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
5883 __libc_locking_needed, use multiple_threads field in TCB.
5884 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
5886 2002-12-12 Ulrich Drepper <drepper@redhat.com>
5888 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
5890 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
5892 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
5893 access to __libc_locking_needed for PIC.
5895 2002-12-12 Jakub Jelinek <jakub@redhat.com>
5897 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
5898 declare for libc.so.
5899 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
5901 (__libc_lock_lock): Put into statement expression.
5902 (__libc_lock_unlock): Remove trailing semicolon.
5903 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
5905 2002-12-12 Roland McGrath <roland@redhat.com>
5907 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
5908 "m" constraint to refer to __libc_locking_needed. Declare it here.
5910 2002-12-12 Ulrich Drepper <drepper@redhat.com>
5912 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
5913 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
5914 Initialize __libc_locking_needed.
5915 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
5916 instead of __register_pthread_fork_handler.
5917 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
5918 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
5919 fork-gen with libc_pthread_init.
5920 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
5921 of __register_pthread_fork_handler.
5922 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
5923 of __register_pthread_fork_handler.
5924 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
5925 __libc_locking_needed to determine whether lock prefix can be avoided.
5926 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
5928 2002-12-11 Ulrich Drepper <drepper@redhat.com>
5930 * Makefile (tests): Add tst-cleanup1.
5931 * tst-cleanup1.c: New file.
5932 * cancellation.c (__cleanup_thread): Removed.
5933 (__do_cancel): Remove call to __cleanup_thread.
5934 * pthreadP.h: Remove __cleanup_thread prorotype.
5936 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
5937 Remember function and argument even if cancellation handler
5938 function is not available.
5939 (__libc_cleanup_region_end): Execute registered function directly if
5940 pthread functions are not available.
5941 (__libc_cleanup_end): Likewise.
5943 * init.c (__pthread_initialize_minimal): Fix initialization in
5944 static lib by preventing gcc from being too clever.
5946 2002-12-10 Ulrich Drepper <drepper@redhat.com>
5948 * init.c (__pthread_initialize_minimal): Remove unneccesary
5951 * Makefile (tests): We can run tst-locale2 now.
5953 2002-12-09 Ulrich Drepper <drepper@redhat.com>
5955 * Versions: Remove duplicated sigwait entry.
5957 2002-12-08 Ulrich Drepper <drepper@redhat.com>
5959 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
5962 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
5964 * pthreadP.h: Declare __pthread_enable_asynccancel and
5965 __pthread_disable_asynccancel.
5966 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
5967 (CANCEL_RESET): Use __pthread_disable_asynccancel.
5968 * cancellation.c (__pthread_enable_asynccancel): New function.
5969 (__pthread_disable_asynccancel): New function.
5970 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
5971 * pt-close.c: Likewise.
5972 * pt-connect.c: Likewise.
5973 * pt-creat.c: Likewise.
5974 * pt-fcntl.c: Likewise.
5975 * pt-fsync.c: Likewise.
5976 * pt-lseek.c: Likewise.
5977 * pt-lseek64.c: Likewise.
5978 * pt-msgrcv.c: Likewise.
5979 * pt-msgsnd.c: Likewise.
5980 * pt-msync.c: Likewise.
5981 * pt-nanosleep.c: Likewise.
5982 * pt-open.c: Likewise.
5983 * pt-open64.c: Likewise.
5984 * pt-pause.c: Likewise.
5985 * pt-poll.c: Likewise.
5986 * pt-pread.c: Likewise.
5987 * pt-pread64.c: Likewise.
5988 * pt-pselect.c: Likewise.
5989 * pt-pwrite.c: Likewise.
5990 * pt-pwrite64.c: Likewise.
5991 * pt-read.c: Likewise.
5992 * pt-readv.c: Likewise.
5993 * pt-recv.c: Likewise.
5994 * pt-recvfrom.c: Likewise.
5995 * pt-recvmsg.c: Likewise.
5996 * pt-select.c: Likewise.
5997 * pt-send.c: Likewise.
5998 * pt-sendmsg.c: Likewise.
5999 * pt-sendto.c: Likewise.
6000 * pt-sigpause.c: Likewise.
6001 * pt-sigsuspend.c: Likewise.
6002 * pt-sigtimedwait.c: Likewise.
6003 * pt-sigwait.c: Likewise.
6004 * pt-sigwaitinfo.c: Likewise.
6005 * pt-system.c: Likewise.
6006 * pt-tcdrain.c: Likewise.
6007 * pt-wait.c: Likewise.
6008 * pt-waitid.c: Likewise.
6009 * pt-waitpid.c: Likewise.
6010 * pt-write.c: Likewise.
6011 * pt-writev.c: Likewise.
6012 * pthread_join.c: Likewise.
6013 * pthread_timedjoin.c: Likewise.
6015 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
6016 (__xpg_sigpause): New function.
6017 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
6019 2002-12-07 Ulrich Drepper <drepper@redhat.com>
6021 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
6023 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
6024 _GI_pthread_cleanup_pop to pthreadP.h.
6026 * ftrylockfile.c: Use _IO_lock_trylock instead of
6027 pthread_mutex_trylock.
6029 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
6030 (CANCEL_RESET): Likewise.
6031 (__pthread_setcanceltype_): Declare.
6032 (__pthread_mutex_lock_internal): Declare.
6033 (__pthread_mutex_unlock_internal): Declare.
6034 (__pthread_once_internal): Declare.
6035 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
6036 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
6038 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
6039 and pthread_mutex_unlock.
6040 * pthread_cond_wait.c: Likewise.
6041 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
6042 * pthread_mutex_unlock.c: Likewise.
6044 * pthread_setcanceltype.c: Add additional alias
6045 __pthread_setcanceltype.
6047 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
6048 * sem_open.c (sem_open): Likewise.
6049 Use __libc_open, __libc_write, and __libc_close instead of
6050 open, write, and close respectively.
6052 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
6053 Rewrite as statement expression since it must return a value.
6055 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
6056 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
6059 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
6060 alias __pthread_once_internal.
6062 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
6064 2002-12-06 Ulrich Drepper <drepper@redhat.com>
6066 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
6067 * tst-stdio1.c: New file.
6068 * tst-stdio2.c: New file.
6070 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
6072 * Makefile (tests): Comment out tst-locale2 for now.
6073 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
6075 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
6077 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
6078 Use _IO_lock_init instead of explicit assignment.
6080 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
6081 Define __libc_lock_* and __libc_lock_recursive macros with
6082 lowlevellock macros, not pthread mutexes.
6084 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
6085 of pthread_mutex_lock.
6086 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
6087 instead of pthread_mutex_unlock.
6089 2002-12-06 Roland McGrath <roland@redhat.com>
6091 * allocatestack.c (__stack_user): Use uninitialized defn.
6092 * init.c (__pthread_initialize_minimal): Initialize it here.
6094 2002-12-05 Roland McGrath <roland@redhat.com>
6096 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
6098 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
6100 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
6103 2002-12-05 Ulrich Drepper <drepper@redhat.com>
6105 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
6107 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
6108 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
6109 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
6110 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
6111 for __libc_lock_* macros.
6112 * Makefile (routines): Add libc-lowlevellock.
6114 2002-10-09 Roland McGrath <roland@redhat.com>
6116 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
6117 Under [__PIC__], call the function via the pointer fetched for
6118 comparison rather than a call by name that uses the PLT.
6119 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
6120 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
6121 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
6122 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
6123 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
6125 2002-12-04 Roland McGrath <roland@redhat.com>
6127 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
6129 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
6130 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
6132 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
6134 2002-12-04 Ulrich Drepper <drepper@redhat.com>
6136 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
6137 a completely opaque, non-integer type.
6138 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6140 2002-12-05 Jakub Jelinek <jakub@redhat.com>
6142 * sysdeps/i386/tls.h: Include stdlib.h.
6143 * sysdeps/x86_64/tls.h: Likewise.
6145 2002-12-04 Ulrich Drepper <drepper@redhat.com>
6147 * Makefile (tests): Add tst-locale2.
6148 (tests-static): Likewise.
6149 * tst-locale2.c: New file.
6151 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
6152 volatile and add memory clobbers to lock operations.
6154 2002-12-03 Ulrich Drepper <drepper@redhat.com>
6156 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
6157 * sysdeps/i386/i486/bits/atomic.h: New file.
6158 * sysdeps/i386/i586/bits/atomic.h: New file.
6159 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
6160 include i486 version.
6161 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
6162 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
6163 Patch by Marijn Ros <marijn@mad.scientist.com>.
6165 * allocatestack.c (get_cached_stack): Don't crash if we first
6166 found a stack with a larger size then needed.
6167 Reported by Hui Huang <hui.huang@sun.com>.
6169 * Makefile (tests): Add tst-sysconf.
6170 * tst-sysconf.c: New file.
6172 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
6173 PTHREAD_THREADS_MAX.
6175 2002-12-02 Roland McGrath <roland@redhat.com>
6177 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
6178 Declare using hidden_proto instead of attribute_hidden, so there are
6179 non-.hidden static symbols for gdb to find.
6180 (__pthread_keys): Likewise.
6181 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
6182 * allocatestack.c (__stack_user): Likewise.
6183 * pthread_create.c (__pthread_keys): Likewise.
6184 (__nptl_threads_events, __nptl_last_event): Make these static instead
6186 * pthread_key_create.c (__pthread_pthread_keys_max,
6187 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
6189 2002-12-02 Ulrich Drepper <drepper@redhat.com>
6191 * Makefile (tests): Add tst-locale1. If buid-static is yes link
6193 * tst-locale1.c: New file.
6195 * pthread_cond_timedwait.c: Include <stdlib.h>.
6197 * Makefile (tests): Add tst-fork2 and tst-fork3.
6198 * tst-fork2.c: New file.
6199 * tst-fork3.c: New file.
6201 2002-11-28 Ulrich Drepper <drepper@redhat.com>
6203 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
6205 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
6206 require it to 200112L.
6208 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
6209 instruction only if HAVE_CMOV is defined.
6210 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
6212 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
6214 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
6216 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
6218 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
6220 2002-11-27 Ulrich Drepper <drepper@redhat.com>
6222 * sysdeps/x86_64/bits/atomic.h: New file.
6224 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
6227 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
6228 possible since gettid cannot fail.
6230 * sysdeps/x86_64/pthreaddef.h: New file.
6232 * sysdeps/i386/pthreaddef.h (gettid): Removed.
6234 * sysdeps/x86_64/pthread_spin_init.c: New file.
6235 * sysdeps/x86_64/pthread_spin_lock.c: New file.
6236 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
6237 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
6239 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
6240 Add missing lock prefix. Minute optimization.
6242 * tst-spin2.c (main): Also check successful trylock call.
6244 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
6245 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
6247 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
6248 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
6250 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
6251 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
6252 value in case of an error. Add support for INTERNAL_SYSCALL.
6254 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
6255 value in case of an error.
6257 * sysdeps/x86_64/tls.h: New file.
6259 2002-11-26 Ulrich Drepper <drepper@redhat.com>
6261 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
6262 takes the array member name and the index as parameters.
6263 (THREAD_SETMEM_NC): Likewise.
6264 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
6265 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
6268 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
6269 to decide which code to use.
6270 (THREAD_SETMEM_NC): Likewise.
6272 * allocatestack.c (queue_stack): Don't remove stack from list here.
6273 Do it in the caller. Correct condition to prematurely terminate
6274 loop to free stacks.
6275 (__deallocate_stack): Remove stack from list here.
6277 2002-11-26 Ulrich Drepper <drepper@redhat.com>
6279 * Makefile (tests): Add tst-stack1.
6280 * tst-stack1.c: New file.
6282 * allocatestack.c (allocate_stack): Initialize the TCB on a user
6285 * pthread_attr_getstack.c: Return bottom of the thread area.
6287 2002-11-25 Ulrich Drepper <drepper@redhat.com>
6289 * Makefile (libpthread-routines): Add pt-allocrtsig and
6290 pthread_kill_other_threads.
6291 * pt-allocrtsig.c: New file.
6292 * pthread_kill_other_threads.c: New file.
6293 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
6294 all three functions.
6295 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
6297 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
6298 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
6299 and __libc_allocate_rtsig_private.
6300 * Versions (libpthread): Export pthread_kill_other_threads_np,
6301 __libc_current_sigrtmin, and __libc_current_sigrtmax.
6303 2002-11-24 Ulrich Drepper <drepper@redhat.com>
6305 * allocatestack.c (allocate_stack): stackaddr in attribute points to
6306 the end of the stack. Adjust computations.
6307 When mprotect call fails dequeue stack and free it.
6308 * pthread_attr_setstack.c: Store top of the stack in stackaddr
6310 * pthread_getattr_np.c: Likewise.
6312 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
6315 2002-11-23 Ulrich Drepper <drepper@redhat.com>
6317 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
6318 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
6320 2002-11-22 Ulrich Drepper <drepper@redhat.com>
6322 * pthread_getspecific.c: Optimize access to first 2nd-level array.
6323 * pthread_setspecific.c: Likewise.
6325 2002-11-21 Ulrich Drepper <drepper@redhat.com>
6327 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
6328 definitions. Get them from the official place.
6329 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
6331 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
6332 Use new CLONE_ flags in clone() calls.
6334 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
6335 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
6337 * Versions: Add pthread_* functions for libc.
6338 * forward.c: New file.
6340 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
6342 * herrno.c: New file.
6345 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
6346 sem_trywait, and sem_timedwait. Add herrno and res.
6347 * sem_init.c: Don't initialize lock and waiters members.
6348 * sem_open.c: Likewise.
6349 * sem_post.c: Removed.
6350 * sem_wait.c: Removed.
6351 * sem_trywait.c: Removed.
6352 * sem_timedwait.c: Removed.
6353 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
6354 Includes full implementations of sem_post, sem_wait, sem_trywait,
6356 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
6357 for new implementation.
6358 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
6361 * tst-sem3.c: Improve error message.
6362 * tst-signal3.c: Likewise.
6364 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
6365 to tell the kernel about the termination futex and to initialize tid
6366 member. Don't initialize main_thread.
6367 * descr.h (struct pthread): Remove main_thread member.
6368 * cancelllation.c (__do_cancel): Remove code handling main thread.
6369 The main thread is not special anymore.
6371 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
6372 size of the stacks to stack_cache_actsize.
6374 * pt-readv.c: Add missing "defined".
6375 * pt-sigwait.c: Likewise.
6376 * pt-writev.c: Likewise.
6378 2002-11-09 Ulrich Drepper <drepper@redhat.com>
6380 * Versions: Export __connect from libpthread.
6381 Patch by Luca Barbieri <ldb@ldb.ods.org>.
6383 * Makefile (libpthread-routines): Add pt-raise.
6384 * sysdeps/unix/sysv/linux/raise.c: New file.
6385 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
6386 * sysdeps/generic/pt-raise.c: New file.
6388 * pthread_cond_init.c: Initialize all data elements of the condvar
6389 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
6391 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
6392 * pthread_create.c: Likewise.
6394 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
6395 * tst-key1.c: New file.
6396 * tst-key2.c: New file.
6397 * tst-key3.c: New file.
6399 * Versions: Export pthread_detach for version GLIBC_2.0.
6400 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
6402 2002-11-08 Ulrich Drepper <drepper@redhat.com>
6404 * pthread_key_create.c: Terminate search after an unused key was found.
6405 Patch by Luca Barbieri <ldb@ldb.ods.org>.
6407 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
6408 Patch by Luca Barbieri <ldb@ldb.ods.org>.
6410 2002-10-10 Ulrich Drepper <drepper@redhat.com>
6412 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
6413 dynamic lookup for errno in PIC.
6415 * allocatestack.c (get_cached_stack): Rearrange code slightly to
6416 release the stack lock as soon as possible.
6417 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
6418 the static TLS block.
6419 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
6421 * cancellation.c: Renamed from cancelation.c.
6422 * Makefile: Adjust accordingly.
6423 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
6424 * cleanup_defer.c: Use CANCELLATION_P.
6425 * pthread_testcancel.c: Likewise.
6426 * descr.h: Fix spelling in comments.
6428 * pthread_getattr_np.c: Likewise.
6429 * pthread_getschedparam.c: Likewise.
6430 * pthread_setschedparam.c: Likewise.
6431 * Versions: Likewise.
6433 * pt-pselect.c: New file.
6434 * Makefile (libpthread-routines): Add pt-pselect.
6435 * Versions: Add pselect.
6437 * tst-cancel4.c: New file.
6438 * Makefile (tests): Add tst-cancel4.
6440 2002-10-09 Ulrich Drepper <drepper@redhat.com>
6442 * pthread_mutex_lock.c: Always record lock ownership.
6443 * pthread_mutex_timedlock.c: Likewise.
6444 * pthread_mutex_trylock.c: Likewise.
6446 * pt-readv.c: New file.
6447 * pt-writev.c: New file.
6448 * pt-creat.c: New file.
6449 * pt-msgrcv.c: New file.
6450 * pt-msgsnd.c: New file.
6451 * pt-poll.c: New file.
6452 * pt-select.c: New file.
6453 * pt-sigpause.c: New file.
6454 * pt-sigsuspend.c: New file.
6455 * pt-sigwait.c: New file.
6456 * pt-sigwaitinfo.c: New file.
6457 * pt-waitid.c: New file.
6458 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
6459 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
6460 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
6461 * Versions: Add all the new functions.
6463 * tst-exit1.c: New file.
6464 * Makefile (tests): Add tst-exit1.
6466 * sem_timedwait.c: Minor optimization for more optimal fastpath.
6468 2002-10-08 Ulrich Drepper <drepper@redhat.com>
6470 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
6472 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
6473 call. pthread_join is an official cancellation point.
6474 * pthread_timedjoin.c: Likewise.
6476 * pthread_cond_wait.c: Revert order in which internal lock are dropped
6477 and the condvar's mutex are retrieved.
6478 * pthread_cond_timedwait.c: Likewise.
6479 Reported by dice@saros.East.Sun.COM.
6481 2002-10-07 Ulrich Drepper <drepper@redhat.com>
6483 * pthreadP.h: Cut out all type definitions and move them...
6484 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
6485 * pthreadP.h: Include <internaltypes.h>.
6487 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
6490 * sem_trywait.c: Shuffle #includes around to get right order.
6491 * sem_timedwait.c: Likewise.
6492 * sem_post.c: Likewise.
6493 * sem_wait.c: Likewise.
6495 * nptl 0.3 released.
6497 * Makefile (tests): Add tst-signal3.
6498 * tst-signal3.c: New file.
6500 2002-10-05 Ulrich Drepper <drepper@redhat.com>
6502 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
6503 the asms modify the sem object.
6504 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
6506 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
6508 * pthreadP.h (struct sem): New type. Actual semaphore type.
6509 * semaphoreP.h: Include pthreadP.h.
6510 * sem_getvalue.c: Adjust to sem_t change.
6511 * sem_init.c: Likewise.
6512 * sem_open.c: Likewise.
6513 * sem_post.c: Likewise.
6514 * sem_timedwait.c: Likewise.
6515 * sem_trywait.c: Likewise.
6516 * sem_wait.c: Likewise.
6518 2002-10-04 Ulrich Drepper <drepper@redhat.com>
6520 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
6521 * tst-basic2.c: New file.
6522 * tst-exec1.c: New file.
6523 * tst-exec2.c: New file.
6524 * tst-exec3.c: New file.
6526 * tst-fork1.c: Remove extra */.
6528 * nptl 0.2 released. The API for IA-32 is complete.