1 2005-12-27 Jakub Jelinek <jakub@redhat.com>
3 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4 and __prev field to pthread_mutex_t.
5 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
9 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
12 2005-12-26 Ulrich Drepper <drepper@redhat.com>
14 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
15 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
16 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
17 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
18 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
19 and PTHREAD_MUTEXATTR_FLAG_BITS.
20 * descr.h (struct pthread): Add robust_list field and define
21 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
22 * pthread_mutexattr_getrobust.c: New file.
23 * pthread_mutexattr_setrobust.c: New file.
24 * pthread_mutex_consistent.c: New file.
25 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
26 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
27 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
28 Adjust pthread_mutex_t initializers.
29 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
30 field to pthread_mutex_t.
31 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
32 and __prev field to pthread_mutex_t.
33 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
34 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
35 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
36 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
37 * pthread_mutexattr_gettype.c: Likewise.
38 * pthread_mutexattr_setpshared.c: Likewise.
39 * pthread_mutexattr_settype.c: Likewise.
40 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
41 Initialize mutex kind according to robust flag.
42 * pthread_mutex_lock.c: Implement local robust mutex.
43 * pthread_mutex_timedlock.c: Likewise.
44 * pthread_mutex_trylock.c: Likewise.
45 * pthread_mutex_unlock.c: Likewise.
46 * pthread_create.c (start_thread): Mark robust mutexes which remained
48 * tst-robust1.c: New file.
49 * tst-robust2.c: New file.
50 * tst-robust3.c: New file.
51 * tst-robust4.c: New file.
52 * tst-robust5.c: New file.
53 * tst-robust6.c: New file.
54 * tst-robust7.c: New file.
55 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
56 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
57 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
58 tst-robust5, tst-robust6, and tst-robust7.
60 * tst-typesizes.c: New file.
61 * Makefile (tests): Add tst-typesizes.
63 * tst-once3.c: More debug output.
65 2005-12-24 Ulrich Drepper <drepper@redhat.com>
67 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
68 missing after last change.
70 * version.c: Update copyright year.
72 2005-12-23 Ulrich Drepper <drepper@redhat.com>
74 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
75 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
76 * pthread_mutex_trylock.c: Likewise.
77 * pthread_mutex_timedlock.c: Likewise.
78 * pthread_mutex_unlock.c: Likewise.
80 2005-12-22 Roland McGrath <roland@redhat.com>
82 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
83 so that #include_next's search location is not reset to the -I..
84 directory where <nptl/...> can be found.
86 2005-12-22 Ulrich Drepper <drepper@redhat.com>
89 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
90 Fix unwind info. Remove useless branch prediction prefix.
91 * tst-cancel24.cc: New file.
92 * Makefile: Add rules to build and run tst-cancel24.
94 2005-12-21 Roland McGrath <roland@redhat.com>
96 * libc-cancellation.c: Use <> rather than "" #includes.
97 * pt-cleanup.c: Likewise.
98 * pthread_create.c: Likewise.
99 * pthread_join.c: Likewise.
100 * pthread_timedjoin.c: Likewise.
101 * pthread_tryjoin.c: Likewise.
102 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
103 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
104 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
105 * unwind.c: Likewise.
107 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
109 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
110 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
111 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
112 THREAD_COPY_POINTER_GUARD): Define.
114 2005-12-19 Jakub Jelinek <jakub@redhat.com>
116 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
118 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
119 THREAD_COPY_POINTER_GUARD): Define.
120 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
121 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
122 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
123 THREAD_COPY_POINTER_GUARD): Define.
124 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
125 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
126 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
127 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
128 Use PTR_DEMANGLE for B0 if defined.
130 2005-12-17 Ulrich Drepper <drepper@redhat.com>
132 * pthread_create.c (__pthread_create_2_1): Use
133 THREAD_COPY_POINTER_GUARD if available.
134 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
135 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
136 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
137 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
138 * sysdeps/x86_64/tls.h: Likewise.
140 2005-12-15 Roland McGrath <roland@redhat.com>
142 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
144 2005-12-13 Ulrich Drepper <drepper@redhat.com>
146 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
148 * errno-loc.c: New file.
150 2005-12-12 Roland McGrath <roland@redhat.com>
152 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
153 adjustments before choosing stack size. Update minimum stack size
154 calculation to match allocate_stack change.
156 2005-12-12 Ulrich Drepper <drepper@redhat.com>
158 * allocatestack.c (allocate_stack): Don't demand that there is an
159 additional full page available on the stack beside guard, TLS, the
162 2005-11-24 Ulrich Drepper <drepper@redhat.com>
164 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
165 (__cleanup_fct_attribute): Use __regparm__ not regparm.
167 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
168 compiling 32-bit code we must define __cleanup_fct_attribute.
170 005-11-24 Jakub Jelinek <jakub@redhat.com>
173 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
174 __attribute__ instead of __attribute.
175 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
176 (__cleanup_fct_attribute): Likewise.
178 2005-11-17 Jakub Jelinek <jakub@redhat.com>
180 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
181 a write barrier before writing libgcc_s_getcfa.
183 2005-11-06 Ulrich Drepper <drepper@redhat.com>
185 * sysdeps/unix/sysv/linux/configure: Removed.
187 2005-11-05 Ulrich Drepper <drepper@redhat.com>
189 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
190 optional init_array/fini_array support.
192 2005-10-24 Roland McGrath <roland@redhat.com>
194 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
195 versioned_symbol use.
197 2005-10-16 Roland McGrath <roland@redhat.com>
199 * init.c (__pthread_initialize_minimal_internal): Even when using a
200 compile-time default stack size, apply the minimum that allocate_stack
201 will require, and round up to page size.
203 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
205 * Makefile ($(test-modules)): Remove static pattern rule.
207 2005-10-14 Jakub Jelinek <jakub@redhat.com>
208 Ulrich Drepper <drepper@redhat.com>
210 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
211 alignment in callback function.
212 * Makefile: Add rules to build and run tst-align3.
213 * tst-align3.c: New file.
215 2005-10-03 Jakub Jelinek <jakub@redhat.com>
217 * allocatestack.c (setxid_signal_thread): Add
218 INTERNAL_SYSCALL_DECL (err).
220 2005-10-02 Jakub Jelinek <jakub@redhat.com>
222 * allocatestack.c (setxid_signal_thread): Need to use
223 atomic_compare_and_exchange_bool_acq.
225 2005-10-01 Ulrich Drepper <drepper@redhat.com>
226 Jakub Jelinek <jakub@redhat.com>
228 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
230 (struct pthread): Move specific_used field to avoid padding.
231 Add setxid_futex field.
232 * init.c (sighandler_setxid): Reset setxid flag and release the
234 * allocatestack.c (setxid_signal_thread): New function. Broken
235 out of the bodies of the two loops in __nptl_setxid. For undetached
236 threads check whether they are exiting and if yes, don't send a signal.
237 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
238 * pthread_create.c (start_thread): For undetached threads, check
239 whether setxid bit is set. If yes, wait until signal has been
242 * allocatestack.c (STACK_VARIABLES): Initialize them.
243 * pthread_create.c (__pthread_create_2_1): Initialize pd.
245 2004-09-02 Jakub Jelinek <jakub@redhat.com>
247 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
248 waiters, awake all waiters on the associated mutex.
250 2005-09-22 Roland McGrath <roland@redhat.com>
252 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
253 ../sysdeps/x86_64/hp-timing.h).
255 2005-08-29 Jakub Jelinek <jakub@redhat.com>
257 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
258 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
259 (lll_futex_wake_unlock): Define.
260 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
261 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
262 (lll_futex_wake_unlock): Define.
263 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
264 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
265 (lll_futex_wake_unlock): Define.
266 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
267 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
268 (lll_futex_wake_unlock): Define.
269 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
270 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
271 (lll_futex_wake_unlock): Define.
272 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
273 lll_futex_wake_unlock.
274 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
275 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
276 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
277 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
278 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
279 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
281 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
283 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
284 Fix typo in register name.
286 2005-08-23 Ulrich Drepper <drepper@redhat.com>
288 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
289 Use __sigfillset. Document that sigfillset does the right thing wrt
292 2005-07-11 Jakub Jelinek <jakub@redhat.com>
295 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
296 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
297 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
298 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
299 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
300 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
302 * Makefile (tests): Add tst-initializers1.
303 (CFLAGS-tst-initializers1.c): Set.
304 * tst-initializers1.c: New test.
306 2005-07-11 Jakub Jelinek <jakub@redhat.com>
308 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
309 Make sure __flags are located at offset 48 from the start of the
312 2005-07-02 Roland McGrath <roland@redhat.com>
314 * Makeconfig: Comment fix.
316 2005-07-05 Jakub Jelinek <jakub@redhat.com>
318 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
319 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
320 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
321 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
322 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
323 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
324 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
325 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
326 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
327 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
329 2005-06-25 Jakub Jelinek <jakub@redhat.com>
331 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
332 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
333 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
335 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
336 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
337 field. Put in sysinfo field unconditionally.
338 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
339 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
340 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
341 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
343 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
344 * pthread_create.c (__pthread_create_2_1): Use
345 THREAD_COPY_STACK_GUARD macro.
346 * Makefile: Add rules to build and run tst-stackguard1{,-static}
348 * tst-stackguard1.c: New file.
349 * tst-stackguard1-static.c: New file.
351 2005-06-14 Alan Modra <amodra@bigpond.net.au>
353 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
354 Invoke CGOTSETUP and CGOTRESTORE.
355 (CGOTSETUP, CGOTRESTORE): Define.
357 2005-05-29 Richard Henderson <rth@redhat.com>
359 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
360 (tf_write, tf_writev): Use it.
361 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
364 2005-05-23 Jakub Jelinek <jakub@redhat.com>
366 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
367 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
368 __librt_*_asynccancel@local.
370 2005-05-17 Alan Modra <amodra@bigpond.net.au>
372 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
373 all occurrences of JUMPTARGET. Instead append @local to labels.
375 2005-05-20 Jakub Jelinek <jakub@redhat.com>
377 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
378 size/alignment of struct pthread rather than tcbhead_t.
379 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
381 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
383 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
386 2005-05-19 Richard Henderson <rth@redhat.com>
388 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
389 __sync_val_compare_and_swap, not explicit _si variant.
390 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
392 2005-05-03 Ulrich Drepper <drepper@redhat.com>
395 * sysdeps/pthread/pthread.h: Avoid empty initializers.
397 2005-05-03 Jakub Jelinek <jakub@redhat.com>
399 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
400 .eh_frame section, use cfi_* directives.
402 2005-04-27 Jakub Jelinek <jakub@redhat.com>
404 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
407 2005-04-27 Ulrich Drepper <drepper@redhat.com>
410 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
413 2005-04-27 Roland McGrath <roland@redhat.com>
415 * Makefile (tests): Remove tst-clock2.
417 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
418 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
419 translating to the kernel clockid_t for our own process/thread clock.
421 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
423 2005-04-15 Jakub Jelinek <jakub@redhat.com>
425 * old_pthread_cond_init.c: Include <errno.h>.
426 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
427 process shared or uses clock other than CLOCK_REALTIME.
428 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
430 2005-04-13 David S. Miller <davem@davemloft.net>
432 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
433 * sysdeps/sparc/sparc64/clone.S: New file.
435 2005-04-05 Jakub Jelinek <jakub@redhat.com>
438 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
439 __inline instead of inline.
440 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
442 2005-03-31 Jakub Jelinek <jakub@redhat.com>
444 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
445 functionally equivalent, but shorter instructions.
446 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
447 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
448 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
450 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
451 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
452 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
453 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
454 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
455 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
456 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
458 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
459 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
460 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
461 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
462 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
464 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
466 * sysdeps/mips/Makefile: New file.
467 * sysdeps/mips/nptl-sysdep.S: New file.
468 * sysdeps/mips/tcb-offsets.sym: New file.
469 * sysdeps/mips/pthread_spin_lock.S: New file.
470 * sysdeps/mips/pthread_spin_trylock.S: New file.
471 * sysdeps/mips/pthreaddef.h: New file.
472 * sysdeps/mips/tls.h: New file.
473 * sysdeps/mips/jmpbuf-unwind.h: New file.
474 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
475 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
476 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
477 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
478 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
479 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
480 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
481 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
482 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
483 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
485 2005-03-23 Ulrich Drepper <drepper@redhat.com>
488 * pthread_create.c (__pthread_create_2_1): Rename syscall error
491 2005-03-10 Jakub Jelinek <jakub@redhat.com>
493 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
495 2005-02-25 Roland McGrath <roland@redhat.com>
497 * alloca_cutoff.c: Correct license text.
498 * tst-unload.c: Likewise.
499 * sysdeps/pthread/allocalim.h: Likewise.
500 * sysdeps/pthread/pt-initfini.c: Likewise.
501 * sysdeps/pthread/bits/libc-lock.h: Likewise.
502 * sysdeps/pthread/bits/sigthread.h: Likewise.
503 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
504 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
506 2005-02-16 Roland McGrath <roland@redhat.com>
508 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
509 Use unsigned int * for ptr_nthreads.
511 2005-02-14 Alan Modra <amodra@bigpond.net.au>
514 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
517 2005-02-07 Richard Henderson <rth@redhat.com>
520 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
523 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
525 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
526 order of arguments in invocation of atomic_add_zero.
528 2005-01-26 Jakub Jelinek <jakub@redhat.com>
531 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
532 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
533 at least gotntpoff relocation and addition.
534 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
536 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
538 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
541 2005-01-06 Ulrich Drepper <drepper@redhat.com>
543 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
544 entry for static tls deallocation fix.
545 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
546 also contains information whether the memory pointed to is static
548 * sysdeps/i386/tls.h: Likewise.
549 * sysdeps/ia64/tls.h: Likewise.
550 * sysdeps/powerpc/tls.h: Likewise.
551 * sysdeps/s390/tls.h: Likewise.
552 * sysdeps/sh/tls.h: Likewise.
553 * sysdeps/sparc/tls.h: Likewise.
554 * sysdeps/x86_64/tls.h: Likewise.
556 2004-12-27 Ulrich Drepper <drepper@redhat.com>
558 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
560 2004-12-21 Jakub Jelinek <jakub@redhat.com>
562 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
564 * Makefile (tests): Add tst-align2.
565 * tst-align2.c: New test.
566 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
567 -mpreferred-stack-boundary=4.
569 2004-12-18 Roland McGrath <roland@redhat.com>
571 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
572 New file removed withdrawn for the moment.
574 2004-12-17 Richard Henderson <rth@redhat.com>
576 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
577 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
579 2004-12-16 Ulrich Drepper <drepper@redhat.com>
581 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
582 Increased PTHREAD_STACK_MIN.
584 * tst-context1.c (stacks): Use bigger stack size.
586 2004-12-16 Jakub Jelinek <jakub@redhat.com>
588 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
589 * sysdeps/sparc/tcb-offsets.sym: Add TID.
591 2004-12-15 Jakub Jelinek <jakub@redhat.com>
593 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
594 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
595 * sysdeps/s390/tcb-offsets.sym (TID): Add.
597 2004-12-15 Ulrich Drepper <drepper@redhat.com>
599 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
601 2004-12-14 Ulrich Drepper <drepper@redhat.com>
603 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
604 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
606 * tst-getpid1.c: If child crashes, report this first. Print which
609 2004-12-09 Ulrich Drepper <drepper@redhat.com>
611 * init.c (__pthread_initialize_minimal_internal): Also unblock
614 2004-12-01 Jakub Jelinek <jakub@redhat.com>
616 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
617 _POSIX_THREAD_CPUTIME): Define to 0.
618 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
619 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
620 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
621 __timer_signal_thread_tclk): Remove.
622 (init_module): Remove their initialization.
623 (thread_cleanup): Remove their cleanup assertions.
624 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
625 __timer_signal_thread_tclk): Remove.
626 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
627 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
628 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
630 2004-12-07 Jakub Jelinek <jakub@redhat.com>
632 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
633 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
635 * Makefile (tests): Add tst-getpid2.
636 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
637 (do_test): Use it. Use __clone2 instead of clone on ia64.
638 * tst-getpid2.c: New test.
640 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
642 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
644 2004-12-04 Ulrich Drepper <drepper@redhat.com>
646 * Makefile (tests): Add tst-getpid1.
647 * tst-getpid1.c: New file.
648 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
649 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
651 2004-12-02 Roland McGrath <roland@redhat.com>
653 * Makefile (libpthread-nonshared): Variable removed.
654 ($(objpfx)libpthread_nonshared.a): Target removed.
655 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
656 These are now handled by generic magic from
657 libpthread-static-only-routines being set.
659 2004-11-27 Ulrich Drepper <drepper@redhat.com>
661 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
662 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
663 _POSIX_THREAD_PRIO_PROTECT): Define.
664 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
665 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
666 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
668 2004-11-26 Jakub Jelinek <jakub@redhat.com>
670 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
671 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
672 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
673 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
674 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
675 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
676 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
678 2004-11-24 Ulrich Drepper <drepper@redhat.com>
680 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
682 * Makefile (libpthread-routines): Add pthread_setschedprio.
683 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
684 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
685 * pthread_setschedprio.c: New file.
687 2004-11-20 Jakub Jelinek <jakub@redhat.com>
689 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
690 * pthread_cancel.c (pthread_create): Likewise.
692 * Makefile (libpthread-routines): Add vars.
693 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
694 * init.c (__default_stacksize, __is_smp): Remove.
696 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
697 and define a wrapper macro.
698 (PTHREAD_STATIC_FN_REQUIRE): Define.
699 * allocatestack.c (__find_thread_by_id): Undefine.
700 * pthread_create (__pthread_keys): Remove.
701 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
702 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
703 PTHREAD_STATIC_FN_REQUIRE.
705 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
707 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
708 parameter to REGISTER macro.
710 2004-11-17 Roland McGrath <roland@redhat.com>
712 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
713 Make sure SIGCANCEL is blocked as well.
715 2004-11-10 Jakub Jelinek <jakub@redhat.com>
717 * sysdeps/pthread/setxid.h: New file.
718 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
719 (struct xid_command): Add forward decl.
720 (struct pthread_functions): Change return type of __nptl_setxid hook
722 * pthreadP.h (__nptl_setxid): Change return type to int.
723 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
724 calling thread, return its return value and set errno on failure.
725 * descr.h (struct xid_command): Change id type to long array.
727 * Makefile: Add rules to build and test tst-setuid1 and
729 * tst-setuid1.c: New test.
730 * tst-setuid1-static.c: New test.
732 2004-11-10 Jakub Jelinek <jakub@redhat.com>
734 * Makefile (tests): Add tst-exit3.
735 * tst-exit3.c: New test.
737 2004-11-09 Ulrich Drepper <drepper@redhat.com>
739 * Makefile (tests): Add tst-exit2.
740 * tst-exit2.c: New file.
742 2004-11-09 Roland McGrath <roland@redhat.com>
745 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
746 here, before calling clone.
747 * pthread_create.c (start_thread): Don't do it here.
749 2004-11-02 Jakub Jelinek <jakub@redhat.com>
751 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
753 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
755 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
756 Set ETIMEDOUT to errno when time is up. Tweak to avoid
759 2004-10-28 Jakub Jelinek <jakub@redhat.com>
761 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
762 if sched_priority is not between minprio and maxprio.
764 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
766 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
767 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
769 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
770 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
772 2004-10-24 Ulrich Drepper <drepper@redhat.com>
774 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
775 not-cancelable I/O functions.
777 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
779 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
780 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
781 make sure 2 is stored in the futex and we looked at the old value.
782 Fix a few other problems to return the correct value.
784 2004-10-14 Richard Henderson <rth@redhat.com>
786 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
789 2004-10-06 Jakub Jelinek <jakub@redhat.com>
791 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
792 of pthread-functions.h and pthreaddef.h.
793 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
795 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
796 Change __data.__nwaiters from int to unsigned int.
798 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
799 sysconf (_SC_THREAD_CPUTIME) returns negative value.
801 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
804 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
805 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
807 2004-10-06 Ulrich Drepper <drepper@redhat.com>
809 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
810 test fails, remove message queue.
811 (tf_msgsnd): Likewise.
813 2004-10-05 Jakub Jelinek <jakub@redhat.com>
815 * tst-clock1.c: Change #ifdef to #if defined.
816 * tst-clock2.c: Likewise.
817 * tst-cond11.c: Likewise.
819 * sysdeps/pthread/timer_create.c (timer_create): Use
820 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
821 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
824 2004-10-05 Jakub Jelinek <jakub@redhat.com>
826 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
827 _POSIX_THREAD_CPUTIME): Define to 0.
829 2004-10-04 Ulrich Drepper <drepper@redhat.com>
831 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
832 and _POSIX_THREAD_CPUTIME to zero.
833 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
834 * tst-barrier2.c: Fix testing for POSIX feature.
835 * tst-clock1.c: Likewise.
836 * tst-clock2.c: Likewise.
837 * tst-cond11.c: Likewise.
838 * tst-cond4.c: Likewise.
839 * tst-cond6.c: Likewise.
840 * tst-flock2.c: Likewise.
841 * tst-mutex4.c: Likewise.
842 * tst-mutex9.c: Likewise.
843 * tst-rwlock12.c: Likewise.
844 * tst-rwlock4.c: Likewise.
845 * tst-signal1.c: Likewise.
846 * tst-spin2.c: Likewise.
847 * sysdeps/pthread/posix-timer.h: Likewise.
848 * sysdeps/pthread/timer_create.c: Likewise.
849 * sysdeps/pthread/timer_routines.c: Likewise.
851 2004-10-01 Ulrich Drepper <drepper@redhat.com>
853 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
854 (__lll_mutex_timedlock_wait): Address futex correctly.
856 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
857 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
858 make sure 2 is stored in the futex and we looked at the old value.
859 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
860 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
861 which might very well made the code not working at all before.
864 2004-09-28 Ulrich Drepper <drepper@redhat.com>
866 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
867 allow SIGSETXID to be sent.
868 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
869 for SIGSETXID to be defined.
870 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
871 SIGSETXID cannot be blocked.
873 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
874 Add __extension__ to long long types.
875 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
876 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
877 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
878 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
879 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
880 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
881 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
883 2004-09-25 Ulrich Drepper <drepper@redhat.com>
885 * descr.h (struct pthread): Add stopped_start field.
886 * sysdeps/pthread/createthread.c (create_thread): Set
887 start_stopped flag in descriptor for new thread appropriately.
888 * pthread_create.c (start_thread): Only take lock to be stopped on
889 startup if stopped_start flag says so.
891 2004-09-24 Ulrich Drepper <drepper@redhat.com>
893 * pthread_create.c (__pthread_create_2_1): Remember whether thread
894 is created detached and if yes, do not try to free the stack in case
895 the thread creation failed.
896 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
897 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
898 case there has been no error. [BZ #405]
900 * pthread_create.c (start_thread): Don't wait for scheduler data
901 etc to be set at the beginning of the function. The cancellation
902 infrastructure must have been set up. And enable async
903 cancellation before potentially going to sleep. [BZ #401]
905 2004-09-20 Ulrich Drepper <drepper@redhat.com>
907 * Versions: Remove exports for pthread_set*id_np functions.
908 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
910 * Makefile: Don't build pthread_set*id code for now.
912 2004-09-19 Ulrich Drepper <drepper@redhat.com>
914 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
916 * allocatestack.c (__nptl_setxid): New function.
917 * descr.h (struct xid_command): Define type.
918 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
919 (sighandler_setxid): New function.
920 (__pthread_initialize_minimal): Register sighandler_setxid for
922 * pt-allocrtsig.c: Update comment.
923 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
924 Declare __nptl_setxid.
925 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
926 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
927 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
928 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
929 and pthread_setresuid_np.
930 * pthread_setgid_np.c: New file.
931 * pthread_setuid_np.c: New file.
932 * pthread_setegid_np.c: New file.
933 * pthread_seteuid_np.c: New file.
934 * pthread_setregid_np.c: New file.
935 * pthread_setreuid_np.c: New file.
936 * pthread_setresgid_np.c: New file.
937 * pthread_setresuid_np.c: New file.
938 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
939 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
940 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
941 and pthread_setresuid_np.
942 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
943 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
944 pthread_setregid, and pthread_setresgid.
946 2004-09-18 Ulrich Drepper <drepper@redhat.com>
948 * allocatestack.c (allocate_stack): Return EAGAIN instead of
949 ENOMEM when out of memory.
951 2004-09-10 Roland McGrath <roland@redhat.com>
954 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
955 code, since we don't try to use the broken CLONE_STOPPED any more.
956 * pthread_create.c (start_thread): Likewise.
958 2004-09-15 Richard Henderson <rth@redhat.com>
960 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
962 2004-09-01 David Mosberger <davidm@hpl.hp.com>
964 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
965 (__libc_unwind_longjmp): Delete macro and declare as function.
966 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
967 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
969 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
970 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
971 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
973 2004-09-12 Ulrich Drepper <drepper@redhat.com>
975 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
977 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
978 types also for __USE_XOPEN2K.
979 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
980 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
981 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
982 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
983 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
984 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
985 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
988 2004-09-08 Ulrich Drepper <drepper@redhat.com>
990 * sysdeps/pthread/pthread.h
991 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
992 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
993 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
994 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
997 2004-09-07 Ulrich Drepper <drepper@redhat.com>
999 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
1000 PSEUDO to be used with . prefix.
1002 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
1003 Use atomic_increment instead of atomic_exchange_and_add.
1004 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
1006 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
1008 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1011 * allocatestack.c (allocate_stack): Use atomic_increment_val
1012 instead of atomic_exchange_and_add.
1013 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
1014 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1016 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1019 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
1020 the initialization function might throw.
1022 2005-09-05 Richard Henderson <rth@redhat.com>
1024 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1025 Move definition inside libpthread, libc, librt check. Provide
1026 definition for rtld.
1028 2004-09-02 Ulrich Drepper <drepper@redhat.com>
1030 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
1031 * sysdeps/i386/jmpbuf-unwind.h: Likewise
1032 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
1033 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
1034 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
1035 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
1036 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
1037 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
1040 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1041 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
1042 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1044 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1045 Decrement __nwaiters. If pthread_cond_destroy has been called and
1046 this is the last waiter, signal pthread_cond_destroy caller and
1047 avoid using the pthread_cond_t structure after unlock.
1048 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1049 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1050 Read clock type from the least significant bits of __nwaiters instead
1052 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1053 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
1055 2004-08-31 Jakub Jelinek <jakub@redhat.com>
1058 * Makefile (tests): Add tst-cond20 and tst-cond21.
1059 * tst-cond20.c: New test.
1060 * tst-cond21.c: New test.
1061 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1062 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
1064 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1066 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1067 (pthread_cond_t): Likewise.
1068 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
1070 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1072 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
1074 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
1075 (cond_nwaiters): New.
1077 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
1078 if there are waiters not signalled yet.
1079 Wait until all already signalled waiters wake up.
1080 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
1081 __nwaiters. If pthread_cond_destroy has been called and this is the
1082 last waiter, signal pthread_cond_destroy caller and avoid using
1083 the pthread_cond_t structure after unlock.
1084 (__pthread_cond_wait): Increment __nwaiters in the beginning,
1085 decrement it when leaving. If pthread_cond_destroy has been called
1086 and this is the last waiter, signal pthread_cond_destroy caller.
1087 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1088 Likewise. Read clock type from the least significant bits of
1089 __nwaiters instead of __clock.
1090 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
1091 whether clock ID can be encoded in COND_CLOCK_BITS bits.
1092 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
1093 clock type just from the last COND_CLOCK_BITS bits of value.
1094 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
1095 instead of __clock, just from second bit of condattr's value.
1097 2004-08-30 Jakub Jelinek <jakub@redhat.com>
1099 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
1100 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
1102 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1104 2004-08-15 Roland McGrath <roland@frob.com>
1106 * pthread_atfork.c: Update copyright terms including special exception
1107 for these trivial files, which are statically linked into executables
1108 that use dynamic linking for the significant library code.
1110 2004-08-09 Jakub Jelinek <jakub@redhat.com>
1112 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
1113 pthread_rwlock_rdlock.
1114 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
1115 Decrease __nr_readers_queued after reacquiring lock.
1116 * sysdeps/pthread/pthread_rwlock_timedrdlock
1117 (pthread_rwlock_timedrdlock): Likewise.
1118 Reported by Bob Cook <bobcook47@hotmail.com>.
1120 2004-08-11 Jakub Jelinek <jakub@redhat.com>
1122 * tst-rwlock14.c (tf): Read main thread handle from *ARG
1123 before pthread_barrier_wait.
1125 2004-08-07 Ulrich Drepper <drepper@redhat.com>
1127 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1128 Remove unnecessary exception handling data.
1130 2004-07-23 Jakub Jelinek <jakub@redhat.com>
1133 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
1134 instead of clockid_t.
1136 2004-07-21 Roland McGrath <roland@redhat.com>
1138 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
1140 2004-07-19 Roland McGrath <roland@redhat.com>
1142 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
1144 2004-07-02 Roland McGrath <roland@redhat.com>
1146 * configure: Don't exit.
1148 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1150 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1151 (__pthread_cond_timedwait): Check for invalid nanosecond in
1154 2004-07-07 Ulrich Drepper <drepper@redhat.com>
1156 * Makefile: Add rules to build and run tst-fini1.
1157 * tst-fini1.c: New file.
1158 * tst-fini1mod.c: New file.
1160 2004-07-05 Ulrich Drepper <drepper@redhat.com>
1162 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
1163 if no cancellation support is needed.
1164 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1165 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1166 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1167 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1168 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1169 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1170 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1171 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1172 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1174 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
1175 only if not already defined.
1177 2004-07-05 Jakub Jelinek <jakub@redhat.com>
1179 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
1180 constraint "m" instead of "0" for futex.
1182 * shlib-versions: Add powerpc64-.*-linux.*.
1184 2004-07-04 Jakub Jelinek <jakub@redhat.com>
1186 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1187 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
1189 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
1190 1 billion and 64-bit tv_nsec which is valid when truncated to 32
1193 2004-06-29 Roland McGrath <roland@redhat.com>
1195 * Banner: NPTL no longer has its own version number.
1196 * Makefile (nptl-version): Variable removed.
1197 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
1198 using $(version), the glibc version number.
1200 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1202 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
1203 Fix branch offset for a PLT entry.
1204 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1206 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1208 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
1210 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
1213 2004-06-28 Jakub Jelinek <jakub@redhat.com>
1215 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
1218 2004-06-28 Jakub Jelinek <jakub@redhat.com>
1220 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1221 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
1223 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
1224 (pthread_rwlock_timedrdlock): Likewise.
1226 2004-06-22 Jakub Jelinek <jakub@redhat.com>
1228 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
1229 Set __r7 to val, not mutex.
1231 2004-06-27 Ulrich Drepper <drepper@redhat.com>
1233 * Makefile: Add rules to build tst-rwlock14.
1234 * tst-rwlock14.c: New file.
1236 2004-06-24 Boris Hu <boris.hu@intel.com>
1238 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
1240 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
1242 2004-06-19 Andreas Jaeger <aj@suse.de>
1244 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
1245 assembler in last patch.
1247 2004-06-17 Ulrich Drepper <drepper@redhat.com>
1249 * sysdeps/pthread/pthread_cond_timedwait.c
1250 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
1251 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1252 (__pthread_cond_timedwait): Check for invalid nanosecond in
1254 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1255 * tst-cond19.c: New file.
1256 * Makefile: Add rules to build and run tst-cond19.
1258 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
1260 * tst-context1.c (GUARD_PATTERN): Defined.
1261 (tst_context_t): Define struct containing ucontext_t & guard words.
1262 (ctx): Declare as an array of tst_context_t.
1263 (fct): Verify uc_link & guard words are still valid.
1264 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
1266 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1268 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1269 Add __data.__futex field, reshuffle __data.__clock.
1270 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
1271 (__pthread_cond_signal): Increment __futex at the same time as
1272 __wakeup_seq or __total_seq. Pass address of __futex instead of
1273 address of low 32-bits of __wakeup_seq to futex syscall.
1274 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1275 (__pthread_cond_wait): Likewise. Pass __futex value from before
1276 releasing internal lock to FUTEX_WAIT.
1277 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1278 (__pthread_cond_timedwait): Likewise.
1279 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1280 (FUTEX_CMP_REQUEUE): Define.
1281 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
1282 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
1283 Pass __futex value from before the unlock and __futex address instead
1284 of address of low 32-bits of __wakeup_seq to futex syscall.
1285 Fallback to FUTEX_WAKE all on any errors.
1287 2004-06-08 Jakub Jelinek <jakub@redhat.com>
1289 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
1291 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
1292 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
1293 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
1294 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
1295 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
1297 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1299 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
1300 Add memory clobber to inline assembly.
1301 (__lll_mutex_trylock): Likewise.
1302 (__lll_mutex_cond_trylock): Likewise.
1304 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
1306 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
1307 Pass val argument as 6th system call argument in %r7.
1309 2004-05-21 Jakub Jelinek <jakub@redhat.com>
1311 * Makefile (tests): Add tst-cond16.
1312 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
1313 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
1314 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1315 Add __data.__futex field, reshuffle __data.__clock.
1316 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
1317 (__pthread_cond_signal): Increment __futex at the same time as
1318 __wakeup_seq or __total_seq. Pass address of __futex instead of
1319 address of low 32-bits of __wakeup_seq to futex syscall.
1320 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
1321 (__pthread_cond_wait): Likewise. Pass __futex value from before
1322 releasing internal lock to FUTEX_WAIT.
1323 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
1324 (__pthread_cond_timedwait): Likewise.
1325 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
1326 (FUTEX_CMP_REQUEUE): Define.
1327 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
1328 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
1329 Pass __futex value from before the unlock and __futex address instead
1330 of address of low 32-bits of __wakeup_seq to futex syscall.
1331 Fallback to FUTEX_WAKE all on any errors.
1332 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
1334 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1335 internally. Return non-zero if error, zero if success.
1336 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
1337 Add __data.__futex field, reshuffle __data.__clock.
1338 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
1340 (lll_futex_requeue): Add val argument, return 1 unconditionally
1342 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1343 Add __data.__futex field, reshuffle __data.__clock.
1344 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
1346 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1347 internally. Return non-zero if error, zero if success.
1348 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1349 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
1350 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
1352 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1353 internally. Return non-zero if error, zero if success.
1354 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
1355 Add __data.__futex field, reshuffle __data.__clock.
1356 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
1358 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
1359 internally. Return non-zero if error, zero if success.
1360 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
1361 Add __data.__futex field, reshuffle __data.__clock.
1362 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1363 Add __data.__futex field, reshuffle __data.__clock.
1364 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
1365 Increment __futex at the same time as __wakeup_seq or __total_seq.
1366 Pass address of __futex instead of address of low 32-bits of
1367 __wakeup_seq to futex syscall.
1368 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
1369 Pass __futex value from before releasing internal lock
1371 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1372 Likewise. Avoid unnecessary shadowing of variables.
1373 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
1374 Set __futex to 2 * __total_seq. Pass __futex value from before the
1375 unlock and __futex address instead of address of low 32-bits of
1376 __wakeup_seq to futex_requeue macro, adjust for new return value
1378 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1379 (__pthread_cond_signal): Increment __futex at the same time as
1380 __wakeup_seq or __total_seq. Pass address of __futex instead of
1381 address of low 32-bits of __wakeup_seq to futex syscall.
1382 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1383 (__pthread_cond_wait): Likewise. Pass __futex value from before
1384 releasing internal lock to FUTEX_WAIT.
1385 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1386 (__pthread_cond_timedwait): Likewise.
1387 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1388 (FUTEX_CMP_REQUEUE): Define.
1389 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
1390 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
1391 Pass __futex value from before the unlock and __futex address instead
1392 of address of low 32-bits of __wakeup_seq to futex syscall.
1393 Fallback to FUTEX_WAKE all on any errors.
1395 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1397 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
1398 Add nop to align the end of critical section.
1399 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
1401 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1403 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1404 Add __broadcast_seq field.
1405 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
1406 all waiters as woken with woken_seq and bump broadcast counter.
1407 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
1408 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
1409 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1410 Comment typo fixes. Avoid returning -ETIMEDOUT.
1412 2004-06-01 Ulrich Drepper <drepper@redhat.com>
1414 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1415 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
1416 Reported by Kaz Kojima.
1418 2004-05-25 Jakub Jelinek <jakub@redhat.com>
1420 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
1422 2004-05-21 Jakub Jelinek <jakub@redhat.com>
1424 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
1425 __broadcast_seq with bc_seq after acquiring internal lock instead of
1428 2004-05-18 Jakub Jelinek <jakub@redhat.com>
1430 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
1432 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1433 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
1434 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1435 (pthread_cond_t): Add __data.__broadcast_seq field.
1436 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1437 (FRAME_SIZE): Define.
1438 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
1440 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
1442 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
1444 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1445 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
1448 2004-05-18 Ulrich Drepper <drepper@redhat.com>
1450 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
1451 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
1452 Add __broadcast_seq field.
1453 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1454 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1455 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1456 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1457 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1458 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
1459 all waiters as woken with woken_seq and bump broadcast counter.
1460 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
1461 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
1462 __broadcast_seq field.
1463 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1464 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
1465 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
1466 * pthread_cond_init.c: Initialize __broadcast_seq field.
1467 * Makefile (tests): Add tst-cond17 and tst-cond18.
1468 Add .NOTPARALLEL goal.
1469 * tst-cond16.c: New file. From Jakub.
1470 * tst-cond17.c: New file. From Jakub.
1471 * tst-cond18.c: New file. From Jakub.
1473 2004-05-16 Ulrich Drepper <drepper@redhat.com>
1475 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
1478 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1479 Parametrize frame size. Correct some unwind info.
1480 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1482 2004-05-04 Jakub Jelinek <jakub@redhat.com>
1484 * tst-stack3.c: Note testing functionality beyond POSIX.
1486 2004-05-04 Jakub Jelinek <jakub@redhat.com>
1488 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
1489 Change conditional from ifdef to if.
1491 2004-04-23 Jakub Jelinek <jakub@redhat.com>
1493 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
1494 SYSDEP_CANCEL_ERROR): Define.
1497 2004-05-01 Jakub Jelinek <jakub@redhat.com>
1499 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
1501 2004-04-20 Jakub Jelinek <jakub@redhat.com>
1503 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
1505 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1507 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
1508 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
1509 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
1510 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
1512 2004-04-19 Ulrich Drepper <drepper@redhat.com>
1514 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
1515 thread has all signals blocked.
1517 2004-04-18 Andreas Jaeger <aj@suse.de>
1519 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
1520 (SEM_VALUE_MAX): Add missing brace.
1522 2004-04-17 Jakub Jelinek <jakub@redhat.com>
1524 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
1526 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
1527 * sysdeps/pthread/tst-mqueue8x.c: New test.
1528 * tst-cancel4.c: Update comment about message queues.
1530 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
1531 return it_value { 0, 0 }.
1532 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
1534 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
1535 assertion for SIGEV_NONE.
1536 (thread_attr_compare): Compare all attributes, not just a partial
1539 2004-04-17 Jakub Jelinek <jakub@redhat.com>
1541 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
1543 2004-04-17 Ulrich Drepper <drepper@redhat.com>
1545 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
1546 Just use a plain number.
1547 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
1548 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1549 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1550 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1551 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1552 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1553 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1555 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1557 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
1559 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1561 2004-04-15 Jakub Jelinek <jakub@redhat.com>
1563 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
1564 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
1565 of calling sigwaitinfo.
1567 2004-04-16 Ulrich Drepper <drepper@redhat.com>
1569 * allocatestack.c (allocate_stack): Set reported_guardsize
1571 * pthread_getattr_np.c (pthread_getattr_np): Use
1572 reported_guardsize instead of guardsize.
1573 * descr.h (struct pthread): Add reported_guardsize field.
1575 2004-04-13 Jakub Jelinek <jakub@redhat.com>
1577 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
1579 2004-04-12 Ulrich Drepper <drepper@redhat.com>
1581 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
1583 2004-04-08 Jakub Jelinek <jakub@redhat.com>
1585 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
1586 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
1587 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
1588 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
1589 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
1591 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
1592 (_POSIX_MESSAGE_PASSING): Define.
1593 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
1594 (_POSIX_MESSAGE_PASSING): Define.
1595 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
1596 (_POSIX_MESSAGE_PASSING): Define.
1598 2004-04-04 Ulrich Drepper <drepper@redhat.com>
1600 * tst-context1.c (fct): Check whether correct stack is used.
1602 2004-04-03 Ulrich Drepper <drepper@redhat.com>
1604 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
1605 matching constraints for asm mem parameters.
1607 * tst-clock2.c (tf): Don't define unless needed.
1609 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
1611 * Makefile (link-libc-static): Use $(static-gnulib) instead of
1614 2004-03-30 Ulrich Drepper <drepper@redhat.com>
1616 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
1617 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
1618 * pthreadP.h: Declare __nptl_deallocate_tsd.
1619 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
1622 * Makefile (tests): Add tst-tsd5.
1623 * tst-tsd5.c: New file.
1625 2004-03-29 Ulrich Drepper <drepper@redhat.com>
1627 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
1628 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
1629 is SHLIB_COMPAT check.
1630 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
1631 (__pthread_attr_getaffinity_old): Likewise.
1632 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
1633 (__pthread_getaffinity_old): Likewise.
1634 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1635 (__pthread_setaffinity_old): Likewise.
1637 2004-03-26 Ulrich Drepper <drepper@redhat.com>
1639 * allocatestack.c (_make_stacks_executable): Call
1640 _dl_make_stack_executable first.
1642 2004-03-24 Roland McGrath <roland@redhat.com>
1644 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
1645 constraint instead of "0".
1647 2004-03-24 Ulrich Drepper <drepper@redhat.com>
1649 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1650 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
1652 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
1653 code to avoid warning.
1655 2004-03-24 Andreas Jaeger <aj@suse.de>
1657 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
1658 (__pthread_attr_setaffinity_old): Remove const.
1660 2004-03-23 Ulrich Drepper <drepper@redhat.com>
1662 * sysdeps/unix/sysv/linux/smp.h: New file.
1663 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
1664 * init.c: Define __is_smp.
1665 (__pthread_initialize_minimal_internal): Call is_smp_system to
1666 initialize __is_smp.
1667 * pthreadP.h: Declare __is_smp.
1668 Define MAX_ADAPTIVE_COUNT is necessary.
1669 * pthread_mutex_init.c: Add comment regarding __spins field.
1670 * pthread_mutex_lock.c: Implement adaptive mutex type.
1671 * pthread_mutex_timedlock.c: Likewise.
1672 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1673 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
1675 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1676 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1677 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1678 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1679 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1680 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1681 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1682 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
1683 lll_mutex_cond_trylock.
1684 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1685 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1686 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1687 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1688 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1689 Define BUSY_WAIT_NOP.
1690 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1691 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1693 * tst-mutex5.c: Add support for testing adaptive mutexes.
1694 * tst-mutex7.c: Likewise.
1695 * tst-mutex5a.c: New file.
1696 * tst-mutex7a.c: New file.
1697 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
1699 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1700 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
1701 vgettimeofday call might destroy the content.
1703 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
1706 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
1707 No need to restrict type of ret. Make it int. Add comment.
1709 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
1710 Remove unnecessary setne instruction.
1712 2004-03-22 Jakub Jelinek <jakub@redhat.com>
1714 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
1715 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
1716 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
1717 If realloc fails, break out of the loop.
1719 2004-03-20 Andreas Jaeger <aj@suse.de>
1721 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1722 (__pthread_setaffinity_old): Fix interface.
1723 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
1724 (__pthread_getaffinity_old): Likewise.
1726 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1727 (__pthread_setaffinity_new): Remove duplicate declaration.
1729 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1731 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
1732 the return value to a safe register.
1733 (CDISABLE): Set the function argument correctly.
1735 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1737 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
1738 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
1739 Rewrite so that only one locked memory operation per round is needed.
1740 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1741 (pthread_barrier_wait): After wakeup, release lock only when the
1742 last thread stopped using the barrier object.
1743 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1744 (__pthread_cond_wait): Don't store mutex address if the current
1745 value is ~0l. Add correct cleanup support and unwind info.
1746 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1747 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1748 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
1749 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
1750 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
1751 Add correct cleanup support and unwind info.
1752 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1753 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
1754 information for syscall wrappers.
1756 2004-03-18 Ulrich Drepper <drepper@redhat.com>
1758 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
1759 cpusetsize field, remove next.
1760 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
1761 parameter for size of the CPU set.
1762 (pthread_setaffinity_np): Likewise.
1763 (pthread_attr_getaffinity_np): Likewise.
1764 (pthread_attr_setaffinity_np): Likewise.
1765 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
1766 interface change, keep compatibility code.
1767 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
1768 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
1769 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
1770 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
1771 __pthread_getaffinity_np.
1772 * Versions: Add version for changed interfaces.
1773 * tst-attr3.c: Adjust test for interface change.
1774 * pthread_getattr_np.c: Query the kernel about the affinity mask with
1775 increasing buffer sizes.
1776 * pthread_attr_destroy.c: Remove unused list handling.
1777 * pthread_attr_init.c: Likewise.
1779 2004-03-17 Roland McGrath <roland@redhat.com>
1781 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
1782 first argument to clock_getres so we ever enable kernel timers.
1784 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
1786 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
1788 2004-03-12 Richard Henderson <rth@redhat.com>
1790 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
1791 oldvalue from CENABLE to CDISABLE.
1793 2004-03-12 Ulrich Drepper <drepper@redhat.com>
1795 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
1796 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1797 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1798 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1800 2004-03-11 Richard Henderson <rth@redhat.com>
1802 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
1803 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
1804 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
1806 2004-03-11 Jakub Jelinek <jakub@redhat.com>
1808 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
1809 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
1810 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
1812 2004-03-11 Jakub Jelinek <jakub@redhat.com>
1814 * forward.c (__pthread_cond_broadcast_2_0,
1815 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
1816 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
1817 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
1819 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1821 * sysdeps/sh/tcb-offsets.sym: Add PID.
1822 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
1823 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
1825 2004-03-10 Ulrich Drepper <drepper@redhat.com>
1827 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
1828 include <sysdep-cancel.h>, vfork is no cancellation point.
1829 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
1830 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
1831 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
1833 2004-03-10 Jakub Jelinek <jakub@redhat.com>
1835 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
1837 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1838 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1840 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
1842 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1843 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1844 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
1845 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
1846 of DO_CALL_VIA_BREAK. Work around a gas problem.
1848 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
1849 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
1850 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
1851 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
1852 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
1853 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
1855 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
1856 a local register for saving old PID. Negate PID in parent upon exit.
1858 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
1860 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
1861 before syscall, set to the old value in the parent afterwards.
1862 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1863 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
1865 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
1866 before syscall, set to the old value in the parent afterwards.
1867 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1868 * sysdeps/s390/tcb-offsets.sym: Add PID.
1870 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
1871 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1872 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
1873 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1874 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
1875 * sysdeps/sparc/tcb-offsets.sym: Add PID.
1877 2004-03-10 Andreas Schwab <schwab@suse.de>
1879 * sysdeps/ia64/tcb-offsets.sym: Add PID.
1880 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1881 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
1883 2004-03-09 Jakub Jelinek <jakub@redhat.com>
1885 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
1886 * tst-cancel21.c (do_one_test): Likewise.
1887 Reported by Gordon Jin <gordon.jin@intel.com>.
1889 2004-02-09 Jakub Jelinek <jakub@redhat.com>
1891 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
1892 if non-zero and set to INT_MIN if zero.
1893 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
1894 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
1895 (SAVE_PID, RESTORE_PID): Define.
1897 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
1898 Use relative path to avoid including NPTL i386/vfork.S.
1899 (SAVE_PID, RESTORE_PID): Define.
1900 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
1901 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
1902 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
1904 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
1905 * tst-vfork1.c: New test.
1906 * tst-vfork2.c: New test.
1907 * tst-vfork1x.c: New test.
1908 * tst-vfork2x.c: New test.
1910 2004-03-08 Ulrich Drepper <drepper@redhat.com>
1912 * sysdeps/i386/tcb-offsets.sym: Add PID.
1913 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
1914 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
1915 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
1917 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
1919 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
1921 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
1923 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
1926 2004-03-07 Ulrich Drepper <drepper@redhat.com>
1928 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
1931 * tst-once4.c: Remove unnecessary macro definition.
1933 * tst-mutex7.c (do_test): Limit thread stack size.
1934 * tst-once2.c (do_test): Likewise.
1935 * tst-tls3.c (do_test): Likewise.
1936 * tst-tls1.c (do_test): Likewise.
1937 * tst-signal3.c (do_test): Likewise.
1938 * tst-kill6.c (do_test): Likewise.
1939 * tst-key4.c (do_test): Likewise.
1940 * tst-join4.c (do_test): Likewise.
1941 * tst-fork1.c (do_test): Likewise.
1942 * tst-context1.c (do_test): Likewise.
1943 * tst-cond2.c (do_test): Likewise.
1944 * tst-cond10.c (do_test): Likewise.
1945 * tst-clock2.c (do_test): Likewise.
1946 * tst-cancel10.c (do_test): Likewise.
1947 * tst-basic2.c (do_test): Likewise.
1948 * tst-barrier4.c (do_test): Likewise.
1950 2004-03-05 Ulrich Drepper <drepper@redhat.com>
1952 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
1954 2004-03-01 Ulrich Drepper <drepper@redhat.com>
1956 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1957 (__pthread_cond_timedwait): Optimize wakeup test.
1958 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
1959 (__pthread_cond_wait): Likewise.
1960 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
1961 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1964 2004-02-29 Ulrich Drepper <drepper@redhat.com>
1966 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1967 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
1968 the atomic instruction needed.
1969 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1970 (__lll_mutex_lock_wait): Likewise.
1972 2004-02-28 Ulrich Drepper <drepper@redhat.com>
1974 * Makefile (tests): Add tst-cond14 and tst-cond15.
1975 * tst-cond14.c: New file.
1976 * tst-cond15.c: New file.
1978 2004-02-27 Ulrich Drepper <drepper@redhat.com>
1980 * sysdeps/pthread/createthread.c (create_thread): Remove use of
1981 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
1982 needs to be implemented differently to be useful.
1984 2004-02-26 Ulrich Drepper <drepper@redhat.com>
1986 * pthread_attr_setschedparam.c: Don't test priority against limits
1987 here. Set ATTR_FLAG_SCHED_SET flag.
1988 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
1989 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
1990 from parent thread to child. If attribute is used and scheduling
1991 parameters are not inherited, copy parameters from attribute or
1992 compute them. Check priority value.
1993 * pthread_getschedparam.c: If the parameters aren't known yet get
1994 them from the kernel.
1995 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
1996 ATTR_FLAG_POLICY_SET flag for thread.
1997 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
1998 and ATTR_FLAG_POLICY_SET.
2000 * sysdeps/pthread/createthread.c: Use tgkill if possible.
2002 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
2003 fail if stack address hasn't been set. Just return 0.
2005 2004-02-25 Ulrich Drepper <drepper@redhat.com>
2007 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
2008 libpthread for the files in this list.
2009 (CFLAGS-tst-unload): Removed.
2010 * tst-unload.c (do_test): Don't use complete path for
2013 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
2016 2004-02-22 Ulrich Drepper <drepper@redhat.com>
2018 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2019 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
2020 operation per round is needed.
2021 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2022 (__lll_mutex_lock_wait): Likewise.
2024 2004-02-20 Ulrich Drepper <drepper@redhat.com>
2026 * tst-cancel9.c (cleanup): Don't print to stderr.
2028 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2030 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
2032 2004-02-20 Jakub Jelinek <jakub@redhat.com>
2034 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2035 (__syscall_error_handler2): Call CDISABLE.
2036 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2037 (__syscall_error_handler2): Call CDISABLE.
2039 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2040 Release lock before the loop, don't reacquire it.
2042 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
2044 2004-02-19 Andreas Schwab <schwab@suse.de>
2046 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2049 2004-02-18 Ulrich Drepper <drepper@redhat.com>
2051 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
2052 (pthread_barrier_wait): After wakeup, release lock only when the
2053 last thread stopped using the barrier object.
2054 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
2055 (pthread_barrier_wait): Likewise.
2056 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2058 * Makefile (tests): Add tst-barrier4.
2059 * tst-barrier4.c: New file.
2061 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2062 (__pthread_cond_timedwait): Perform timeout test while holding
2063 internal lock to prevent wakeup race.
2064 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2065 * sysdeps/pthread/pthread_cond_timedwait.c
2066 (__pthread_cond_timedwait): Likewise.
2067 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2068 (__pthread_cond_timedwait): Likewise.
2070 2004-02-18 Jakub Jelinek <jakub@redhat.com>
2072 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
2073 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
2074 * Makefile (tests): Add tst-rwlock13.
2075 * tst-rwlock13.c: New test.
2077 2004-02-16 Ulrich Drepper <drepper@redhat.com>
2079 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2080 (__condvar_tw_cleanup): Little optimization.
2081 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2083 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
2085 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
2086 libpthread as "lib" parameter to SHLIB_COMPAT.
2087 (__novmx_siglongjmp): Fix typo in function name.
2088 (__novmx_longjmp): Fix typo in function name.
2090 2004-02-13 Ulrich Drepper <drepper@redhat.com>
2092 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
2095 * sysdeps/generic/pt-longjmp.c: Moved to...
2096 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
2098 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
2100 * Makefile (libpthread-routines): Add pt-cleanup.
2101 * pt-longjmp.c: Removed.
2102 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
2103 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
2104 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
2105 Version longjmp, siglongjmp for GLIBC_2.3.4.
2106 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
2108 2004-02-13 Ulrich Drepper <drepper@redhat.com>
2110 * sysdeps/pthread/pthread_cond_timedwait.c
2111 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
2112 Reuse code. Add __builtin_expects.
2114 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2115 (__pthread_cond_timedwait): Get internal lock in case timeout has
2116 passed before the futex syscall.
2117 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2119 2004-01-20 Ulrich Drepper <drepper@redhat.com>
2121 * allocatestack.c: Pretty printing.
2123 * sysdeps/pthread/createthread.c (create_thread): Don't add
2124 CLONE_DETACHED bit if it is not necessary.
2126 2004-01-16 Ulrich Drepper <drepper@redhat.com>
2128 * pthread_getattr_np.c: Include ldsodefs.h.
2130 2004-01-16 Richard Henderson <rth@redhat.com>
2132 * allocatestack.c: Don't declare __libc_stack_end.
2133 * init.c (__pthread_initialize_minimal_internal): Likewise.
2134 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
2136 2004-01-15 Richard Henderson <rth@redhat.com>
2138 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
2139 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
2140 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
2141 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
2142 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
2143 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
2144 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
2145 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
2147 2004-01-14 Ulrich Drepper <drepper@redhat.com>
2149 * init.c (pthread_functions): Make array const.
2151 2004-01-13 Ulrich Drepper <drepper@redhat.com>
2153 * allocatestack.c (__make_stacks_executable): Change interface.
2154 Check parameters. Pass parameter on to libc counterpart.
2155 * pthreadP.h: Change declaration.
2157 2004-01-13 Richard Henderson <rth@redhat.com>
2159 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
2161 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
2164 * sysdeps/alpha/Makefile: New file.
2165 * sysdeps/alpha/tcb-offsets.sym: New file.
2166 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2167 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
2169 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
2172 2004-01-08 Jakub Jelinek <jakub@redhat.com>
2174 * Makefile (tests): Add tst-backtrace1.
2175 * tst-backtrace1.c: New test.
2177 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
2179 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
2180 register as second parameter to the REGISTER macro.
2181 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
2182 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
2183 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
2184 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
2185 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
2186 of thread register as second parameter to REGISTER macro in 64 case.
2188 2004-01-03 Ulrich Drepper <drepper@redhat.com>
2190 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
2191 (CFLAGS-getpid.o): Defined.
2192 (CFLAGS-getpid.os): Defined.
2194 2003-12-31 Ulrich Drepper <drepper@redhat.com>
2196 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
2197 returned for main thread does not overlap with any other VMA.
2198 Patch by Jakub Jelinek.
2200 2003-12-29 Jakub Jelinek <jakub@redhat.com>
2202 * tst-raise1.c: Include stdio.h.
2204 2003-12-23 Jakub Jelinek <jakub@redhat.com>
2206 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
2207 setting with __ASSUME_TGKILL || defined __NR_tgkill.
2208 If pid is 0, set it to selftid.
2209 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
2210 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
2211 != 0, return self->tid without doing a syscall.
2212 * descr.h (struct pthread): Move pid field after tid.
2214 * Makefile (tests): Add tst-raise1.
2215 * tst-raise1.c: New file.
2217 2003-12-23 Roland McGrath <roland@redhat.com>
2219 * tst-oddstacklimit.c: New file.
2220 * Makefile (tests): Add it.
2221 (tst-oddstacklimit-ENV): New variable.
2223 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
2224 value up to page size for __default_stacksize.
2226 2003-12-21 Ulrich Drepper <drepper@redhat.com>
2228 * Makefile (tests): Add tst-eintr5.
2229 * tst-eintr5.c: New file.
2231 * eintr.c (eintr_source): Prevent sending signal to self.
2233 * tst-eintr2.c (tf1): Improve error message.
2235 2003-12-20 Ulrich Drepper <drepper@redhat.com>
2237 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
2238 * sysdeps/unix/sysv/linux/getpid.c: New file.
2239 * pthread_cancel.c: Add comment explaining use of PID field.
2240 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
2241 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
2242 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
2243 temporarily to signal the field must not be relied on and updated
2245 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
2246 temporarily negative.
2247 * sysdeps/unix/sysv/linux/raise.c: Likewise.
2249 2003-12-19 Ulrich Drepper <drepper@redhat.com>
2251 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
2252 (eintr_source): If ARG != NULL, use pthread_kill.
2253 * tst-eintr1.c: Adjust for this change.
2254 * tst-eintr2.c: Likewise.
2255 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
2256 * tst-eintr3.c: New file.
2257 * tst-eintr4.c: New file.
2259 2003-12-19 Jakub Jelinek <jakub@redhat.com>
2261 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
2262 if CANCELSTATE_BITMASK is set.
2263 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
2266 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
2267 (tests-reverse): Add tst-cancel23.
2268 * tst-cancel22.c: New test.
2269 * tst-cancel23.c: New test.
2271 2003-12-18 Ulrich Drepper <drepper@redhat.com>
2273 * tst-eintr1.c: Better error messages.
2275 * Makefile (tests): Add tst-eintr2.
2276 * tst-eintr2.c: New file.
2278 2003-12-18 Jakub Jelinek <jakub@redhat.com>
2280 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
2281 (CFLAGS-tst-cancelx21.c): Set.
2282 * tst-cancel21.c: New test.
2283 * tst-cancelx21.c: New test.
2285 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
2287 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
2288 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
2289 * pt-longjmp.c: Include jmpbuf-unwind.h.
2290 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
2291 _JMPBUF_UNWINDS. Adjust compared pointers.
2292 * init.c (__pthread_initialize_minimal_internal): Initialize
2293 pd->stackblock_size.
2294 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
2295 * sysdeps/alpha/jmpbuf-unwind.h: New file.
2296 * sysdeps/i386/jmpbuf-unwind.h: New file.
2297 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
2298 * sysdeps/s390/jmpbuf-unwind.h: New file.
2299 * sysdeps/sh/jmpbuf-unwind.h: New file.
2300 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
2301 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
2302 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
2303 (_JMPBUF_CFA_UNWINDS): Remove.
2304 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
2306 2003-12-12 Jakub Jelinek <jakub@redhat.com>
2308 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
2309 (CFLAGS-tst-cancelx20.c): Set.
2310 * tst-cancel20.c: New test.
2311 * tst-cancelx20.c: New test.
2313 2003-12-17 Ulrich Drepper <drepper@redhat.com>
2315 * init.c (__pthread_initialize_minimal_internal): Don't treat
2316 architectures with separate register stack special here when
2317 computing default stack size.
2319 2003-12-17 Roland McGrath <roland@redhat.com>
2321 * Makefile (tst-cancelx7-ARGS): New variable.
2322 Reportd by Greg Schafer <gschafer@zip.com.au>.
2324 2003-12-17 Jakub Jelinek <jakub@redhat.com>
2326 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
2327 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
2328 (tst-stack3-ENV): Set.
2329 ($(objpfx)tst-stack3-mem): New.
2330 * tst-stack3.c: New test.
2332 2003-12-10 David Mosberger <davidm@hpl.hp.com>
2334 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
2335 Add unwind directives. Drop unused .regstk directive.
2336 (_fini_EPILOG_BEGINS): Add unwind directives.
2338 2003-12-11 Ulrich Drepper <drepper@redhat.com>
2340 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2341 Assume parameter is a pointer.
2342 (lll_futex_wake): Likewise.
2343 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
2345 (lll_futex_wake): Likewise.
2346 Reported by Boris Hu.
2347 * sysdeps/unix/sysv/linux/unregister-atfork.c
2348 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
2350 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
2352 2003-12-10 Ulrich Drepper <drepper@redhat.com>
2354 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
2355 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
2356 __rtld_lock_initialize for ld.so lock.
2357 Patch in part by Adam Li <adam.li@intel.com>.
2359 2003-12-02 David Mosberger <davidm@hpl.hp.com>
2361 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
2362 in $(gnulib). Also, remove stale comment.
2364 2003-11-12 David Mosberger <davidm@hpl.hp.com>
2366 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
2367 advantage of new syscall stub and optimize accordingly.
2369 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
2370 from SYS_futex, to match expectations of
2371 sysdep.h:DO_INLINE_SYSCALL.
2372 (lll_futex_clobbers): Remove.
2373 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
2374 (lll_futex_wake): Likewise.
2375 (lll_futex_requeue): Likewise.
2376 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
2377 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
2379 (__lll_mutex_lock): Likewise.
2380 (__lll_mutex_cond_lock): Likewise.
2381 (__lll_mutex_timed_lock): Likewise.
2382 (__lll_mutex_unlock): Likewise.
2383 (__lll_mutex_unlock_force): Likewise.
2385 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
2386 comes before the include of <sysdep.h>.
2387 (THREAD_SELF_SYSINFO): New macro.
2388 (THREAD_SYSINFO): Likewise.
2389 (INIT_SYSINFO): New macro.
2390 (TLS_INIT_TP): Call INIT_SYSINFO.
2392 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
2394 * sysdeps/pthread/createthread.c (create_thread): Use
2395 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
2396 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
2397 THREAD_SELF_SYSINFO instead of open code.
2398 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
2399 (THREAD_SYSINFO): Likewise.
2401 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
2403 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
2405 2003-12-06 Ulrich Drepper <drepper@redhat.com>
2407 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
2408 instead of .init. Patch by David Mosberger.
2410 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
2412 * sysdeps/pthread/configure.in: Remove broken declaration in C
2413 cleanup handling check.
2415 2003-11-30 Andreas Jaeger <aj@suse.de>
2417 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
2418 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2421 2003-11-27 Jakub Jelinek <jakub@redhat.com>
2423 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
2424 * pthread_attr_destroy.c: Include shlib-compat.h.
2425 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
2426 is set in iattr->flags.
2427 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
2429 2003-11-21 Jakub Jelinek <jakub@redhat.com>
2431 * Makefile (distribute): Add tst-cleanup4aux.c.
2433 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
2436 2003-11-21 Ulrich Drepper <drepper@redhat.com>
2438 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
2439 pthread_cond_signal.
2441 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
2442 store mutex address if the current value is ~0l.
2443 * sysdeps/pthread/pthread_cond_timedwait.c
2444 (__pthread_cond_timedwait): Likewise.
2445 * sysdeps/pthread/pthread_cond_broadcast.c
2446 (__pthread_cond_broadcast): Don't use requeue for pshared
2449 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2450 (__pthread_cond_wait): Don't store mutex address if the current
2452 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2453 (__pthread_cond_timedwait): Likewise.
2454 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2455 (__pthread_cond_broadcast): Don't use requeue for pshared
2458 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
2459 element with ~0l for pshared condvars, with NULL otherwise.
2461 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2462 (__pthread_cond_wait): Don't store mutex address if the current
2464 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2465 (__pthread_cond_timedwait): Likewise.
2466 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2467 (__pthread_cond_broadcast): Don't use requeue for pshared
2470 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
2471 * tst-cond12.c: New file.
2472 * tst-cond13.c: New file.
2474 2003-11-17 Ulrich Drepper <drepper@redhat.com>
2476 * sysdeps/pthread/configure.in: Make missing forced unwind support
2479 2003-11-11 Ulrich Drepper <drepper@redhat.com>
2481 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
2483 2003-11-06 Ulrich Drepper <drepper@redhat.com>
2485 * Makefile: Add magic to clean up correctly.
2487 2003-11-05 Jakub Jelinek <jakub@redhat.com>
2489 * unwind.c (FRAME_LEFT): Define.
2490 (unwind_stop): Handle old style cleanups here.
2491 (__pthread_unwind): Handle old style cleanups only if
2492 !HAVE_FORCED_UNWIND.
2493 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
2494 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
2495 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
2496 ($(objpfx)tst-cleanupx4): Likewise.
2497 * tst-cleanup4.c: New test.
2498 * tst-cleanup4aux.c: New.
2499 * tst-cleanupx4.c: New test.
2501 2003-11-04 Ulrich Drepper <drepper@redhat.com>
2503 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
2504 lll_mutex_*lock macros to skip atomic operations on some archs.
2506 2003-11-03 Ulrich Drepper <drepper@redhat.com>
2508 * sysdeps/pthread/tst-timer.c (main): Initialize
2509 sigev2.sigev_value as well.
2511 2003-10-15 Roland McGrath <roland@redhat.com>
2513 * sysdeps/pthread/configure.in: Barf if visibility attribute support
2515 * sysdeps/pthread/configure: Regenerated.
2517 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2519 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
2520 locking macros. No distinction between normal and mutex locking
2522 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
2523 Merge bits from lowlevelmutex.S we still need.
2524 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
2525 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
2526 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
2527 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
2528 new mutex implementation.
2529 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
2530 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
2531 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2532 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2533 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2534 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2535 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2536 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2537 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2538 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
2539 symbol for entry point to avoid cancellation.
2541 2003-10-07 Jakub Jelinek <jakub@redhat.com>
2543 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
2545 (SAVE_OLDTYPE_0): Fix a typo.
2547 2003-10-03 Ulrich Drepper <drepper@redhat.com>
2549 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
2550 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
2552 2003-10-02 Ulrich Drepper <drepper@redhat.com>
2554 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
2557 2003-10-02 Jakub Jelinek <jakub@redhat.com>
2559 * Makefile (tests): Add tst-cancel19.
2560 * tst-cancel19.c: New test.
2562 2003-10-02 Ulrich Drepper <drepper@redhat.com>
2564 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
2565 restoring of the old cancellation type.
2567 2003-09-30 Jakub Jelinek <jakub@redhat.com>
2569 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
2571 2003-09-27 Wolfram Gloger <wg@malloc.de>
2573 * sysdeps/pthread/malloc-machine.h: New file
2575 2003-09-24 Roland McGrath <roland@redhat.com>
2577 * allocatestack.c (__make_stacks_executable): Don't ignore return
2578 value from _dl_make_stack_executable.
2580 2003-09-24 Ulrich Drepper <drepper@redhat.com>
2582 * allocatestack.c (__make_stacks_executable): Also change
2583 permission of the currently unused stacks.
2585 * allocatestack.c (change_stack_perm): Split out from
2586 __make_stacks_executable.
2587 (allocate_stack): If the required permission changed between the time
2588 we started preparing the stack and queueing it, change the permission.
2589 (__make_stacks_executable): Call change_stack_perm.
2591 * Makefile: Build tst-execstack-mod locally.
2592 * tst-execstack-mod.c: New file.
2594 2003-09-23 Jakub Jelinek <jakub@redhat.com>
2596 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
2598 2003-09-23 Roland McGrath <roland@redhat.com>
2600 * tst-execstack.c: New file.
2601 * Makefile (tests): Add it.
2602 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
2603 (LDFLAGS-tst-execstack): New variable.
2605 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
2606 whether to use PROT_EXEC for stack mmap.
2607 (__make_stacks_executable): New function.
2608 * pthreadP.h: Declare it.
2609 * init.c (__pthread_initialize_minimal_internal): Set
2610 GL(dl_make_stack_executable_hook) to that.
2612 2003-09-22 Ulrich Drepper <drepper@redhat.com>
2614 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
2615 recommendation from AMD re avoidance of lock prefix.
2617 2003-09-22 Jakub Jelinek <jakub@redhat.com>
2619 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
2620 lll_futex_timed_wait instead of lll_futex_wait.
2621 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
2622 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
2623 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
2624 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
2625 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
2626 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
2627 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
2628 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
2629 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
2630 Completely revamp the locking macros. No distinction between
2631 normal and mutex locking anymore.
2632 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2633 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
2634 __lll_lock_timedwait): Fix prototypes.
2635 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
2636 __lll_lock_timedwait): Likewise.
2637 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
2638 macros, add __builtin_expect.
2639 (lll_mutex_timedlock): Likewise. Fix return value.
2640 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
2641 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
2642 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
2643 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
2644 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
2645 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
2646 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
2647 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
2649 2003-09-22 Ulrich Drepper <drepper@redhat.com>
2651 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2652 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
2653 operation if possible.
2655 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
2656 like jumping over the lock prefix.
2658 2003-09-21 Ulrich Drepper <drepper@redhat.com>
2660 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
2661 locking macros. No distinction between normal and mutex locking
2663 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2664 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2665 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2666 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
2667 locking. Merge bits from lowlevelmutex.S we still need.
2668 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2669 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2670 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
2671 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
2672 * Makefile (routines): Remove libc-lowlevelmutex.
2673 (libpthread-rountines): Remove lowlevelmutex.
2674 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
2675 for new mutex implementation.
2676 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2677 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2678 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2679 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2680 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2682 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2684 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2685 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2686 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
2687 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
2688 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2689 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2690 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2691 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2693 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2695 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2696 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2697 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2699 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2700 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
2702 2003-09-20 Ulrich Drepper <drepper@redhat.com>
2704 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
2705 in parameters of asm with output parameters.
2707 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
2708 type of DECR parameter to int.
2709 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
2711 2003-09-18 Jakub Jelinek <jakub@redhat.com>
2713 * tst-attr3.c (tf, do_test): Print stack start/end/size and
2714 guardsize for each thread.
2716 2003-09-17 Jakub Jelinek <jakub@redhat.com>
2718 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
2719 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2720 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
2722 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
2723 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
2725 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
2726 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
2727 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2728 (pthread_getaffinity_np): Add hidden_def.
2730 * Makefile (tests): Add tst-attr3.
2731 * tst-attr3.c: New test.
2733 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
2735 2003-09-15 Jakub Jelinek <jakub@redhat.com>
2737 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
2738 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
2740 2003-09-17 Jakub Jelinek <jakub@redhat.com>
2742 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
2743 * tst-align.c: Include tst-stack-align.h.
2744 (tf, do_test): Use TEST_STACK_ALIGN macro.
2746 2003-09-17 Ulrich Drepper <drepper@redhat.com>
2748 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
2751 2003-09-16 Ulrich Drepper <drepper@redhat.com>
2753 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
2754 stack-related values for the initial thread.
2756 2003-09-15 Jakub Jelinek <jakub@redhat.com>
2758 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
2760 2003-09-11 Ulrich Drepper <drepper@redhat.com>
2762 * pthread_mutex_lock.c: Minor code rearrangements.
2764 2003-09-05 Roland McGrath <roland@redhat.com>
2766 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
2767 Instead, include ../nptl_db/db_info.c to do its magic.
2768 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
2769 (__pthread_pthread_key_2ndlevel_size): Likewise.
2770 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
2771 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
2772 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
2773 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
2774 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
2775 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
2776 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
2777 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
2778 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
2779 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
2780 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
2781 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
2782 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
2783 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
2784 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
2785 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
2786 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
2788 2003-09-08 Ulrich Drepper <drepper@redhat.com>
2790 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
2791 of pthread_t to be compatible with LT.
2792 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2793 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2794 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2795 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2796 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
2797 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2798 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2800 2003-09-04 Ulrich Drepper <drepper@redhat.com>
2802 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
2804 2003-09-04 Jakub Jelinek <jakub@redhat.com>
2806 * unwind-forcedunwind.c: Move to...
2807 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
2808 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
2809 * sysdeps/pthread/jmpbuf-unwind.h: New file.
2810 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
2811 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
2812 * unwind.c: Include jmpbuf-unwind.h.
2813 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
2815 2003-09-02 Jakub Jelinek <jakub@redhat.com>
2817 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
2818 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
2819 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
2820 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
2821 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
2822 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
2823 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
2824 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
2825 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
2826 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
2827 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
2829 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
2830 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
2831 * Makefile (tests): Add tst-stack2.
2832 * tst-stack2.c: New test.
2833 * tst-stack1.c: Include limits.h and sys/param.h.
2834 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
2836 * pthread_condattr_setpshared.c: Include errno.h.
2837 (pthread_condattr_setpshared): Return EINVAL if pshared
2838 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
2840 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
2841 defined symbol for entry point to avoid cancellation.
2842 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
2844 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2846 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
2848 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
2850 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2852 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
2853 __close_nocancel, __read_nocancel, __write_nocancel,
2854 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
2855 libpthread.so or librt.so, define to corresponding function
2856 without _nocancel suffix.
2857 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
2858 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
2859 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
2861 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
2863 2003-09-02 Ulrich Drepper <drepper@redhat.com>
2865 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
2866 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
2868 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
2869 in subsections has a symbol associated with it.
2871 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
2872 defined symbol for entry point to avoid cancellation.
2873 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
2875 2003-09-01 Jakub Jelinek <jakub@redhat.com>
2877 * Makefile (tests): Add tst-tls5.
2878 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
2879 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
2880 ($(objpfx)tst-tls5): New.
2881 ($(objpfx)tst-tls6.out): Likewise.
2882 (tests): Depend on $(objpfx)tst-tls6.out.
2883 * tst-tls3.c: Include stdint.h and pthreaddef.h.
2884 (do_test): Check pthread_self () return value alignment.
2885 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
2886 (tf): Check pthread_self () return value alignment.
2887 * tst-tls5.c: New test.
2889 * tst-tls5mod.c: New.
2890 * tst-tls5moda.c: New.
2891 * tst-tls5modb.c: New.
2892 * tst-tls5modc.c: New.
2893 * tst-tls5modd.c: New.
2894 * tst-tls5mode.c: New.
2895 * tst-tls5modf.c: New.
2896 * tst-tls6.sh: New test.
2898 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
2899 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
2900 * init.c (pthread_functions): Initialize them.
2901 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
2902 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
2903 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
2904 pthread_cond_timedwait@@GLIBC_2.3.2.
2906 2003-09-01 Jakub Jelinek <jakub@redhat.com>
2908 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
2909 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
2910 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
2911 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
2912 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
2913 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
2915 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
2917 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
2918 _POSIX_THREAD_PRIORITY_SCHEDULING.
2919 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
2921 2003-08-31 Ulrich Drepper <drepper@redhat.com>
2923 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
2924 nested function, use static inline function from libio.h.
2925 Code by Richard Henderson.
2927 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
2930 2003-08-30 Jakub Jelinek <jakub@redhat.com>
2932 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
2933 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
2934 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
2935 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
2936 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
2937 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
2938 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
2939 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
2940 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
2941 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
2942 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
2943 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
2944 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
2945 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
2946 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2947 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
2948 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
2949 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
2950 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
2951 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
2952 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
2953 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
2954 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
2955 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
2956 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
2957 * sysdeps/sparc/tls.h: New file.
2958 * sysdeps/sparc/tcb-offsets.sym: New file.
2959 * sysdeps/sparc/Makefile: New file.
2960 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
2961 * init.c [__sparc__] (__NR_set_tid_address): Define.
2963 2003-08-29 Jakub Jelinek <jakub@redhat.com>
2965 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
2966 _IO_release_lock): Define.
2968 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
2970 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
2971 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
2973 2003-08-27 Ulrich Drepper <drepper@redhat.com>
2975 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
2976 (__pthread_cleanup_class): Add missing return types of member
2979 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
2981 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2982 (lll_mutex_unlock_force): Add memory barrier between store and futex
2985 2003-08-25 Ulrich Drepper <drepper@redhat.com>
2987 * tst-cancel4.c (do_test): Also unlink tempfname and remove
2988 tempmsg in first loop.
2990 2003-08-18 Ulrich Drepper <drepper@redhat.com>
2992 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2993 _POSIX_THREAD_PRIORITY_SCHEDULING.
2994 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2996 2003-08-07 Jakub Jelinek <jakub@redhat.com>
2998 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
2999 (__rtld_lock_default_lock_recursive,
3000 __rtld_lock_default_unlock_recursive): Define.
3001 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
3002 __rtld_lock_unlock_recursive): Define using
3003 GL(_dl_rtld_*lock_recursive).
3004 * init.c (__pthread_initialize_minimal_internal): Initialize
3005 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
3006 Lock GL(_dl_load_lock) the same number of times as
3007 GL(_dl_load_lock) using non-mt implementation was nested.
3009 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
3010 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
3012 2003-08-06 Jakub Jelinek <jakub@redhat.com>
3014 * tst-cancel17.c (do_test): Make len2 maximum of page size and
3017 2003-08-07 Jakub Jelinek <jakub@redhat.com>
3019 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
3021 2003-08-03 Jakub Jelinek <jakub@redhat.com>
3023 * sysdeps/pthread/createthread.c (do_clone): Move error handling
3024 to first syscall error check. Move syscall error check for tkill
3025 into __ASSUME_CLONE_STOPPED #ifdef.
3027 2003-08-02 Ulrich Drepper <drepper@redhat.com>
3029 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
3030 is not defined, do explicit synchronization.
3031 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
3032 is not defined also unlock pd->lock for non-debugging case in case
3034 * pthread_create.c (start_thread): Always get and release pd->lock
3035 if __ASSUME_CLONE_STOPPED is not defined.
3036 (start_thread_debug): Removed. Adjust users.
3037 * allocatestack.c (allocate_stack): Always initialize lock if
3038 __ASSUME_CLONE_STOPPED is not defined.
3039 * Makefile (tests): Add tst-sched1.
3040 * tst-sched1.c: New file.
3042 * sysdeps/pthread/createthread.c (do_clone): Only use
3043 sched_setschduler and pass correct parameters.
3045 2003-07-31 Jakub Jelinek <jakub@redhat.com>
3047 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
3048 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
3049 PTHREAD_STACK_MIN in comments.
3051 2003-07-31 Jakub Jelinek <jakub@redhat.com>
3053 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3054 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
3056 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
3057 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
3058 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
3059 (__pthread_cleanup_upto): Fix prototype.
3060 (_longjmp_unwind): Adjust caller.
3061 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
3062 Change second argument to const struct pointer.
3063 * tst-sem8.c (main): Remove unused s2 and s3 variables.
3064 * tst-sem9.c (main): Likewise.
3065 * unwind.c: Include string.h for strlen prototype.
3067 2003-07-31 Ulrich Drepper <drepper@redhat.com>
3069 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3070 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
3071 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
3073 Patch by Nicholas Miell <nmiell@attbi.com>.
3075 2003-07-30 Jakub Jelinek <jakub@redhat.com>
3077 * init.c (__pthread_initialize_minimal_internal): Initialize
3078 GL(dl_init_static_tls).
3079 * pthreadP.h (__pthread_init_static_tls): New prototype.
3080 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
3082 * Makefile (tests): Add tst-tls4.
3083 (modules-names): Add tst-tls4moda and tst-tls4modb.
3084 ($(objpfx)tst-tls4): Link against libdl and libpthread.
3085 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
3087 * tst-tls4.c: New file.
3088 * tst-tls4moda.c: New file.
3089 * tst-tls4modb.c: New file.
3091 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
3093 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
3094 before __timer_dealloc.
3095 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
3096 Don't call list_unlink.
3098 2003-07-29 Roland McGrath <roland@redhat.com>
3100 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
3102 2003-07-25 Jakub Jelinek <jakub@redhat.com>
3104 * tst-cancel17.c (do_test): Check if aio_cancel failed.
3105 Don't reuse struct aiocb A if it failed.
3106 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
3107 not just one byte, as that does not block.
3109 2003-07-22 Jakub Jelinek <jakub@redhat.com>
3111 * sysdeps/pthread/unwind-resume.c: New file.
3112 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
3113 unwind-resume in csu subdir.
3114 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
3116 (librt-sysdep_routines, librt-shared-only-routines): Add
3118 * sysdeps/pthread/rt-unwind-resume.c: New file.
3119 * unwind-forcedunwind.c: New file.
3120 * Makefile (libpthread-routines): Add unwind-forcedunwind.
3121 (libpthread-shared-only-routines): Likewise.
3122 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
3123 * pthreadP.h (pthread_cancel_init): New prototype.
3124 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
3126 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
3127 attr argument const struct pthread_attr *.
3129 * res.c (__res_state): Return __resp.
3130 * descr.h: Include resolv.h.
3131 (struct pthread): Add res field.
3132 * pthread_create.c: Include resolv.h.
3133 (start_thread): Initialize __resp.
3134 * Makefile (tests): Add tst-_res1.
3135 (module-names): Add tst-_res1mod1, tst-_res1mod2.
3136 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
3137 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
3139 * tst-_res1.c: New file.
3140 * tst-_res1mod1.c: New file.
3141 * tst-_res1mod2.c: New file.
3143 2003-07-21 Ulrich Drepper <drepper@redhat.com>
3145 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
3147 * Makefile: Define various *-no-z-defs variables for test DSOs
3148 which has undefined symbols.
3150 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
3152 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3153 Retry if the stwcx fails to store once_control.
3155 2003-07-20 Ulrich Drepper <drepper@redhat.com>
3157 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
3158 pthread_attr_setaffinity.
3159 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
3160 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
3161 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
3162 * pthread_attr_destroy.c: Free cpuset element if allocated.
3163 * pthread_create.c: Pass iattr as additional parameter to
3165 * sysdeps/pthread/createthread.c: If attribute is provided and
3166 a new thread is created with affinity set or scheduling parameters,
3167 start thread with CLONE_STOPPED.
3168 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
3169 pthread_attr_setaffinity.
3170 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
3173 2003-07-15 Ulrich Drepper <drepper@redhat.com>
3175 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
3177 2003-07-14 Ulrich Drepper <drepper@redhat.com>
3179 * sysdeps/pthread/configure.in: Require CFI directives also for
3182 2003-07-15 Jakub Jelinek <jakub@redhat.com>
3184 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
3187 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3189 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
3191 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
3192 registers as variables. Call __pthread_mutex_unlock_usercnt.
3193 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3194 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
3195 not self pointer in __writer. Compare with TID to determine
3197 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3198 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3200 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3202 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
3203 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
3204 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
3205 macros also when compiling librt.
3207 2003-07-11 Jakub Jelinek <jakub@redhat.com>
3209 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
3210 -fasynchronous-unwind-tables.
3211 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3212 (PSEUDO): Add cfi directives.
3213 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
3215 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
3218 2003-07-08 Jakub Jelinek <jakub@redhat.com>
3220 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
3221 __pthread_unregister_cancel): Add prototypes and hidden_proto.
3222 * unwind.c (__pthread_unwind_next): Add hidden_def.
3223 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
3225 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3226 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
3227 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3229 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
3230 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3232 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
3233 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
3234 __pthread_unregister_cancel and __pthread_unwind_next.
3236 2003-07-04 Jakub Jelinek <jakub@redhat.com>
3238 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
3239 different symbol for the cancellation syscall wrapper and
3240 non-cancellation syscall wrapper.
3241 (PSEUDO_END): Define.
3243 2003-07-05 Richard Henderson <rth@redhat.com>
3245 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
3246 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
3247 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
3248 return actual return value from the syscall, not 0.
3250 2003-07-07 Ulrich Drepper <drepper@redhat.com>
3252 * descr.h (struct pthread): Add pid field.
3253 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
3254 (__reclaim_stacks): Likewise.
3255 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
3256 also check for PID of the signal source.
3257 (__pthread_initialize_minimal_internal): Also initialize pid field
3258 of initial thread's descriptor.
3259 * pthread_cancel.c: Use tgkill instead of tkill if possible.
3260 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3261 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
3262 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
3263 * sysdeps/unix/sysv/linux/raise.c: Likewise.
3265 2003-07-05 Ulrich Drepper <drepper@redhat.com>
3267 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
3268 Fix use of parameter.
3269 (__libc_cleanup_pop): Likewise.
3271 2003-07-04 Ulrich Drepper <drepper@redhat.com>
3273 * init.c (sigcancel_handler): Change parameters to match handler
3274 for SA_SIGACTION. Check signal number and code to recognize
3275 invalid invocations.
3277 2003-07-03 Roland McGrath <roland@redhat.com>
3279 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
3280 Apply sizeof (struct pthread) bias to r13 value.
3282 2003-07-03 Ulrich Drepper <drepper@redhat.com>
3284 * sysdeps/pthread/configure.in: Require CFI directives.
3286 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
3288 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
3289 libpthread compilation.
3290 * unwind.c (__pthread_unwind): Add hidden_def.
3291 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
3293 2003-07-01 Ulrich Drepper <drepper@redhat.com>
3295 * libc-cancellation.c (__libc_cleanup_routine): Define.
3296 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
3297 (__pthread_cleanup_pop): Define.
3299 2003-07-01 Richard Henderson <rth@redhat.com>
3301 * sysdeps/alpha/elf/pt-initfini.c: New file.
3302 * sysdeps/alpha/pthread_spin_lock.S: New file.
3303 * sysdeps/alpha/pthread_spin_trylock.S: New file.
3304 * sysdeps/alpha/pthreaddef.h: New file.
3305 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
3306 * sysdeps/alpha/tls.h: New file.
3307 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
3308 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
3309 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
3310 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
3311 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
3312 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
3313 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
3314 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
3315 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
3316 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
3318 2003-07-01 Ulrich Drepper <drepper@redhat.com>
3320 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
3321 cleanup support and unwind info.
3323 2003-06-30 Ulrich Drepper <drepper@redhat.com>
3325 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
3326 Use correct cleanup handler registration. Add unwind info.
3327 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
3328 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3329 * tst-once3.c: Add cleanup handler and check it is called.
3330 * tst-once4.c: Likewise.
3331 * tst-oncex3.c: New file.
3332 * tst-oncex4.c: New file.
3333 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
3335 2003-06-29 Ulrich Drepper <drepper@redhat.com>
3337 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
3339 2003-06-27 Ulrich Drepper <drepper@redhat.com>
3341 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
3342 (tf_msgsnd): Likewise.
3344 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
3345 premature returns a bit more.
3347 2003-06-26 Ulrich Drepper <drepper@redhat.com>
3349 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
3350 definition to the front.
3352 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
3353 the cleanup functions to make the names unique. Fix dwarf opcode
3355 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
3356 functions to make the names unique. Fix CFA offset for two blocks.
3358 2003-06-25 Ulrich Drepper <drepper@redhat.com>
3360 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
3361 missing closing braces.
3362 Patch by Christophe Saout <christophe@saout.de>.
3364 2003-06-24 Roland McGrath <roland@redhat.com>
3366 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
3368 2003-06-24 Ulrich Drepper <drepper@redhat.com>
3370 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
3371 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
3373 * pthreadP.h: Declare __find_thread_by_id.
3374 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
3375 * pthread_clock_gettime.c: Allow using other thread's clock.
3376 * pthread_clock_settime.c: Likewise.
3377 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
3378 * Makefile: Add rules to build and run tst-clock2.
3379 * tst-clock2.c: New file.
3381 2003-06-23 Ulrich Drepper <drepper@redhat.com>
3383 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
3384 to use exception-based cleanup handler.
3385 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3387 * tst-cond8.c (ch): Announce that we are done.
3389 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
3391 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
3392 Also test aio_suspend with timeout value.
3394 2003-06-22 Ulrich Drepper <drepper@redhat.com>
3396 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
3397 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
3400 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
3401 (__pthread_mutex_lock_internal): Likewise.
3402 (__pthread_mutex_unlock_internal): Likewise.
3403 (__pthread_mutex_unlock_usercnt): Declare.
3404 * pthread_mutex_destroy.c: Always fail if used in any way.
3405 * pthread_mutex_init.c: Update comment.
3406 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
3407 * pthread_mutex_timedlock.c: Adjust __nusers.
3408 * pthread_mutex_trylock.c: Adjust __nusers.
3409 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
3410 and public interfaces are wrapper with pass additional parameter.
3411 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
3413 * tst-mutex8.c: New file.
3414 * Makefile (tests): Add tst-mutex8.
3415 * sysdeps/pthread/pthread_cond_timedwait.c: Call
3416 __pthread_mutex_unlock_usercnt.
3417 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
3418 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3419 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3420 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3421 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3422 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
3423 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3425 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3426 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3427 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3428 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3429 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3431 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
3432 * pthread_mutex_timedlock.c: Likewise.
3433 * pthread_mutex_trylock.c: Adjust __nusers.
3434 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
3435 * tst-mutex9.c: New file.
3436 * Makefile (tests): Add tst-mutex9.
3437 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
3438 * sysdeps/ia64/tls.h: Likewise.
3439 * sysdeps/powerpc/tls.h: Likewise.
3440 * sysdeps/s390/tls.h: Likewise.
3441 * sysdeps/sh/tls.h: Likewise.
3442 * sysdeps/x86_64/tls.h: Likewise.
3443 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3444 Change type of __owner.
3445 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3446 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3447 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3448 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3449 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3451 2003-06-19 Jakub Jelinek <jakub@redhat.com>
3453 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
3454 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
3456 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
3457 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
3458 instead of nr to lll_futex_wake. Only set errno and return -1
3461 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
3462 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
3463 return actual return value from the syscall, not 0.
3465 2003-06-18 Ulrich Drepper <drepper@redhat.com>
3467 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
3468 find a random value.
3469 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
3472 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
3473 compat_timer_settime.
3474 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
3475 compat_timer_gettime.
3476 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
3477 compat_timer_getoverrun.
3478 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
3479 compat_timer_delete.
3481 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
3482 error-checking mutex detect busy mutexes.
3484 2003-06-17 Ulrich Drepper <drepper@redhat.com>
3486 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
3487 Add ax to clobber list.
3488 (lll_mutex_cond_lock): Likewise.
3489 (lll_mutex_unlock): Likewise.
3490 (lll_lock): Likewise.
3491 (lll_unlock): Likewise.
3493 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
3494 * tst-cancel18.c: New file.
3495 * tst-cancelx18.c: New file.
3497 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
3500 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
3501 * tst-cancel17.c: New file.
3502 * tst-cancelx17.c: New file.
3504 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
3505 * sysdeps/unix/sysv/linux/sigwait.c: New file.
3506 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
3508 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
3510 2003-06-16 Jakub Jelinek <jakub@redhat.com>
3512 * sysdeps/pthread/createthread.c (create_thread): Set
3513 header.multiple_threads unconditionally.
3514 * allocatestack.c (allocate_stack): Likewise.
3515 * descr.h (struct pthread): Add header.multiple_threads
3517 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
3518 Define for librt. #error if neither libpthread, libc nor librt.
3519 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
3521 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
3522 CDISABLE): Likewise.
3523 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
3524 CDISABLE): Likewise.
3525 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
3526 CDISABLE): Likewise.
3527 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
3528 CDISABLE): Likewise. Access header.multiple_threads outside of
3529 libc and libpthread.
3530 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
3532 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
3533 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
3535 2003-06-17 Ulrich Drepper <drepper@redhat.com>
3537 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
3538 Also test early cancellation before the thread reaches the cancellation
3541 * Makefile: Compile forward.c with exceptions.
3543 * sysdeps/unix/sysv/linux/sleep.c: New file.
3545 2003-06-16 Ulrich Drepper <drepper@redhat.com>
3547 * Makefile: Add CFLAGS definition to compile function wrappers
3548 duplicated from libc with exceptions.
3549 * tst-cancel4.c: Also check cancellation handlers.
3551 * Makefile: Add rules to build and run tst-cancel16 and
3552 tst-cancelx16. Add missing CFLAGS definitions.
3553 * tst-cancel16.c: New file.
3554 * tst-cancelx16.c: New file.
3556 2003-06-15 Ulrich Drepper <drepper@redhat.com>
3558 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
3559 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
3560 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
3561 (DL_SYSINFO_IMPLEMENTATION): Likewise.
3563 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
3564 (LIBC_CANCEL_RESET): Likewise.
3565 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
3566 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
3568 (CFLAGS-libcrt-cancellation.c): Define.
3569 * sysdeps/pthread/librt-cancellation.c: New file.
3570 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
3571 macros also when compiling librt.
3572 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3573 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3574 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3575 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3576 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3577 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3578 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3580 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
3581 compat_timer_create.
3583 2003-06-14 Ulrich Drepper <drepper@redhat.com>
3585 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
3587 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
3589 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
3590 Add libc_hidden_def.
3592 2003-06-13 Roland McGrath <roland@redhat.com>
3594 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
3595 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
3597 2003-06-11 Ulrich Drepper <drepper@redhat.com>
3599 * allocatestack.c (queue_stack): Always inline.
3600 * ptreadhP.h (__do_cancel): Likewise.
3602 2003-06-10 Jakub Jelinek <jakub@redhat.com>
3604 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
3607 2003-06-10 Ulrich Drepper <drepper@redhat.com>
3609 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3610 (__pthread_cond_signal): Remove incorrect second addition for
3613 2003-06-09 Ulrich Drepper <drepper@redhat.com>
3615 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3616 (__pthread_cond_signal): Use correct futex pointer in
3617 __lll_mutex_lock_wait call.
3619 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3620 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
3622 2003-06-08 Ulrich Drepper <drepper@redhat.com>
3624 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
3626 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
3629 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
3630 hand-written CFI generation code. Since ENTRY/END also initiated
3631 CFI frames this caused two CFI sets to be generated.
3633 2003-06-07 Ulrich Drepper <drepper@redhat.com>
3635 * cleanup_routine.c: New file.
3636 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
3637 * sysdeps/pthread/pthread.h: Add support for fully exception-based
3639 * Makefile (libpthread-routines): Add cleanup_routine.
3640 Add more CFLAGS variables to compile with exceptions. Add comments
3641 why which file needs unwind tables.
3642 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
3644 * tst-cancelx1.c: New file.
3645 * tst-cancelx2.c: New file.
3646 * tst-cancelx3.c: New file.
3647 * tst-cancelx4.c: New file.
3648 * tst-cancelx5.c: New file.
3649 * tst-cancelx6.c: New file.
3650 * tst-cancelx7.c: New file.
3651 * tst-cancelx8.c: New file.
3652 * tst-cancelx9.c: New file.
3653 * tst-cancelx10.c: New file.
3654 * tst-cancelx11.c: New file.
3655 * tst-cancelx12.c: New file.
3656 * tst-cancelx13.c: New file.
3657 * tst-cancelx14.c: New file.
3658 * tst-cancelx15.c: New file.
3659 * tst-cleanupx0.c: New file.
3660 * tst-cleanupx0.expect: New file.
3661 * tst-cleanupx1.c: New file.
3662 * tst-cleanupx2.c: New file.
3663 * tst-cleanupx3.c: New file.
3665 * tst-cleanup0.c: Make standard compliant.
3666 * tst-cleanup1.c: Likewise.
3668 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
3669 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3670 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3671 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3672 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3673 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3674 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
3676 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3677 * tst-cancel12.c: New file.
3678 * tst-cancel13.c: New file.
3679 * tst-cancel14.c: New file.
3680 * tst-cancel15.c: New file.
3681 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
3684 * tst-cancel1.c: Add some comments.
3686 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
3689 2003-06-06 Ulrich Drepper <drepper@redhat.com>
3691 * Makefile (CFLAGS-pthread_cancel.c): Define.
3693 2003-06-05 Ulrich Drepper <drepper@redhat.com>
3695 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
3696 Change type of __writer element to int.
3697 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3698 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3699 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3700 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3701 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3702 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
3703 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3704 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
3705 Compare with TID to determine deadlocks.
3706 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
3707 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
3708 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
3709 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3710 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3711 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3713 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3715 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3716 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3717 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3719 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3721 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3722 * Makefile (tests): Add tst-rwlock12.
3723 * tst-rwlock12.c: New file.
3725 2003-06-05 Jakub Jelinek <jakub@redhat.com>
3727 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
3728 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
3729 Remove bogus hidden_proto.
3730 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
3732 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
3733 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
3734 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
3735 ___lll_mutex_timedlock): Likewise.
3737 2003-06-04 Ulrich Drepper <drepper@redhat.com>
3739 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3740 (__pthread_cond_signal): Add some code to eventually handle
3743 2003-06-01 Ulrich Drepper <drepper@redhat.com>
3745 * Makefile (tests): Add tst-exec4.
3746 (tst-exec4-ARGS): Define.
3747 * tst-exec4.c: New file.
3749 2003-05-31 Ulrich Drepper <drepper@redhat.com>
3751 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
3752 Also fail if tv_nsec < 0.
3753 (__lll_timedwait_tid): Likewise.
3754 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
3755 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
3757 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
3759 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
3761 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
3763 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
3765 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
3768 * Makefile (tests): Add tst-sem8 and tst-sem9.
3769 * tst-sem8.c: New file.
3770 * tst-sem9.c: New file.
3771 * sem_open.c: Fix creation of in_use record if the file exists but
3774 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
3777 * sysdeps/pthread/timer_create.c (timer_create): In case
3778 evp==NULL, assign timer ID to sival_ptr.
3780 * descr.h (struct pthread_unwind_buf): Change type of prev element to
3781 struct pthread_unwind_buf *.
3782 (struct pthread): Likewise for cleanup_jmp_buf element.
3784 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
3785 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
3786 * unwind.c (__pthread_unwind_next): Likewise.
3788 2003-05-30 Ulrich Drepper <drepper@redhat.com>
3790 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
3791 (lll_futex_timed_wait): Use int for futex value parameter.
3792 (lll_futex_wake): Likewise.
3793 (lll_futex_requeue): Likewise.
3795 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
3796 Replace one memory operation with one register operation.
3798 * tst-join4.c (do_test): Fix error message.
3800 * tst-rwlock6.c (do_test): Use correct format specifier.
3802 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
3803 (__lll_mutex_lock_wait): Replace one memory operation with one
3805 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
3806 (__lll_mutex_lock_wait): Likewise.
3808 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
3809 (__lll_mutex_cond_lock): Add one to value parameter of
3810 __lll_lock_wait to reflect reality in the futex syscall.
3811 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3812 (lll_mutex_cond_lock): Likewise.
3814 2003-05-30 Jakub Jelinek <jakub@redhat.com>
3816 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
3818 (lll_mutex_cond_lock): Define.
3820 2003-05-29 Ulrich Drepper <drepper@redhat.com>
3822 * Makefile (tests): Add tst-signal6.
3823 * tst-signal6.c: New file.
3825 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
3826 (__lll_mutex_unlock_force): New function
3827 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
3829 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
3830 (__lll_mutex_unlock_force): New function.
3831 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
3833 * tst-rwlock7.c (do_test): Use correct format specifier.
3835 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
3836 Find break parameter in correct asm argument.
3838 2003-05-27 Jakub Jelinek <jakub@redhat.com>
3840 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
3842 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
3844 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3846 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
3847 lll_futex_requeue, lll_mutex_unlock_force): Define.
3849 2003-05-30 Jakub Jelinek <jakub@redhat.com>
3851 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3852 (pthread_cond_t): Add __mutex.
3853 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
3854 lll_futex_requeue, lll_mutex_unlock_force): Define.
3856 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3858 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
3859 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3861 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
3863 (lll_futex_wait, lll_futex_wake): Define.
3864 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
3865 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
3866 FUTEX_REQUEUE instead of FUTEX_WAIT.
3867 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
3868 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
3869 mutex which was used in condvar structure. Call
3870 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
3871 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3873 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
3874 include tcb-offsets.h. Read wakeup value in locked region.
3875 Use the value of gbr register as THREAD_ID.
3876 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3877 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3878 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3880 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
3883 2003-05-28 Ulrich Drepper <drepper@redhat.com>
3885 * sysdeps/pthread/pthread_cond_broadcast.c
3886 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
3888 2003-05-26 Ulrich Drepper <drepper@redhat.com>
3890 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
3891 typo in register name.
3892 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
3893 correctly. Actually use requeue. Little optimization.
3894 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
3895 mutex address early. Handle cancellation state as 32-bit value.
3896 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3897 Remove unnecessary label.
3899 2003-05-25 Ulrich Drepper <drepper@redhat.com>
3901 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
3902 instead of FUTEX_WAIT.
3903 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
3904 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3905 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3906 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3907 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3908 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
3909 used in condvar structure. Call __pthread_mutex_cond_lock instead
3910 of __pthread_mutex_lock_internal.
3911 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3912 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3913 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
3914 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
3915 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3916 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3917 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
3918 Add pthread_mutex_cond_lock.
3919 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
3920 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
3921 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
3922 lll_mutex_cond_lock.
3923 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3924 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3925 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3927 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3928 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3930 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
3931 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3933 * pthreadP.h: Declare __pthread_mutex_cond_lock.
3934 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
3935 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
3936 macro don't define aliases.
3938 * cancellation.c: Remove __pthread_enable_asynccancel_2.
3939 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
3940 * sysdeps/pthread/pthread_cond_timedwait.c: Use
3941 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
3942 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3943 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3944 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
3945 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3946 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3948 2003-05-17 Ulrich Drepper <drepper@redhat.com>
3950 * sem_open.c: Fix one endless loop. Implement correct semantics
3951 wrt opening the same semaphore more then once.
3952 * sem_close.c: Adjust for sem_open change.
3953 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
3954 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
3955 * Makefile (tests): Add tst-sem7.
3956 * tst-sem7.c: New file.
3958 2003-05-16 Roland McGrath <roland@redhat.com>
3960 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
3961 uninitialized variable braino.
3963 2003-05-16 Ulrich Drepper <drepper@redhat.com>
3965 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
3966 test for syscall availability.
3968 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
3969 __no_posix_timers to -1 if the syscalls don't exist.
3971 * pthread_join.c (pthread_join): Set tid field of the joined
3972 thread to -1. This isn't necessary but helps to recognize some
3973 error conditions with almost no cost.
3975 * allocatestack.c (FREE_P): Also negative values indicate an
3978 * unwind.c: Include <unistd.h>.
3980 2003-05-14 Ulrich Drepper <drepper@redhat.com>
3982 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
3984 2003-05-14 Jakub Jelinek <jakub@redhat.com>
3986 * Makefile (crti-objs, crtn-objs): New variables.
3987 (omit-deps, extra-objs): Add crtn.
3988 ($(objpfx)libpthread.so): Depend on both crti and crtn
3989 and links to them in multidir.
3990 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
3992 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
3994 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3995 (lll_mutex_unlock): Use atomic_exchange_rel.
3997 2003-05-11 Ulrich Drepper <drepper@redhat.com>
3999 * cond-perf.c (cons): Add missing locking around setting of alldone.
4001 2003-05-10 Ulrich Drepper <drepper@redhat.com>
4003 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
4005 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4007 2003-05-09 Ulrich Drepper <drepper@redhat.com>
4009 * tst-sem6.c: New file.
4010 * Makefile (tests): Add tst-sem6.
4012 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
4013 Use atomic_exchange_rel instead of atomic_exchange.
4014 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
4017 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
4018 code for lll_futex_wait and lll_futex_wake in static apps. Use
4019 vsyscall is possible.
4021 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
4022 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
4023 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
4024 pthread_setaffinity_np.
4025 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
4026 and pthread_setaffinity_np.
4027 * Makefile (libpthread-routines): Add pthread_getaffinity and
4028 pthread_setaffinity.
4030 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
4031 use it in case mmap to allocate the stack fails.
4032 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
4033 ARCH_MAP_FLAGS here.
4034 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
4037 2003-05-08 Ulrich Drepper <drepper@redhat.com>
4039 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
4040 handler implementation. It is now lockless in fork().
4041 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4042 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4043 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
4044 declare the __fork_*_lists.
4045 (struct fork_handler): Include pointers to all three functions.
4046 Add next, refcntr and need_signal elements.
4047 (__fork_handlers): New declaration.
4048 (__register_atfork_malloc): Remove declaration.
4049 (HAVE_register_atfork_malloc): Remove definition.
4050 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
4051 __pthread_child_handler variable.
4052 (__libc_pthread_init): Use __register_atfork instead of explicitly
4054 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
4056 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4058 * unwind.c (unwind_cleanup): Print error message and then abort. This
4059 function must never be reached.
4061 * cond-perf.c: New file.
4063 2003-05-05 Ulrich Drepper <drepper@redhat.com>
4065 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
4067 2003-05-04 Roland McGrath <roland@redhat.com>
4069 * Makefile ($(objpfx)../libc.so): New target.
4071 2003-05-02 Ulrich Drepper <drepper@redhat.com>
4073 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4074 (pthread_condattr_t): Size is only an int, don't use long for
4076 (pthread_mutexattr_t): Likewise.
4077 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4078 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4079 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4081 2003-05-01 Ulrich Drepper <drepper@redhat.com>
4083 * sysdeps/i386/tls.h: Define THREAD_ID.
4084 * sysdeps/ia64/tls.h: Likewise.
4085 * sysdeps/powerpc/tls.h: Likewise.
4086 * sysdeps/s390/tls.h: Likewise.
4087 * sysdeps/sh/tls.h: Likewise.
4088 * sysdeps/x86_64/tls.h: Likewise.
4089 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
4091 * pthread_mutex_timedlock.c: Likewise.
4092 * pthread_mutex_trylock.c: Likewise.
4093 * pthread_mutex_unlock.c: Likewise.
4094 * pthread_rwlock_trywrlock.c: Likewise.
4095 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
4096 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4097 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4098 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4100 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
4103 2003-04-29 Jakub Jelinek <jakub@redhat.com>
4105 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4106 (__SIZEOF_PTHREAD_COND_T): Define to 48.
4107 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
4108 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4109 Make __align long long instead of long.
4110 (pthread_rwlock_t): Formatting.
4111 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4112 (pthread_rwlock_t): Formatting.
4113 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4114 (pthread_cond_t): Make __align long long instead of long.
4115 (pthread_rwlock_t): Move __flags field to the same position as in
4118 2003-04-30 Ulrich Drepper <drepper@redhat.com>
4120 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
4121 * tst-rwlock7.c (do_test): Likewise.
4123 2003-04-26 Roland McGrath <roland@redhat.com>
4125 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
4127 2003-04-22 Jakub Jelinek <jakub@redhat.com>
4129 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
4130 sizeof (struct pthread).
4131 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
4133 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
4135 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
4137 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
4139 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
4141 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
4143 (NO_TLS_OFFSET): Define.
4144 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
4145 add TLS_TCB_SIZE unnecessarily.
4147 2003-04-22 Roland McGrath <roland@redhat.com>
4149 * Makeconfig (shared-thread-library): Reverse link order to work
4152 2003-04-22 Ulrich Drepper <drepper@redhat.com>
4154 * semaphore.h: Fix typo in comment.
4156 2003-04-21 Ulrich Drepper <drepper@redhat.com>
4158 * sysdeps/pthread/sigfillset.c: New file.
4160 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
4161 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
4162 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
4163 * sysdeps/pthread/sigaction.c: Likewise.
4164 * sysdeps/pthread/sigprocmask.c: New file.
4165 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
4167 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4168 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
4171 2003-04-19 Ulrich Drepper <drepper@redhat.com>
4173 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4174 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
4176 * sysdeps/unix/sysv/linux/unregister-atfork.c
4177 (__unregister_atfork): Don't free memory not allocated dynamically.
4179 * semaphore.h: Remove __THROW marker from cancellation points.
4180 * nptl/sysdeps/pthread/pthread.h: Likewise.
4182 2003-04-18 Ulrich Drepper <drepper@redhat.com>
4184 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
4185 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
4188 2003-04-16 Jakub Jelinek <jakub@redhat.com>
4190 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
4192 2003-04-15 Roland McGrath <roland@redhat.com>
4194 * forward.c (__pthread_unwind): Tweak to avoid warning.
4196 2003-04-15 Ulrich Drepper <drepper@redhat.com>
4198 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
4200 2003-04-14 Ulrich Drepper <drepper@redhat.com>
4202 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
4203 overflow CFA advance instructions.
4204 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4206 2003-04-14 Jakub Jelinek <jakub@redhat.com>
4208 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
4209 * sysdeps/i386/pthread_spin_lock.c: Likewise.
4210 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
4213 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
4214 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
4215 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
4216 DW_CFA_advance_loc for .Laddl-.Lsubl.
4218 2003-04-13 Ulrich Drepper <drepper@redhat.com>
4220 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
4221 position-independent unwind data for static libraries.
4222 Add missing unwind info. Add comments.
4224 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
4225 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4226 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4227 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4229 2003-04-12 Ulrich Drepper <drepper@redhat.com>
4231 * Makefile: Make sure all cancellation points are compiled with
4232 exception and asynchronous unwind tables.
4234 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
4235 which mishandles loading of global object addresses in PIC.
4236 (THREAD_SETMEM_NC): Likewise.
4238 2003-04-11 Ulrich Drepper <drepper@redhat.com>
4240 * pthread.h: Define new data structure for cleanup buffer. Declare
4241 new cleanup handler interfaces.
4242 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
4243 (struct pthread): Add cleanup_jmp_buf pointer. Define
4244 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
4245 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
4246 it. Declare old cleanup handler installation functions.
4247 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
4249 * cleanup_defer.c: Likewise.
4250 * cleanup_compat.c: New file. Old cleanup code.
4251 * cleanup_def_compat.c: New file. Old cleanup code.
4252 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
4253 if own thread descriptor.
4254 * unwind.c: New file.
4255 * forward.c: Add __pthread_unwind.
4256 * init.c (pthread_functions): Add __pthread_unwind.
4257 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
4258 Add ptr___pthread_unwind.
4259 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
4260 and unwind function.
4261 * Makefile (libpthread-routines): Add cleanup_compat,
4262 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
4263 table generation if necessary.
4264 * version.c: Record whether unwind support is compiled in.
4265 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
4266 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
4268 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
4269 complication to generate unwind information for syscall wrappers.
4270 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4271 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4272 __cleanup_fct_attribute.
4274 * Makefile: Add rules to build and run tst-cleanup0.
4275 * tst-cleanup0.c: New file.
4276 * tst-cleanup0.expect: New file.
4278 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
4279 caller. Optimize to avoid often unecessary local variable.
4281 2003-04-11 Roland McGrath <roland@redhat.com>
4283 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
4284 sets variable `multidir'; include that.
4285 (generated): Add it.
4286 ($(objpfx)$(multidir)/crti.o): New target.
4287 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
4289 2003-04-11 Ulrich Drepper <drepper@redhat.com>
4291 * tst-attr2.c (do_test): Add cast to avoid warning.
4292 * tst-mutex4.c (do_test): Likewise.
4294 2003-04-10 Ulrich Drepper <drepper@redhat.com>
4296 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
4299 2003-04-09 Ulrich Drepper <drepper@redhat.com>
4301 * Makefile (tests): Add tst-detach1.
4302 * tst-detach1.c: New file.
4304 2003-04-08 Ulrich Drepper <drepper@redhat.com>
4306 * sysdeps/pthread/pthread.h: Remove duplicate
4307 pthread_cleanup_{push,pop} definitions.
4309 * tst-barrier2.c: Eliminate warnings.
4310 * tst-cancel4.c: Likewise.
4311 * tst-cond4.c: Likewise.
4312 * tst-cond6.c: Likewise.
4313 * tst-detach1.c: Likewise.
4314 * tst-rwlock4.c: Likewise.
4315 * tst-rwlock6.c: Likewise.
4316 * tst-rwlock7.c: Likewise.
4317 * tst-sem3.c: Likewise.
4318 * tst-spin2.c: Likewise.
4319 * tst-umask1.c: Likewise.
4321 2003-04-07 Ulrich Drepper <drepper@redhat.com>
4323 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
4325 2003-04-06 Ulrich Drepper <drepper@redhat.com>
4327 * descr.h (struct pthread): Move cancelhandling member to the front.
4329 2003-04-05 Ulrich Drepper <drepper@redhat.com>
4331 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
4332 malloc_parent, and malloc_child statically.
4333 (__register_atfork_malloc): New function.
4334 (free_mem): Don't free any of the malloc_* variables on the list.
4335 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
4336 Define HAVE_register_atfork_malloc.
4338 2003-04-04 Ulrich Drepper <drepper@redhat.com>
4340 * sysdeps/pthread/createthread.c (create_thread): Add some more
4341 comments explaining when to set multiple_threads and when not.
4343 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
4344 THREAD_ATOMIC_BIT_SET if not already defined.
4345 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
4346 THREAD_ATOMIC_BIT_SET:
4347 * sysdeps/x86_64/tls.h: Likewise.
4348 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
4349 THREAD_ATOMIC_CMPXCHG_VAL.
4350 (_pthread_cleanup_pop_restore): Likewise.
4351 * cancellation.c (__pthread_enable_asynccancel): Likewise.
4352 (__pthread_enable_asynccancel_2): Likewise.
4353 (__pthread_disable_asynccancel): Likewise.
4354 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
4355 (__libc_disable_asynccancel): Likewise.
4356 * init.c (sigcancel_handler): Likewise.
4357 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
4358 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
4360 2003-04-03 Ulrich Drepper <drepper@redhat.com>
4362 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
4363 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
4364 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
4365 * Makefile (tests): Add tst-cancel11.
4366 * tst-cancel11.c: New file.
4368 2003-04-01 Ulrich Drepper <drepper@redhat.com>
4370 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
4371 round, not the first. Use specific_used flag instead of local
4372 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
4373 (__free_tcb): Don't call deallocate_tsd here.
4374 (start_thread): Call deallocate_tsd here.
4375 * pthread_setspecific.c: Set specific_used flag really only when
4377 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
4378 * tst-tsd3.c: New file.
4379 * tst-tsd4.c: New file.
4381 2003-03-31 Ulrich Drepper <drepper@redhat.com>
4383 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
4384 Use atomic_exchange_and_add instead of __lll_add.
4385 (__lll_mutex_timedlock): Likewise.
4386 Patch by Ian Wienand.
4388 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
4390 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4391 (SINGLE_THREAD_P): Fix typo.
4392 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
4394 2003-03-31 Ulrich Drepper <drepper@redhat.com>
4396 * Makefile (tests): Add tst-align.
4397 * tst-align.c: New file.
4398 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
4400 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
4403 * tst-tsd2.c: Add casts to avoid warnings.
4405 2003-03-30 Ulrich Drepper <drepper@redhat.com>
4407 * descr.h (struct pthread): Move most often used elements to the front.
4409 2003-03-29 Ulrich Drepper <drepper@redhat.com>
4411 * Makefile (libpthread-routines): Add pthread_atfork.
4412 (libpthread-static-only-routines): Add pthread_atfork.
4414 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4416 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
4418 (INSTALL_DTV): Add parens.
4419 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
4420 Use passed descr instead of THREAD_SELF.
4421 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
4422 (__lll_mutex_timedlock_wait): Correct expected value after
4424 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
4425 Release lock before waking up the waiters.
4426 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
4427 criteria. Reorderstruct passed to cleanup handler. Fix
4428 handling of cancellation and failung pthread_mutex_unlock call.
4429 Use __pthread_enable_asynccancel_2 instead of
4430 __pthread_enable_asynccancel.
4431 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4432 Return result of lock re-get if it fails.
4433 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
4434 for __pthread_cleanup_push.
4435 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
4436 completely broken rwlock implementation.
4437 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4438 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4439 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4440 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
4441 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4442 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
4443 versioned_symbol macro.
4444 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
4445 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
4447 2003-03-27 Ulrich Drepper <drepper@redhat.com>
4449 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
4450 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
4452 (struct timer): Remove th and bar field.
4453 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
4454 debugging code. Create only one helper thread.
4455 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
4457 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4458 Renamed. Define statically. Use thread info from siginfo.
4459 (__helper_once): New variable.
4460 (__helper_tid): New variable.
4461 (__reset_helper_control): New function.
4462 (__start_helper_thread): New function.
4464 * pthread_create.c (start_thread): Don't use setjmp inside
4465 __builtin_expect to work around gcc bug.
4467 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
4468 timer_delete syscall fails, but not with ENOSYS, set
4471 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
4472 (timer_settime): Fix typo.
4473 * sysdeps/unix/sysv/linux/timer_getoverr.c
4474 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
4476 2003-03-27 Jakub Jelinek <jakub@redhat.com>
4478 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
4479 offset of cleanupbuf.__prev.
4481 2003-03-26 Jakub Jelinek <jakub@redhat.com>
4483 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
4486 2003-03-26 Ulrich Drepper <drepper@redhat.com>
4488 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
4489 NULL provide default definition to syscall.
4491 2003-03-25 Roland McGrath <roland@redhat.com>
4493 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
4494 (timer_id2ptr): Fix typo.
4496 2003-03-25 Ulrich Drepper <drepper@redhat.com>
4498 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
4499 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
4500 * sysdeps/ia64/pthreaddef.h: Likewise.
4501 * sysdeps/powerpc/pthreaddef.h: Likewise.
4502 * sysdeps/s390/pthreaddef.h: Likewise.
4503 * sysdeps/sh/pthreaddef.h: Likewise.
4504 * sysdeps/x86_64/pthreaddef.h: Likewise.
4505 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
4506 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
4508 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4509 SIGTIMER is not unblocked.
4510 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
4512 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
4514 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
4515 pass pointer through as ID.
4516 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
4517 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
4518 * sysdeps/unix/sysv/linux/timer_create.c: New file.
4519 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
4520 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
4521 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
4522 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
4523 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
4524 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
4525 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
4526 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
4527 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
4528 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
4529 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
4530 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
4531 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
4532 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
4533 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
4534 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
4535 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
4536 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
4537 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
4538 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
4539 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
4540 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
4541 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
4542 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
4543 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
4544 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
4545 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
4546 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
4547 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
4548 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
4550 * pthreadP.h: Remove FRAME_LEFT definition.
4551 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
4552 already left frame. Programs which have this problem are not POSIX
4554 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
4556 2003-03-24 Ulrich Drepper <drepper@redhat.com>
4558 * sysdeps/pthread/tst-timer.c: Check return values of the
4561 2003-03-23 Roland McGrath <roland@redhat.com>
4563 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
4564 * tst-tls3mod.c: Likewise.
4565 * tst-tls1.c: Likewise.
4566 * tst-tls2.c: Likewise.
4568 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
4571 * tst-join5.c (tf1, tf2): Add a cast.
4573 * Makeconfig (includes): Append -I$(..)nptl to this variable.
4575 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
4576 Don't test anything.
4577 * tst-cond4.c: Likewise.
4578 * tst-cond6.c: Likewise.
4579 * tst-flock2.c: Likewise.
4580 * tst-mutex4.c: Likewise.
4581 * tst-rwlock4.c: Likewise.
4582 * tst-signal1.c: Likewise.
4583 * tst-spin2.c: Likewise.
4584 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
4586 * tst-mutex4.c: Use test-skeleton.c.
4587 * tst-spin2.c: Likewise.
4588 * tst-sysconf.c: Likewise.
4589 * tst-barrier2.c: Likewise.
4590 * tst-cond4.c: Likewise.
4591 * tst-cond6.c: Likewise.
4592 * tst-rwlock4.c: Likewise.
4593 * tst-unload.c: Likewise.
4594 * tst-flock2.c (do_test): Use return instead of exit.
4596 2003-03-22 Jakub Jelinek <jakub@redhat.com>
4598 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
4600 2003-03-21 Ulrich Drepper <drepper@redhat.com>
4602 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4603 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
4604 instead of __lll_compare_and_swap.
4605 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4607 Removed definition if __lll_compare_and_swap.
4609 * cancellation.c: Adjust for new form of compare&exchange macros.
4610 * cleanup_defer.c: Likewise.
4612 * libc-cancellation.c: Likewise.
4613 * old_pthread_cond_broadcast.c: Likewise.
4614 * old_pthread_cond_signal.c: Likewise.
4615 * old_pthread_cond_timedwait.c: Likewise.
4616 * old_pthread_cond_wait.c: Likewise.
4617 * pthread_cancel.c: Likewise.
4618 * pthread_create.c: Likewise.
4619 * pthread_detach.c: Likewise.
4620 * pthread_join.c: Likewise.
4621 * pthread_key_delete.c: Likewise.
4622 * pthread_setcancelstate.c: Likewise.
4623 * pthread_setcanceltype.c: Likewise.
4624 * pthread_timedjoin.c: Likewise.
4625 * pthread_tryjoin.c: Likewise.
4626 * sysdeps/pthread/createthread.c: Likewise.
4628 2003-03-20 Ulrich Drepper <drepper@redhat.com>
4630 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4631 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
4632 definitions. Replace uses with calls to atomic_* functions.
4633 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4634 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
4635 __lll_test_and_set calls with atomic_exchange_and_add and
4636 atomic_exchange calls respectively.
4637 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
4638 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4639 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
4640 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4641 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
4642 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
4643 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
4645 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
4646 returns the old value.
4648 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
4650 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
4651 int for variable OLDVAL and correct inline assembler contraint.
4652 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
4653 type int for variable OLD.
4655 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
4657 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4658 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
4659 instead of multiple_threads field in the TCB.
4661 2003-03-19 Ulrich Drepper <drepper@redhat.com>
4663 * sysdeps/i386/i686/bits/atomic.h: Removed.
4664 * sysdeps/i386/i586/bits/atomic.h: Removed.
4665 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
4666 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
4667 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
4668 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
4669 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
4670 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
4671 * atomic.h: Removed. Moved to glibc.
4673 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
4674 support for clock selection.
4676 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
4679 2003-03-18 Roland McGrath <roland@redhat.com>
4681 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
4682 Add __lll_rel_instr first. Add memory clobber.
4683 (lll_mutex_unlock): Use __lll_test_and_set.
4684 From Paul Mackerras <paulus@samba.org>.
4686 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
4688 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4689 (SINGLE_THREAD_P): Add `header.' prefix.
4690 From Paul Mackerras <paulus@samba.org>.
4692 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
4693 pthread_timedjoin_np to ...
4694 (libpthread: GLIBC_2.3.3): ... here.
4695 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
4697 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4698 Avoid shadowing VAL variable.
4700 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
4703 2003-03-18 Ulrich Drepper <drepper@redhat.com>
4705 * Makefile (tests): Add tst-cond11.
4706 * tst-cond11.c: New file.
4708 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
4709 struct passed to cleanup handler to eliminate one more
4711 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4713 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4714 (pthrad_cond_t): Replace __unused field with __clock.
4716 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
4717 waken all waiters in cleanup handler.
4718 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4719 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4721 * pthread_condattr_getclock.c: New file.
4722 * pthread_condattr_setclock.c: New file.
4723 * sysdeps/pthread/pthread.h: Declare these new functions.
4724 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
4725 * Makefile (libpthread-routines): Add the new functions.
4726 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
4727 Renamed field to value. Document use of the bits.
4728 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
4730 * pthread_condattr_setpshared.c: Likewise.
4731 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
4732 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
4733 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4735 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4736 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4737 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4738 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4739 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4740 Implement clock selection.
4741 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4742 * pthread-errnos.sym: Add ENOSYS.
4743 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4744 _POSIX_CLOCK_SELECTION.
4745 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4747 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
4748 invalid .size directive.
4750 2003-03-17 Roland McGrath <roland@redhat.com>
4752 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
4755 2003-03-17 Ulrich Drepper <drepper@redhat.com>
4757 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
4758 Use __lll_add instead of spelling it out. Use protected symbol names.
4759 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
4761 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
4762 Renamed from lll_compare_and_swap. Use new name where necessary.
4763 (__lll_add): Defined.
4764 (__lll_dec_if_positive): Defined.
4765 (__lll_test_and_set): Defined.
4766 * sysdeps/ia64/pthread_spin_init.c: Removed.
4767 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
4768 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
4769 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
4770 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
4771 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
4772 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
4773 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
4774 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
4775 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4776 __sync_lock_release_si.
4777 Patch by Jakub Jelinek.
4779 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
4780 Fix timeout handling.
4781 (__lll_timedwait_tid): Likewise.
4782 (lll_unlock_wake_cb): Wake up other waiters if necessary.
4783 Patch by Jakub Jelinek.
4785 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
4787 2003-03-17 Roland McGrath <roland@redhat.com>
4789 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
4790 * sysdeps/pthread/pthread_spin_init.c: New file.
4791 * sysdeps/pthread/pthread_spin_unlock.c: New file.
4792 * sysdeps/powerpc/Makefile: New file.
4793 * sysdeps/powerpc/pthread_spin_lock.c: New file.
4794 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
4795 * sysdeps/powerpc/pthreaddef.h: New file.
4796 * sysdeps/powerpc/tcb-offsets.sym: New file.
4797 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
4798 * sysdeps/powerpc/tls.h: New file.
4799 * sysdeps/powerpc/bits/atomic.h: New file.
4800 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
4801 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
4802 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
4804 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
4805 * sysdeps/unix/sysv/linux/sem_post.c: New file.
4806 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
4807 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
4808 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
4809 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
4810 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
4811 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
4812 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
4813 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
4814 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
4815 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
4816 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
4817 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
4818 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
4820 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
4822 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
4823 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
4824 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
4825 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
4826 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
4828 2003-03-17 Ulrich Drepper <drepper@redhat.com>
4830 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
4831 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4832 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4833 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4834 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
4836 2003-03-16 Roland McGrath <roland@redhat.com>
4838 * tst-fork4.c: Include <string.h>.
4839 * tst-signal2.c: Likewise.
4840 * tst-mutex5.c (do_test): exit -> return.
4841 * tst-mutex2.c: Include <stdlib.h>.
4843 2003-03-16 Ulrich Drepper <drepper@redhat.com>
4845 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
4846 (__lll_mutex_timedlock_wait): Correct expected value after
4847 spurious wakeup. Otherwise we would never wait again.
4849 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
4850 zone versus inline asm stupidity. Use correct instructions.
4852 * tst-rwlock6.c: Add some more status output.
4854 2003-03-15 Roland McGrath <roland@redhat.com>
4856 * sysdeps/pthread/configure.in: New file.
4857 * sysdeps/pthread/configure: New file (generated).
4859 2003-03-15 Ulrich Drepper <drepper@redhat.com>
4861 * allocatestack.c (allocate_stack): Store the exact stack size of
4862 user allocated stacks.
4864 2003-03-15 Jakub Jelinek <jakub@redhat.com>
4866 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4867 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
4868 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
4869 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
4870 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4871 Use `header.' prefix.
4872 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
4874 2003-03-15 Ulrich Drepper <drepper@redhat.com>
4876 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
4877 __builtin_frame_address, use stack pointer.
4879 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
4880 instead of __builtin_frame_pointer.
4882 2003-03-14 Ulrich Drepper <drepper@redhat.com>
4884 * tst-basic1.c (do_test): Add cast to avoid warning.
4885 * tst-basic2.c (do_test): Likewise.
4887 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
4888 amount of stack correction.
4890 * tst-fork4.c: Use test-skeleton.c.
4892 2003-03-14 Roland McGrath <roland@redhat.com>
4894 * init.c: Fix typo "#eli" for "#else".
4896 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
4898 * allocatestack.c (__stack_user): Use hidden_data_def.
4899 * pthread_create.c (__pthread_keys): Likewise.
4901 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
4903 2003-03-14 Roland McGrath <roland@redhat.com>
4905 * tst-fork4.c: New file.
4906 * Makefile (tests): Add it.
4908 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
4909 we always define the padding space.
4910 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
4911 stopped supporting its own extensions fully.
4912 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
4913 struct also called `header', so `header.multiple_threads' is the field
4914 name to use on all machines.
4915 * allocatestack.c (allocate_stack): Use `header.' prefix.
4916 * sysdeps/pthread/createthread.c (create_thread): Likewise.
4917 * pthread_create.c (__pthread_create_2_1): Likewise.
4918 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
4919 (THREAD_SELF): Likewise.
4920 * sysdeps/x86_64/tls.h: Likewise.
4921 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
4922 (SINGLE_THREAD_P): Likewise.
4923 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
4924 (SINGLE_THREAD_P): Likewise.
4925 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4926 (SINGLE_THREAD_P): Likewise.
4928 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
4931 2003-03-14 Ulrich Drepper <drepper@redhat.com>
4933 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
4934 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
4936 * pthread_create.c (start_thread): setjmp is expected to return 0.
4938 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
4939 (THREAD_GETMEM_NC): Likewise.
4941 2003-03-13 Ulrich Drepper <drepper@redhat.com>
4943 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
4944 and the size of the stack which must be allocated is a multiple,
4945 allocate one more page.
4946 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
4947 MULTI_PAGE_ALIASING.
4949 2003-03-13 Roland McGrath <roland@redhat.com>
4951 * pthread_create.c (start_thread): Set EXITING_BIT after the
4952 event-reporting (and destructors), not before.
4954 2003-03-13 Jakub Jelinek <jakub@redhat.com>
4956 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
4957 lll_futex_wake): Declare register variables as long int instead of
4958 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
4959 Make syscall arguments clobbered by the syscall.
4960 (lll_futex_wait): Define using lll_futex_timed_wait.
4962 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
4965 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
4968 * allocatestack.c (nptl_ncreated): Only declare if
4969 COLORING_INCREMENT != 0.
4971 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
4972 (__libc_enable_asynccancel_2): Remove prototype.
4974 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
4975 ctid to match kernel.
4977 2003-03-12 Ulrich Drepper <drepper@redhat.com>
4979 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
4980 libc_multiple_threads.
4981 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
4982 __libc_multiple_threads to...
4983 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
4985 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
4987 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4988 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4990 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
4991 (__pthread_once_internal): Define.
4993 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
4994 macros instead of .symver directly.
4995 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4996 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4998 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
4999 * sysdeps/x86_64/tcb-offsets.sym: New file.
5000 * sysdeps/x86_64/Makefile: New file.
5002 * sysdeps/i386/tcb-offsets.sym: Add SELF.
5003 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
5004 to access own pthread_t in TCB.
5005 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5007 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5009 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5011 2003-03-12 Roland McGrath <roland@redhat.com>
5013 * pthread-errnos.sym: New file.
5014 * Makefile (gen-as-const-headers): New variable, list that file.
5015 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
5016 header <pthread-errnos.h> instead of defining errno values here.
5017 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5018 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5019 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
5020 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5021 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5023 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5025 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5026 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5027 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
5028 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5029 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5030 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5031 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5032 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5033 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5034 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5035 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5036 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
5037 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5038 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
5039 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5040 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5041 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5042 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5043 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5044 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5045 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
5046 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5047 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
5048 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
5049 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
5050 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5051 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5053 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
5054 CLONE_CHILD_SETTID worked.
5056 2003-03-12 Ulrich Drepper <drepper@redhat.com>
5058 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
5060 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
5063 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5064 (pthread_cond_t): Add padding.
5066 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
5067 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
5068 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
5070 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
5071 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
5072 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
5073 (__pthread_rwlock_timedrdlock): Likewise.
5074 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
5075 (__pthread_rwlock_wrlock): Likewise.
5076 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
5077 (__pthread_rwlock_rdlock): Likewise.
5079 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
5081 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
5082 result of lock re-get if it fails.
5084 2003-03-11 Ulrich Drepper <drepper@redhat.com>
5086 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
5087 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5088 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5089 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5090 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5091 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5092 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5093 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5094 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5095 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5097 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
5098 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
5100 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
5101 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
5102 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
5103 (create_thread): Likewise.
5104 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
5105 * init.c (__pthread_initialize_minimal_internal): Initialize
5106 __libc_multiple_threads_ptr if necessary.
5107 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
5108 __pthread_multiple_threads and __libc_multiple_threads_ptr.
5109 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
5110 __libc_multiple_threads.
5111 (__libc_pthread_init): Return pointer to __libc_pthread_init if
5114 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
5115 (THREAD_SETMEM_NC): Likewise.
5117 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
5118 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
5119 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
5120 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
5122 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
5123 Eliminate one entire instruction.
5125 * cancellation.c (__pthread_enable_asynccancel_2): New function.
5126 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
5127 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5128 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
5129 instead of __pthread_enable_asynccancel.
5130 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5131 (__pthread_cond_wait): Likewise.
5132 * sysdeps/pthread/pthread_cond_timedwait.c
5133 (__pthread_cond_timedwait): Likewise.
5134 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5136 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5137 (__condvar_cleanup): Wake up all waiters in case we got signaled
5138 after being woken up but before disabling asynchronous
5140 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
5141 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5142 (__condvar_cleanup): Likewise.
5144 * init.c (__NR_set_tid_address): If already defined, don't redefine.
5145 Make it an error if architecture has no #if case. Add x86-64.
5147 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
5148 pt-initfini.s generation.
5150 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
5151 (TLS_INIT_TP): Fix typo.
5153 2003-03-11 Jakub Jelinek <jakub@redhat.com>
5155 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
5156 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
5158 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
5159 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
5160 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
5161 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
5162 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
5163 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5164 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
5165 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
5167 2003-03-11 Ulrich Drepper <drepper@redhat.com>
5169 * sysdeps/pthread/pthread_cond_timedwait.c
5170 (__pthread_cond_timedwait): Return the result of the final
5171 locking. If it succeeds, the regular function return value.
5173 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
5174 Return result of the final locking.
5175 * version.c (__nptl_main): Work around problems with the strange
5176 INTERNAL_SYSCALL macro on ppc32.
5177 * init.c (__pthread_initialize_minimal_internal): Unblock
5178 SIGCANCEL in case the parent blocked it.
5179 Reported by Paul Mackerras <paulus@samba.org>.
5181 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
5182 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
5183 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
5185 2003-03-11 Jakub Jelinek <jakub@redhat.com>
5187 * sysdeps/pthread/pthread_cond_timedwait.c
5188 (__pthread_cond_timedwait): Unlock and fail if
5189 __pthread_mutex_unlock_internal failed.
5191 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
5192 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
5194 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
5195 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
5196 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
5197 ALLOCATE_STACK): New macros.
5198 (TLS_TPADJ): New macro.
5199 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
5200 (allocate_stack): Handle TLS_DTV_AT_TP and
5201 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
5202 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
5204 * init.c [__ia64__] (__NR_set_tid_address): Define.
5206 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
5207 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
5208 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
5209 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
5210 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
5211 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
5212 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
5213 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
5214 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
5215 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
5216 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
5217 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
5218 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
5219 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
5220 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
5221 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
5222 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
5223 * sysdeps/ia64/bits/atomic.h: New file.
5224 * sysdeps/ia64/Makefile: New file.
5225 * sysdeps/ia64/pthread_spin_init.c: New file.
5226 * sysdeps/ia64/pthread_spin_lock.c: New file.
5227 * sysdeps/ia64/pthread_spin_trylock.c: New file.
5228 * sysdeps/ia64/pthread_spin_unlock.c: New file.
5229 * sysdeps/ia64/pthreaddef.h: New file.
5230 * sysdeps/ia64/tcb-offsets.sym: New file.
5231 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
5232 * sysdeps/ia64/tls.h: New file.
5234 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
5235 to syscall instead of no arguments.
5237 2003-03-10 Ulrich Drepper <drepper@redhat.com>
5239 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
5240 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
5241 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
5242 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
5244 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
5247 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
5249 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5250 lowlevelbarrier.sym.
5251 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
5252 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
5253 Include lowlevelbarrier.h and don't define offsets locally.
5254 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
5256 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
5257 (__lll_mutex_lock_wait): Reverse order of first two parameters.
5258 (__lll_mutex_timedlock_wait): Likewise.
5259 (lll_mutex_lock): Adjust asm for that.
5260 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
5261 (lll_lock): Adjust asm for operand order change.
5262 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
5263 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
5265 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
5266 Reverse order of parameters.
5267 (__lll_timedwait_tid): Remove regparms attribute.
5268 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
5269 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
5271 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5272 (__lll_timedwait_tid): Remove one unnecessary instruction.
5274 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
5275 __lll_mutex_timedlock_wait only for NOT_IN_libc.
5276 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
5279 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
5280 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
5282 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
5285 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
5286 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
5288 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
5289 define LOCK here (if UP is not defined). The actual code is in
5292 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
5293 LOCK is already defined. Don't define lll_unlock_wake_cb and
5294 __lll_timedwait_tid for libc.so.
5295 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
5296 define LOCK here (if UP is not defined). The actual code is in
5299 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
5300 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
5301 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
5302 instead of lowlevelsem.h.
5303 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5304 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
5305 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
5307 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5309 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
5310 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
5311 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
5313 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
5315 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
5318 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
5320 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
5321 of __libc_locking_needed.
5322 (lll_trylock): Initialize %eax to zero.
5324 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
5325 pthread_cond_t definition.
5327 2003-03-10 Roland McGrath <roland@redhat.com>
5329 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
5330 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
5331 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
5332 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
5333 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
5335 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
5336 Instead of setting PD->multiple_threads, set globals
5337 __pthread_multiple_threads and __libc_multiple_threads.
5338 * sysdeps/pthread/createthread.c (create_thread): Likewise.
5339 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
5340 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
5342 * descr.h (struct pthread): Conditionalize first member on
5343 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
5344 containing an anonymous tcbhead_t. Move `list' member out.
5345 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
5346 * allocatestack.c: Remove use of `header.data.' prefix.
5347 * pthread_create.c: Likewise.
5348 * init.c (__pthread_initialize_minimal_internal): Likewise.
5349 * sysdeps/pthread/createthread.c (create_thread): Likewise.
5350 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
5351 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
5352 * sysdeps/x86_64/tls.h: Likewise.
5353 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
5354 (SINGLE_THREAD_P): Likewise.
5355 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
5356 (SINGLE_THREAD_P): Likewise.
5357 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
5358 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
5360 2003-03-09 Ulrich Drepper <drepper@redhat.com>
5362 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
5364 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
5365 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
5367 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
5368 leftovers from the ia32 code.
5370 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
5372 (clear_once_control): Don't load %esi.
5374 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
5377 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
5379 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
5380 * sysdeps/unix/sysv/linux/createthread.c: ...here.
5382 * Makefile (tests): Add tst-cond10.
5383 * tst-cond10.c: New file.
5385 2003-03-08 Ulrich Drepper <drepper@redhat.com>
5387 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
5388 * tst-signal3.c (do_test): Likewise.
5389 * tst-sem5.c (do_test): Likewise.
5390 * tst-kill6.c (do_test): Likewise.
5391 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
5393 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
5395 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
5396 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
5397 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5398 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
5399 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5400 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5401 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5403 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5405 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5406 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5407 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5408 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5409 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5410 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
5411 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
5412 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5414 * allocatestack.c (allocate_stack): If mprotect() fails free the
5417 2003-03-07 Ulrich Drepper <drepper@redhat.com>
5419 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
5421 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
5422 lll_wake_tid. This was used only to work around kernel limits in
5424 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5425 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
5426 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
5427 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
5429 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
5430 (__pthread_initialize_minimal_internal): Change initialization of
5431 __static_tls_align_m1 appropriately.
5432 * pthreadP.h (__static_tls_align_m1): Renamed from
5434 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
5435 instead of __static_tls_align-1.
5437 2003-03-04 Ulrich Drepper <drepper@redhat.com>
5439 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
5441 * pthread_create.c: Define __pthread_keys using nocommon
5442 attribute, not by placing it explicitly in bss.
5443 Remove DEFINE_DEALLOC definition. Not needed anymore.
5445 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
5446 Use it in mmap call to allocate stacks.
5448 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
5450 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
5451 result of the thread function.
5453 2003-03-03 Ulrich Drepper <drepper@redhat.com>
5455 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
5456 version is just fine.
5458 * sysdeps/unix/sysv/linux/libc_pthread_init.c
5459 (__pthread_child_handler): Renamed from pthread_child_handler,
5460 exported, and marked hidden. Change all users.
5461 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
5462 free __pthread_child_handler from child list.
5464 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
5466 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
5468 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5469 Fix handling of cancellation and failing pthread_mutex_unlock call.
5470 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
5471 (__pthread_cond_wait): Likewise.
5473 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5474 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
5475 lll_futex_timed_wait call.
5476 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5477 (pthread_rwlock_timedwrlock): Likewise.
5479 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
5480 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
5481 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
5483 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
5484 check of lll_futex_wake return value.
5486 2003-03-03 Roland McGrath <roland@redhat.com>
5488 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
5490 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5491 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
5492 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
5494 2003-03-02 Ulrich Drepper <drepper@redhat.com>
5496 * sysdeps/pthread/timer_create.c (timer_create): Return correct
5497 error for CPU clocks.
5499 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5500 _POSIX_MONOTONIC_CLOCK.
5501 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5503 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
5506 2003-03-01 Ulrich Drepper <drepper@redhat.com>
5508 * descr.h (struct pthread): Move cleanup field to the front.
5510 2003-03-01 Roland McGrath <roland@redhat.com>
5512 * sem_open.c (sem_open): Braino fix.
5514 2003-03-01 Ulrich Drepper <drepper@redhat.com>
5516 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
5517 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
5518 __pthread_cleanup_pop functionality.
5519 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5521 * descr.h (struct pthread): Move tid field to the front now that
5524 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
5525 (__lll_mutex_timedlock_wait): Remove.
5526 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
5527 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
5528 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
5529 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5530 (lll_unlock_wake_cb): Don't save and restore %esi.
5531 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
5533 (__lll_timedwait_tid): Add alignment.
5534 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
5535 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
5537 (__lll_timedwait_tid): Removed.
5538 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5539 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
5540 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5541 (pthread_barrier_wait): Don't save, load, and restore %esi for
5543 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5544 (__pthread_cond_signal): Don't save, load, and restore %esi.
5545 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
5546 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
5547 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5548 Don't save, load, and restore %esi.
5550 2003-02-27 Ulrich Drepper <drepper@redhat.com>
5552 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
5553 Release lock before waking up the waiters.
5555 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
5557 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
5558 (reader_thread): Likewise.
5560 * sysdeps/pthread/pthread_rwlock_unlock.c
5561 (__pthread_rwlock_unlock): Release internal lock early. Don't try
5562 to wake up readers if there are none.
5564 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
5565 Release internal lock before wake threads.
5567 2003-02-26 Ulrich Drepper <drepper@redhat.com>
5569 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
5570 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
5572 * tst-rwlock9.c: Likewise.
5573 * tst-rwlock10.c: New file.
5574 * tst-rwlock11.c: New file.
5576 * Makefile (tests): Add tst-dlsym1.
5577 * tst-dlsym1.c: New file.
5579 * init.c (__pthread_initialize_minimal_internal): Set
5580 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
5581 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
5583 2003-02-24 Ulrich Drepper <drepper@redhat.com>
5585 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
5587 * tst-cond2.c: Fix sychronization with child.
5589 * tst-rwlock8.c (reader_thread): Remove unused variable.
5591 * Makefile: Add rules to build and run tst-tls3.
5592 * tst-tls3.c: New file.
5593 * tst-tls3mod.c: New file.
5595 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
5596 * tst-rwlock8.c: New file.
5597 * tst-rwlock9.c: New file.
5598 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
5599 complete broken rwlock implementation.
5600 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5602 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5604 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5605 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5606 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
5607 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
5608 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5609 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
5610 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
5612 2003-02-23 Roland McGrath <roland@redhat.com>
5614 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
5616 2003-02-23 Ulrich Drepper <drepper@redhat.com>
5618 * Makefile (tests): Add tst-context1.
5619 * tst-context1.c: New file.
5621 * Makefile (tests): Add tst-tls1 and tst-tls2.
5622 * tst-tls1.c: New file.
5623 * tst-tls2.c: New file.
5625 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
5628 * pthread_create.c (start_thread): Set EXITING_BIT early.
5630 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
5631 (THREAD_GETMEM_NC): Likewise.
5633 2003-02-22 Ulrich Drepper <drepper@redhat.com>
5635 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
5636 off 3 more bytes by using offset-less instructions when possible.
5638 * Makefile: Add dependency for $(objpfx)version.d.
5640 * eintr.c (eintr_source): Add unnecessary return but the compiler
5643 * tst-kill3.c: Include <unistd.h>.
5645 2003-02-21 Roland McGrath <roland@redhat.com>
5647 * pthread_create.c (start_thread): Call __libc_thread_freeres.
5649 2003-02-21 Ulrich Drepper <drepper@redhat.com>
5651 * Makefile (tests): Add tst-eintr1.
5652 (distribute): Add eintr.c.
5653 * tst-eintr1.c: New file.
5654 * eintr.c: New file.
5656 * pthread_cancel.c (pthread_cancel): Use tkill directly.
5658 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
5659 Disallow sending SIGCANCEL.
5661 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
5662 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
5663 * tst-kill1.c: New file.
5664 * tst-kill2.c: New file.
5665 * tst-kill3.c: New file.
5666 * tst-kill5.c: New file.
5667 * tst-kill6.c: New file.
5668 * tst-basic7.c: Renamed to...
5669 * tst-kill4.c: ...this.
5671 2003-02-21 Roland McGrath <roland@redhat.com>
5673 * Makefile (install-lib-ldscripts): New variable.
5675 2003-02-21 Ulrich Drepper <drepper@redhat.com>
5677 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
5678 * pthread_cancel.c: Use INVALID_TD_P.
5679 * pthread_detach.c: Likewise.
5680 * pthread_getschedparam.c: Likewise.
5681 * pthread_setschedparam.c: Likewise.
5682 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
5683 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5684 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
5685 * pthread_timedjoin.c: Likewise.
5687 * tst-basic7.c: Include <signal.h>.
5689 * pthread_join.c (pthread_join): Limited checking for invalid
5691 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
5693 2003-02-20 Ulrich Drepper <drepper@redhat.com>
5695 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
5696 beginning of the loop. Clear the entire first block of TSD.
5697 * Makefile (tests): Add tst-key4.
5698 * tst-key4.c: New file.
5700 2003-02-18 Ulrich Drepper <drepper@redhat.com>
5702 * Makefile (tests): Add tst-basic7.
5703 * tst-basic7.c: New file.
5705 * pthread_create.c (deallocate_tsd): Mark as internal_function.
5706 Add some more __builtin_expect.
5708 * pthreadP.h: Define dummy version of DEBUGGING_P.
5710 2003-02-17 Ulrich Drepper <drepper@redhat.com>
5712 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
5713 _POSIX_THREAD_PRIORITY_SCHEDULING.
5714 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
5715 _XOPEN_REALTIME_THREADS.
5716 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5718 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
5719 kernel returns EINVAL for PID <= 0, work around it.
5721 * Makefile (tests): Add tst-signal5.
5722 * tst-signal5.c: New file.
5724 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
5727 * tst-cancel1.c (tf): Block all signals.
5729 * Makefile (tests): Add tst-basic6.
5730 * tst-basic6.c: New file.
5732 * tst-basic1.c: Add test for process ID.
5734 * Makefile (tests): Add tst-cancel10.
5735 * tst-cancel10.c: New file.
5737 * Makefile (tests): Add tst-signal4.
5738 * tst-signal4.c: New file.
5740 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
5741 __sigismember instead of sigismember. Add __builtin_expect.
5743 2003-02-16 Ulrich Drepper <drepper@redhat.com>
5745 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
5746 pthread_setcancelstate, and pthread_rwlock_setpshared.
5748 * tst-cancel7.c (do_test): Make sure the pid file exists before
5749 canceling the thread.
5751 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
5752 pthread_rwlock_timedrdlock tests.
5753 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
5754 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5755 Check for invalid tv_nsec field.
5756 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5759 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
5760 recursive mutex of overflow.
5762 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
5764 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
5765 going into an endless loop.
5766 * Makefile (tests): Add tst-cancel9.
5767 * tst-cancel9.c: New file.
5769 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
5771 2003-02-15 Ulrich Drepper <drepper@redhat.com>
5773 * tst-mutex5.c (do_test): Add more timedlock tests.
5775 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
5776 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
5778 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5779 use INLINE_SYSCALL. Error number is returned, not -1.
5781 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
5782 and __deallocate_stack with internal_function.
5783 * pthread_create.c: Adjust definitions appropriately.
5784 * allocatestack.c: Likewise.
5786 * pthread_join.c: Add one more __builtin_expect.
5787 * pthread_timedjoin.c: Likewise.
5789 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
5790 not data of sequence number does not match.
5791 Add one __builtin_expect.
5793 * Makefile (tests): Add tst-clock1.
5794 * tst-clock1.c: New file.
5796 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
5798 * Makefile (tests): Add tst-basic5.
5799 * tst-basic5.c: New file.
5801 2003-02-14 Ulrich Drepper <drepper@redhat.com>
5803 * Makefile (tests): Add tst-basic4.
5804 * tst-basic4.c: New file.
5806 * pthreadP.h: Add declaraction for __nptl_nthreads.
5807 * pthread_create.c: Define __nptl_nthreads
5808 (start_thread): Increment __nptl_nthreads at beginning. Decrement
5809 after thread is done. If then zero, call exit(0).
5810 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5811 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
5812 * init.c (pthread_functions): Initialize ptr_nthreads.
5813 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
5814 (__reclaim_stacks): Decrement __nptl_nthreads.
5815 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
5817 * Makefile (tests): Add tst-basic3.
5818 * tst-basic3.c: New file.
5820 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
5821 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
5822 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
5823 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
5824 if asynchronous canceling is enabled.
5825 * pthread_join.c (pthread_join): When recognizing circular joins,
5826 take into account the other thread might be already canceled.
5827 * Makefile (tests): Add tst-join5.
5828 * tst-join5.c: New file.
5830 * Makefile (tests): Add tst-join4.
5831 * tst-join4.c: New file.
5833 2003-02-13 Ulrich Drepper <drepper@redhat.com>
5835 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
5837 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
5839 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
5840 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
5841 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
5843 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
5845 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
5846 error if lll_futex_wake failed.
5848 2003-02-13 Ulrich Drepper <drepper@redhat.com>
5850 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
5851 handling of cancellation and failung pthread_mutex_unlock call.
5852 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5853 * Makefile (tests): Add tst-cond8 and tst-cond9.
5854 * tst-cond8.c: New file.
5855 * tst-cond9.c: New file.
5857 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
5859 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
5860 non-standard initializers with __USE_GNU.
5862 * Makefile (tests): Add tst-cleanup3.
5863 * tst-cleanup3.c: New file.
5865 2003-02-12 Ulrich Drepper <drepper@redhat.com>
5867 * Makefile (tests): Add tst-attr1 and tst-attr2.
5868 * tst-attr1.c: New file.
5869 * tst-attr2.c: New file.
5871 * Makefile: Add rules to build and run tst-atfork2 test.
5872 * tst-atfork2.c: New file.
5873 * tst-atfork2mod.c: New file.
5875 * sysdeps/unix/sysv/linux/unregister-atfork.c
5876 (__unregister_atfork): Free the memory allocated for the handlers
5877 after removing them from the lists.
5879 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
5882 * tst-atfork1.c (do_test): Wait for the child we forked.
5883 Report error in child.
5885 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
5887 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
5889 2003-02-10 Ulrich Drepper <drepper@redhat.com>
5891 * Makefile (tests): Add tst-cancel8.
5892 * tst-cancel8.c: New file.
5894 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
5895 clearing of control variable.
5896 * Makefile (tests): Add tst-once3 and tst-once4.
5897 * tst-once3.c: New file.
5898 * tst-once4.c: New file.
5900 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
5902 * sysdeps/sh/Makefile: New file.
5903 * sysdeps/sh/bits/atomic.h: New file.
5904 * sysdeps/sh/pthread_spin_init.c: New file.
5905 * sysdeps/sh/pthread_spin_lock.c: New file.
5906 * sysdeps/sh/pthread_spin_trylock.S: New file.
5907 * sysdeps/sh/pthread_spin_unlock.S: New file.
5908 * sysdeps/sh/pthreaddef.h: New file.
5909 * sysdeps/sh/tcb-offsets.sym: New file.
5910 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
5911 * sysdeps/sh/tls.h: New file.
5912 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
5913 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
5914 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
5915 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
5916 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
5917 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
5918 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
5919 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
5920 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
5921 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
5922 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
5923 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
5924 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
5925 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
5926 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
5927 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
5928 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
5929 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
5930 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
5931 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
5932 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
5933 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
5934 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
5935 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
5936 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
5937 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
5938 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
5939 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
5940 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
5941 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
5943 2003-02-08 Ulrich Drepper <drepper@redhat.com>
5945 * tst-cond2.c: Rearrange code to not rely on behavior undefined
5948 * tst-basic2.c (do_test): Lock mutex before creating the thread.
5950 2003-02-07 Ulrich Drepper <drepper@redhat.com>
5952 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
5953 (TLS_GET_FS): New #define.
5954 (TLS_SET_FS): New #define.
5955 Correct value of __NR_set_thread_area.
5957 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
5959 2003-02-06 Ulrich Drepper <drepper@redhat.com>
5961 * Makefile (tests): Add tst-popen1.
5962 * tst-popen1.c: New file.
5964 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
5965 but inactive generalization.
5966 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5967 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5968 Minor optimization, remove one instruction.
5969 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5971 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
5973 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
5975 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
5977 * init.c (__NR_set_tid_address): Add #ifdef for s390.
5978 * sysdeps/pthread/pthread_barrier_wait.c: New file.
5979 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
5980 * sysdeps/pthread/pthread_cond_signal.c: New file.
5981 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
5982 * sysdeps/pthread/pthread_cond_wait.c: New file.
5983 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
5984 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
5985 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
5986 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
5987 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
5988 * sysdeps/s390/Makefile: New file.
5989 * sysdeps/s390/bits/atomic.h: New file.
5990 * sysdeps/s390/pthread_spin_init.c: New file.
5991 * sysdeps/s390/pthread_spin_lock.c: New file.
5992 * sysdeps/s390/pthread_spin_trylock.c: New file.
5993 * sysdeps/s390/pthread_spin_unlock.c: New file.
5994 * sysdeps/s390/pthreaddef.h: New file.
5995 * sysdeps/s390/tcb-offsets.sym: New file.
5996 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
5997 * sysdeps/s390/tls.h: New file.
5998 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
5999 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
6000 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
6001 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
6002 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
6003 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
6004 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6005 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
6006 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
6007 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
6008 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
6009 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
6010 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
6011 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
6012 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
6013 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
6014 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
6015 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
6016 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
6017 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
6018 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
6019 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6020 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
6022 2003-02-04 Ulrich Drepper <drepper@redhat.com>
6024 * atomic.h: Add a couple more default implementations.
6025 (atomic_compare_and_exchange_acq): Use
6026 __arch_compare_and_exchange_32_acq in return value definition. It
6028 (atomic_bit_set): Renamed from atomic_set_bit.
6029 Add missing atomic_ prefixes.
6031 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
6032 thread library is available, use correct value to mark initialized
6035 2003-02-03 Ulrich Drepper <drepper@redhat.com>
6037 * allocatestack.c (allocate_stack): Use __getpagesize instead of
6038 __sysconf to determine pagesize.
6040 * pthread_create.c: Include <atomic.h>.
6041 * allocatestack.c (allocate_stack): Implement coloring of the
6042 allocated stack memory. Rename pagesize to pagesize_m1. It's the
6043 size minus one. Adjust users.
6044 * sysdeps/i386/i686/Makefile: New file.
6046 2003-02-02 Ulrich Drepper <drepper@redhat.com>
6048 * allocatestack.c: Improve comment throughout the file.
6050 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6051 (__lll_lock_wait): Add branch prediction.
6052 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6053 (__lll_lock_wait): Likewise.
6054 (lll_unlock_wake_cb): Removed.
6056 2003-01-31 Ulrich Drepper <drepper@redhat.com>
6058 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
6059 _POSIX_THREAD_PRIORITY_SCHEDULING.
6061 2003-01-30 Jakub Jelinek <jakub@redhat.com>
6063 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6064 Fix return type of ptr___pthread_getspecific.
6066 2003-01-29 Ulrich Drepper <drepper@redhat.com>
6068 * Makefile (tests): Add tst-umask1.
6069 (tst-umask1-ARGS): Define.
6070 * tst-umask1.c: New file.
6072 2003-01-28 Ulrich Drepper <drepper@redhat.com>
6074 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
6075 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
6076 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
6077 pthread_rwlock_unlock.
6078 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
6079 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
6080 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
6081 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
6082 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6084 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
6085 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6087 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
6088 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
6089 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
6091 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
6092 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
6094 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
6095 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
6096 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
6098 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
6099 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
6101 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
6103 * Makefile (libpthread-routines): Remove lowlevelcond and
6104 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
6105 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
6106 and pthread_cond_broadcast.
6107 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
6108 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
6109 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
6110 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
6111 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
6112 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
6113 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
6114 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
6115 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
6116 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
6117 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
6118 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
6119 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
6120 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
6121 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
6122 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
6123 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
6124 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
6125 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
6126 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
6127 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
6128 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
6129 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
6130 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
6131 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
6132 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
6133 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
6134 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
6135 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
6136 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
6137 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
6139 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
6140 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
6141 of the code is moved to ...
6142 * sysdeps/pthread/createthread.c: ...here. New file.
6144 2003-01-27 Ulrich Drepper <drepper@redhat.com>
6146 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
6147 (__new_sem_post): Clear %eax before returning.
6148 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
6150 * Makefile (tests): Add tst-cleanup2.
6151 * tst-cleanup2.c: New file.
6153 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
6154 Interpret first parameter correctly.
6156 2003-01-17 Ulrich Drepper <drepper@redhat.com>
6158 * Makefile (headers): Add bits/semaphore.h.
6160 2003-01-16 Jakub Jelinek <jakub@redhat.com>
6162 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
6165 2003-01-14 Ulrich Drepper <drepper@redhat.com>
6167 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
6168 must be used and mapping failed.
6169 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
6171 * Makefile (CFLAGS-pthread_self.os): Define this, not
6172 CFLAGS-pthread_self.c.
6174 2003-01-13 Ulrich Drepper <drepper@redhat.com>
6176 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
6179 * Makefile (libpthread-routines): Add version. Add rules to build
6180 version.os and banner.h.
6181 * version.c: New file.
6183 2003-01-13 Jakub Jelinek <jakub@redhat.com>
6185 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
6186 the alias unconditional.
6187 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
6189 2003-01-13 Ulrich Drepper <drepper@redhat.com>
6191 * Makefile (CFLAGS-pthread_self.c): New definition.
6193 2003-01-06 Jakub Jelinek <jakub@redhat.com>
6195 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
6196 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
6197 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
6198 * init.c (__pthread_initialize_minimal_internal): Likewise.
6200 2003-01-07 Jakub Jelinek <jakub@redhat.com>
6202 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
6204 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6205 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
6206 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
6207 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6208 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
6209 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
6211 2003-01-06 Jakub Jelinek <jakub@redhat.com>
6213 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
6214 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
6215 * tst-cancel-wrappers.sh: Remove all exceptions.
6217 2003-01-05 Ulrich Drepper <drepper@redhat.com>
6219 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
6220 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
6222 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
6223 Use __libc_pthread_functions array if SHARED.
6225 * pthreadP.h: Move pthread_cond_2_0_t definition to...
6226 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
6228 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
6229 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
6230 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
6231 __libc_ptf_call instead of __libc_maybe_call.
6233 (__libc_cleanup_region_start): Wrap function name with PTF call.
6234 (__libc_cleanup_region_end): Likewise.
6235 (__libc_cleanup_end): Likewise.
6237 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
6238 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
6239 * pthread_key_create.c: Add __pthread_key_create_internal alias.
6240 * pthreadP.h: Add prototypes.
6242 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
6243 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
6244 __pthread_rwlock_unlock aliases.
6245 * pthreadP.h: Add prototypes for new aliases.
6247 * pthreadP.h (struct pthead_functions): Moved to...
6248 * sysdeps/pthread/pthread-functions.h: ...here. New file.
6249 * init.c (pthread_functions): Add initializers for new elements.
6251 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
6252 __pthread_cleanup_pop_restore aliases.
6253 * pthreadP.h: Add prototypes.
6255 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
6256 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
6257 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
6258 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
6259 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
6260 * pthreadP.h: Adjust prototypes and callers.
6262 2003-01-04 Ulrich Drepper <drepper@redhat.com>
6264 * Makefile (tests): Add tst-cancel7.
6265 (tst-cancel7-ARGS): New variable.
6266 * tst-cancel7.c: New file.
6268 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
6269 around gcc defficiencies.
6270 * old_pthread_cond_signal.c: Likewise.
6271 * old_pthread_cond_timedwait.c: Likewise.
6272 * old_pthread_cond_wait.c: Likewise.
6274 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
6276 2003-01-03 Ulrich Drepper <drepper@redhat.com>
6278 * Makefile (tests): Add tst-cond7.
6279 * tst-cond7.c: New file.
6281 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
6282 (condvar_cleanup): Get condvar address from the right place.
6284 * atomic.h: Correct definitions of atomic_full_barrier,
6285 atomic_read_barrier, atomic_write_barrier.
6287 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
6289 * old_pthread_cond_signal.c: Likewise.
6290 * old_pthread_cond_timedwait.c: Likewise.
6291 * old_pthread_cond_wait.c: Likewise.
6293 2003-01-03 Jakub Jelinek <jakub@redhat.com>
6295 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
6297 2003-01-03 Ulrich Drepper <drepper@redhat.com>
6299 * pthreadP.h (pthread_cond_2_0_t): New type.
6300 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
6301 Use new type for the 2.0 condvar function prototypes.
6302 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
6303 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
6305 * old_pthread_cond_destroy.c: Likewise.
6306 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
6307 * old_pthread_cond_signal.c: Likewise.
6308 * old_pthread_cond_timedwait.c: Likewise.
6309 * old_pthread_cond_wait.c: Likewise.
6311 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
6312 (__pthread_cond_wait): Don't save cancellation mode and seq value
6315 * herrno.c (__h_errno_location): Don't define as weak.
6317 2003-01-02 Jakub Jelinek <jakub@redhat.com>
6319 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
6320 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
6321 and pthread_cond_wait.
6322 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
6324 (__pthread_cond_broadcast_2_0): ... this.
6325 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
6327 (__pthread_cond_destroy_2_0): ... this.
6328 * old_pthread_cond_init.c (__old_pthread_cond_init):
6330 (__pthread_cond_init_2_0): ... this.
6331 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
6333 (__pthread_cond_signal_2_0): ... this.
6334 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
6336 (__pthread_cond_wait_2_0): ... this.
6337 * pthread_cond_destroy.c: Include shlib-compat.h.
6338 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
6339 * pthread_cond_init.c: Include shlib-compat.h.
6340 (pthread_cond_init): Change strong_alias into versioned_symbol.
6341 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
6342 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
6344 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
6345 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
6346 __pthread_cond_wait_2_0): New prototypes.
6347 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
6348 __old_pthread_cond_init, __old_pthread_cond_signal,
6349 __old_pthread_cond_wait): Removed.
6350 * init.c: Include shlib-compat.h.
6351 (pthread_functions): Guard ptr___pthread_attr_init_2_0
6352 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
6353 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
6354 ptr___pthread_cond_*_2_0 fields.
6355 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
6356 pthread_cond_*@GLIBC_2.0 compatibility symbols.
6358 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
6359 LIBC_SIGACTION was not yet defined.
6360 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
6361 [!defined LIBC_SIGACTION] (__sigaction): New function and
6363 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
6364 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
6366 2003-01-02 Jakub Jelinek <jakub@redhat.com>
6368 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
6370 2003-01-02 Ulrich Drepper <drepper@redhat.com>
6372 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6373 New, larger type definition.
6374 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
6376 * Versions [libpthread]: Add definitions for new pthread_cond_*
6377 interfaces for version GLIBC_2.3.2.
6378 * pthread_cond_init.c: Update initialization for new type definition.
6379 * Makefile (libpthread-routines): Remove pthread_cond_wait,
6380 pthread_cond_timedwait, pthread_cond_signal, and
6381 pthread_cond_broadcast. Add old_pthread_cond_init,
6382 old_pthread_cond_destroy, old_pthread_cond_wait,
6383 old_pthread_cond_timedwait, old_pthread_cond_signal, and
6384 old_pthread_cond_broadcast.
6385 * old_pthread_cond_broadcast.c: New file.
6386 * old_pthread_cond_destroy.c: New file.
6387 * old_pthread_cond_init.c: New file.
6388 * old_pthread_cond_signal.c: New file.
6389 * old_pthread_cond_timedwait.c: New file.
6390 * old_pthread_cond_wait.c: New file.
6391 * pthreadP.h: Add prototypes for the compatibility interfaces.
6393 * pthread_cond_destroy.c: Don't include <errno.h>.
6395 2003-01-01 Ulrich Drepper <drepper@redhat.com>
6397 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
6398 unnecessary zero offset when addressing MUTEX.
6400 2002-12-31 Ulrich Drepper <drepper@redhat.com>
6402 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6404 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
6405 for __register_atfork.
6407 2002-12-31 Jakub Jelinek <jakub@redhat.com>
6409 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
6410 instead of ASSEMBLER test macro.
6412 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
6413 __libc_current_sigrtmax): Add libc_hidden_def.
6415 * sysdeps/pthread/list.h: Remove assert.h include.
6417 2002-12-31 Ulrich Drepper <drepper@redhat.com>
6419 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
6420 __pthread_initialize_minimal_internal not
6421 __pthread_initialize_minimal.
6423 2002-12-30 Ulrich Drepper <drepper@redhat.com>
6425 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
6426 __pthread_initialize_minimal as hidden.
6428 * init.c (__pthread_initialize_minimal_internal): Don't mark as
6431 2002-12-31 Jakub Jelinek <jakub@redhat.com>
6433 * Makefile ($(inst_libdir)/libpthread.so): Depend on
6434 $(common-objpfx)format.lds, include that into the output script.
6436 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
6438 2002-12-28 Andreas Jaeger <aj@suse.de>
6440 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
6441 nsec resolution changes.
6442 (xstat64_conv): Likewise.
6443 (xstat32_conv): Likewise.
6444 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
6446 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
6447 structs stat and stat64.
6448 * time/time.h (__timespec_defined): Define for __USE_MISC.
6449 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
6451 2002-12-30 Jakub Jelinek <jakub@redhat.com>
6453 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
6455 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
6456 (pthread_exit): Use strong_alias to avoid warnings.
6457 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
6458 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
6459 ptr___pthread_attr_init_2_*.
6460 * init.c (pthread_functions): Adjust.
6462 2002-12-29 Ulrich Drepper <drepper@redhat.com>
6464 * forward.c: Make all functions available by default again. It
6465 caused too much trouble.
6467 * pt-siglongjmp.c: Removed.
6469 2002-12-28 Jakub Jelinek <jakub@redhat.com>
6471 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
6472 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
6473 * sysdeps/i386/Makefile: New file.
6474 * sysdeps/i386/tcb-offsets.sym: New file.
6475 * sysdeps/pthread/tcb-offsets.h: New file.
6476 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
6477 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
6479 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
6480 __register_atfork...
6481 (GLIBC_2.3.2): ...here.
6483 2002-12-28 Ulrich Drepper <drepper@redhat.com>
6485 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
6486 pthread_attr_setstackaddr with __attribute_deprecated__.
6488 2002-12-27 Jakub Jelinek <jakub@redhat.com>
6490 * pt-system.c (system): Remove cancellation handling.
6491 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
6492 cancellation routines.
6494 2002-12-28 Ulrich Drepper <drepper@redhat.com>
6496 * descr.h: Include <dl-sysdep.h>.
6497 (struct pthread): Move header.data.list to the back of the struct.
6498 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
6499 (MULTIPLE_THREADS_OFFSET): Adjust offset.
6500 (SYSINFO_OFFSEET): Likewise.
6502 2002-12-27 Jakub Jelinek <jakub@redhat.com>
6504 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
6506 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
6507 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
6508 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
6509 (USE_DL_SYSINFO): Undef.
6511 2002-12-22 Jakub Jelinek <jakub@redhat.com>
6513 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
6514 $(common-objpfx)libc.so.
6515 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
6516 it is bigger than pipe buffer size even on arches with bigger
6518 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
6520 2002-12-25 Ulrich Drepper <drepper@redhat.com>
6522 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
6523 correct errno access for case that USE___THREAD is not defined.
6525 2002-12-24 Ulrich Drepper <drepper@redhat.com>
6527 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
6528 Patch by Marijn Ros <marijn@mad.scientist.com>.
6530 2002-12-22 Roland McGrath <roland@redhat.com>
6532 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
6534 2002-12-20 Ulrich Drepper <drepper@redhat.com>
6536 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
6538 2002-12-19 Ulrich Drepper <drepper@redhat.com>
6540 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
6541 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
6542 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
6544 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
6546 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
6547 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
6548 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
6549 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
6550 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
6551 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
6552 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
6553 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
6555 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
6557 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
6559 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
6561 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
6563 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
6564 that sysinfo is properly initialized.
6565 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
6566 to 1 only for ld.so.
6568 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
6569 RTLD_CORRECT_DYNAMIC_WEAK.
6571 2002-12-19 Jakub Jelinek <jakub@redhat.com>
6573 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
6574 Use return 0 as 6th argument to FORWARD4.
6575 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
6577 2002-12-18 Ulrich Drepper <drepper@redhat.com>
6579 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
6580 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
6581 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
6582 (INIT_SYSINFO): New #define.
6583 (TLS_TP_INIT): Use INIT_SYSINFO.
6584 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
6585 At test to make sure SYSINFO_OFFSET value is correct.
6586 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
6588 2002-12-18 Jakub Jelinek <jakub@redhat.com>
6590 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
6591 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
6592 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
6593 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
6594 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
6595 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
6596 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
6598 2002-12-18 Ulrich Drepper <drepper@redhat.com>
6600 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
6601 macro instead of using int $0x80 directly.
6603 * sysdeps/pthread/bits/stdio-lock.h: New file.
6604 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
6605 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
6606 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
6607 * Makefile (routines): Add libc-lowlevelmutex.
6609 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
6610 __i686.get_pc_thunk.dx.
6612 2002-12-17 Jakub Jelinek <jakub@redhat.com>
6614 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
6615 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
6616 ($(objpfx)tst-cancel-wrappers.out): New rule.
6617 * tst-cancel-wrappers.sh: New test.
6618 * tst-locale1.c: Include signal.h.
6619 (uselocale): Test static linking of __libc_current_sigrt*.
6621 2002-12-17 Ulrich Drepper <drepper@redhat.com>
6623 * Makefile (tests): Add tst-cancel6.
6624 * tst-cancel6.c: New file
6626 2002-12-17 Jakub Jelinek <jakub@redhat.com>
6628 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
6629 Define meaningfully for assembler as well.
6630 * pthreadP.h (struct pthread_functions): Remove
6631 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
6632 and ptr_pthread_attr_init_2_1 fields.
6633 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
6634 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
6635 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
6636 (FORWARD3): Define using FORWARD4.
6637 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
6639 * pt-system.c: Remove duplicate stdlib.h include.
6641 2002-12-16 Ulrich Drepper <drepper@redhat.com>
6643 * sem_init.c: Define sem_init@GLIBC_2.0.
6644 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
6645 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
6647 * flockfile.c: Moved to...
6648 * sysdeps/pthread/flockfile.c: ...here. New file.
6649 * funlockfile.c: Moved to...
6650 * sysdeps/pthread/funlockfile.c: ...here. New file.
6651 * ftrylockfile.c: Moved to...
6652 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
6654 2002-12-16 Jakub Jelinek <jakub@redhat.com>
6656 * libc-cancellation.c: Guard both function with
6657 #if !defined NOT_IN_libc.
6658 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
6659 automatically provided pthread wrappers.
6660 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
6661 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
6663 * pt-open.c: Removed.
6664 * pt-fcntl.c: Removed.
6665 * pt-fsync.c: Removed.
6666 * pt-lseek.c: Removed.
6667 * pt-msgrcv.c: Removed.
6668 * pt-msgsnd.c: Removed.
6669 * pt-msync.c: Removed.
6670 * pt-nanosleep.c: Removed.
6671 * pt-open64.c: Removed.
6672 * pt-pause.c: Removed.
6673 * pt-pread.c: Removed.
6674 * pt-pread64.c: Removed.
6675 * pt-pwrite.c: Removed.
6676 * pt-pwrite64.c: Removed.
6677 * pt-read.c: Removed.
6678 * pt-recv.c: Removed.
6679 * pt-recvfrom.c: Removed.
6680 * pt-recvmsg.c: Removed.
6681 * pt-send.c: Removed.
6682 * pt-sendto.c: Removed.
6683 * pt-sigtimedwait.c: Removed.
6684 * pt-sigwait.c: Removed.
6685 * pt-wait.c: Removed.
6686 * pt-waitpid.c: Removed.
6687 * pt-write.c: Removed.
6688 * pt-accept.c: Removed.
6689 * pt-close.c: Removed.
6690 * pt-connect.c: Removed.
6691 * pt-lseek64.c: Removed.
6692 * pt-sendmsg.c: Removed.
6693 * pt-tcdrain.c: Removed.
6695 2002-12-15 Ulrich Drepper <drepper@redhat.com>
6697 * init.c (__pthread_initialize_minimal_internal): Renamed from
6698 __pthread_initialize_minimal. Make old name an alias. This
6699 converts a normal relocation into a relative relocation.
6701 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
6703 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
6704 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
6705 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
6706 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
6707 pt-sigwaitinfo, pt-waitid, and pt-writev.
6708 * pt-creat.c: Removed.
6709 * pt-poll.c: Removed.
6710 * pt-pselect.c: Removed.
6711 * pt-readv.c: Removed.
6712 * pt-select.c: Removed.
6713 * pt-sigpause.c: Removed.
6714 * pt-sigsuspend.c: Removed.
6715 * pt-sigwaitinfo.c: Removed.
6716 * pt-waitid.c: Removed.
6717 * pt-writev.c: Removed.
6719 * init.c (pthread_functions): New variable.
6720 (__pthread_initialize_minimal): Pass pointer to pthread_functions
6721 (or NULL) to __libc_pthread_init.
6722 * forward.c: Rewrite to use __libc:pthread_functions array to get
6724 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
6726 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
6727 Take new parameter. Copy content of variable pointed to by it
6728 to __libc_pthread_init.
6730 * pthreadP.h (struct pthread_functions): New type.
6731 (__libc_pthread_init): Declare.
6733 * pthread_attr_destroy.c: Add namespace protected alias.
6734 * pthread_attr_getdetachstate.c: Likewise.
6735 * pthread_attr_getinheritsched.c: Likewise.
6736 * pthread_attr_getschedparam.c: Likewise.
6737 * pthread_attr_getschedpolicy.c: Likewise.
6738 * pthread_attr_getscope.c: Likewise.
6739 * pthread_attr_setdetachstate.c: Likewise.
6740 * pthread_attr_setinheritsched.c: Likewise.
6741 * pthread_attr_setschedparam.c: Likewise.
6742 * pthread_attr_setschedpolicy.c: Likewise.
6743 * pthread_attr_setscope.c: Likewise.
6744 * pthread_cond_broadcast.c: Likewise.
6745 * pthread_cond_destroy.c: Likewise.
6746 * pthread_cond_init.c: Likewise.
6747 * pthread_cond_signal.c: Likewise.
6748 * pthread_cond_wait.c: Likewise.
6749 * pthread_condattr_destroy.c: Likewise.
6750 * pthread_condattr_init.c: Likewise.
6751 * pthread_equal.c: Likewise.
6752 * pthread_exit.c: Likewise.
6753 * pthread_getschedparam.c: Likewise.
6754 * pthread_self.c: Likewise.
6755 * pthread_setcancelstate.c: Likewise.
6756 * pthread_setschedparam.c: Likewise.
6757 * pthread_mutex_destroy.c: Likewise.
6758 * pthread_mutex_init.c: Likewise.
6759 * pthreadP.h: Add prototypes for the aliases.
6761 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
6762 multiple_threads member in correct TCB to 1.
6764 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
6765 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
6766 member of thread decriptor, otherwise return unconditionally 1.
6768 2002-12-14 Ulrich Drepper <drepper@redhat.com>
6770 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
6771 regular Linux version. Remove file.
6772 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
6773 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
6774 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
6775 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
6776 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
6777 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
6778 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
6779 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
6780 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
6781 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
6782 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
6783 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
6784 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
6785 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
6786 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
6787 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
6788 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
6789 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
6790 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
6791 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
6792 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
6793 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
6794 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
6795 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
6796 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
6797 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
6798 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
6799 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
6800 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
6801 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
6803 2002-12-14 Jakub Jelinek <jakub@redhat.com>
6805 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
6806 * sysdeps/unix/sysv/linux/open.c: Removed.
6807 * sysdeps/unix/sysv/linux/fsync.c: Removed.
6808 * sysdeps/unix/sysv/linux/lseek.c: Removed.
6809 * sysdeps/unix/sysv/linux/msync.c: Removed.
6810 * sysdeps/unix/sysv/linux/read.c: Removed.
6811 * sysdeps/unix/sysv/linux/close.c: Removed.
6812 * sysdeps/unix/sysv/linux/creat.c: Removed.
6813 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
6814 * sysdeps/unix/sysv/linux/pause.c: Removed.
6815 * sysdeps/unix/sysv/linux/select.c: Removed.
6816 * sysdeps/unix/sysv/linux/write.c: Removed.
6818 2002-12-14 Ulrich Drepper <drepper@redhat.com>
6820 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
6821 element in TCB to see whether locking is needed.
6823 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
6824 MULTIPLE_THREADS_OFFSET value is correct.
6826 * sysdeps/unix/sysv/linux/close.c: New file.
6827 * sysdeps/unix/sysv/linux/connect.S: New file.
6828 * sysdeps/unix/sysv/linux/creat.c: New file.
6829 * sysdeps/unix/sysv/linux/fsync.c: New file.
6830 * sysdeps/unix/sysv/linux/llseek.c: New file.
6831 * sysdeps/unix/sysv/linux/lseek.c: New file.
6832 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
6833 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
6834 * sysdeps/unix/sysv/linux/msync.c: New file.
6835 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
6836 * sysdeps/unix/sysv/linux/open.c: New file.
6837 * sysdeps/unix/sysv/linux/open64.c: New file.
6838 * sysdeps/unix/sysv/linux/pause.c: New file.
6839 * sysdeps/unix/sysv/linux/poll.c: New file.
6840 * sysdeps/unix/sysv/linux/pread.c: New file.
6841 * sysdeps/unix/sysv/linux/pread64.c: New file.
6842 * sysdeps/unix/sysv/linux/pselect.c: New file.
6843 * sysdeps/unix/sysv/linux/pwrite.c: New file.
6844 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
6845 * sysdeps/unix/sysv/linux/readv.c: New file.
6846 * sysdeps/unix/sysv/linux/recv.S: New file.
6847 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
6848 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
6849 * sysdeps/unix/sysv/linux/select.c: New file.
6850 * sysdeps/unix/sysv/linux/send.S: New file.
6851 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
6852 * sysdeps/unix/sysv/linux/sendto.S: New file.
6853 * sysdeps/unix/sysv/linux/sigpause.c: New file.
6854 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
6855 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6856 * sysdeps/unix/sysv/linux/sigwait.c: New file.
6857 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6858 * sysdeps/unix/sysv/linux/system.c: New file.
6859 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
6860 * sysdeps/unix/sysv/linux/wait.c: New file.
6861 * sysdeps/unix/sysv/linux/waitid.c: New file.
6862 * sysdeps/unix/sysv/linux/waitpid.c: New file.
6863 * sysdeps/unix/sysv/linux/writev.c: New file.
6864 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
6866 * pt-readv.c: Fix comment.
6868 2002-12-14 Jakub Jelinek <jakub@redhat.com>
6870 * tst-cleanup1.c: Include stdlib.h.
6872 * tst-cancel5.c: New test.
6873 * Makefile (tests): Add tst-cancel5.
6874 (tst-cancel5): Link against libc.so libpthread.so in that order.
6876 2002-12-13 Ulrich Drepper <drepper@redhat.com>
6878 * forward.c (test_loaded): Prevent recursive calls.
6880 * Makefile (routines): Add libc-cancellation.
6881 * libc-cancellation.c: New file.
6882 * descr.h (struct pthread): Add multiple_threads field.
6883 * allocatestack.c (allocate_stack): Initialize multiple_header field of
6884 new thread descriptor to 1.
6885 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
6886 Initialize multiple_thread field after successful thread creation.
6887 * cancellation.c (__do_cancel): Move to pthreadP.h.
6888 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
6889 (__pthread_disable_asynccancel): Add internal_function attribute.
6890 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
6891 * pthread_setcancelstate.c: Likewise.
6892 * pthread_setcanceltype.c: Likewise.
6893 * pthread_exit.c: Likewise.
6894 * pthreadP.h (CANCELLATION_P): Likewise.
6895 (__do_cancel): Define as static inline.
6896 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
6897 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
6899 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
6900 fields. Define MULTIPLE_THREADS_OFFSET.
6901 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
6903 * sysdeps/unix/sysv/linux/accept.S: New file.
6904 * sysdeps/unix/sysv/linux/read.c: New file.
6905 * sysdeps/unix/sysv/linux/write.c: New file.
6906 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
6907 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
6908 initialization of __libc_locking_needed.
6909 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
6910 __libc_locking_needed, use multiple_threads field in TCB.
6911 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
6913 2002-12-12 Ulrich Drepper <drepper@redhat.com>
6915 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
6917 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
6919 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
6920 access to __libc_locking_needed for PIC.
6922 2002-12-12 Jakub Jelinek <jakub@redhat.com>
6924 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
6925 declare for libc.so.
6926 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
6928 (__libc_lock_lock): Put into statement expression.
6929 (__libc_lock_unlock): Remove trailing semicolon.
6930 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
6932 2002-12-12 Roland McGrath <roland@redhat.com>
6934 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
6935 "m" constraint to refer to __libc_locking_needed. Declare it here.
6937 2002-12-12 Ulrich Drepper <drepper@redhat.com>
6939 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
6940 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
6941 Initialize __libc_locking_needed.
6942 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
6943 instead of __register_pthread_fork_handler.
6944 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
6945 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
6946 fork-gen with libc_pthread_init.
6947 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
6948 of __register_pthread_fork_handler.
6949 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
6950 of __register_pthread_fork_handler.
6951 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
6952 __libc_locking_needed to determine whether lock prefix can be avoided.
6953 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
6955 2002-12-11 Ulrich Drepper <drepper@redhat.com>
6957 * Makefile (tests): Add tst-cleanup1.
6958 * tst-cleanup1.c: New file.
6959 * cancellation.c (__cleanup_thread): Removed.
6960 (__do_cancel): Remove call to __cleanup_thread.
6961 * pthreadP.h: Remove __cleanup_thread prorotype.
6963 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
6964 Remember function and argument even if cancellation handler
6965 function is not available.
6966 (__libc_cleanup_region_end): Execute registered function directly if
6967 pthread functions are not available.
6968 (__libc_cleanup_end): Likewise.
6970 * init.c (__pthread_initialize_minimal): Fix initialization in
6971 static lib by preventing gcc from being too clever.
6973 2002-12-10 Ulrich Drepper <drepper@redhat.com>
6975 * init.c (__pthread_initialize_minimal): Remove unneccesary
6978 * Makefile (tests): We can run tst-locale2 now.
6980 2002-12-09 Ulrich Drepper <drepper@redhat.com>
6982 * Versions: Remove duplicated sigwait entry.
6984 2002-12-08 Ulrich Drepper <drepper@redhat.com>
6986 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
6989 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
6991 * pthreadP.h: Declare __pthread_enable_asynccancel and
6992 __pthread_disable_asynccancel.
6993 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
6994 (CANCEL_RESET): Use __pthread_disable_asynccancel.
6995 * cancellation.c (__pthread_enable_asynccancel): New function.
6996 (__pthread_disable_asynccancel): New function.
6997 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
6998 * pt-close.c: Likewise.
6999 * pt-connect.c: Likewise.
7000 * pt-creat.c: Likewise.
7001 * pt-fcntl.c: Likewise.
7002 * pt-fsync.c: Likewise.
7003 * pt-lseek.c: Likewise.
7004 * pt-lseek64.c: Likewise.
7005 * pt-msgrcv.c: Likewise.
7006 * pt-msgsnd.c: Likewise.
7007 * pt-msync.c: Likewise.
7008 * pt-nanosleep.c: Likewise.
7009 * pt-open.c: Likewise.
7010 * pt-open64.c: Likewise.
7011 * pt-pause.c: Likewise.
7012 * pt-poll.c: Likewise.
7013 * pt-pread.c: Likewise.
7014 * pt-pread64.c: Likewise.
7015 * pt-pselect.c: Likewise.
7016 * pt-pwrite.c: Likewise.
7017 * pt-pwrite64.c: Likewise.
7018 * pt-read.c: Likewise.
7019 * pt-readv.c: Likewise.
7020 * pt-recv.c: Likewise.
7021 * pt-recvfrom.c: Likewise.
7022 * pt-recvmsg.c: Likewise.
7023 * pt-select.c: Likewise.
7024 * pt-send.c: Likewise.
7025 * pt-sendmsg.c: Likewise.
7026 * pt-sendto.c: Likewise.
7027 * pt-sigpause.c: Likewise.
7028 * pt-sigsuspend.c: Likewise.
7029 * pt-sigtimedwait.c: Likewise.
7030 * pt-sigwait.c: Likewise.
7031 * pt-sigwaitinfo.c: Likewise.
7032 * pt-system.c: Likewise.
7033 * pt-tcdrain.c: Likewise.
7034 * pt-wait.c: Likewise.
7035 * pt-waitid.c: Likewise.
7036 * pt-waitpid.c: Likewise.
7037 * pt-write.c: Likewise.
7038 * pt-writev.c: Likewise.
7039 * pthread_join.c: Likewise.
7040 * pthread_timedjoin.c: Likewise.
7042 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
7043 (__xpg_sigpause): New function.
7044 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
7046 2002-12-07 Ulrich Drepper <drepper@redhat.com>
7048 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
7050 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
7051 _GI_pthread_cleanup_pop to pthreadP.h.
7053 * ftrylockfile.c: Use _IO_lock_trylock instead of
7054 pthread_mutex_trylock.
7056 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
7057 (CANCEL_RESET): Likewise.
7058 (__pthread_setcanceltype_): Declare.
7059 (__pthread_mutex_lock_internal): Declare.
7060 (__pthread_mutex_unlock_internal): Declare.
7061 (__pthread_once_internal): Declare.
7062 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
7063 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
7065 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
7066 and pthread_mutex_unlock.
7067 * pthread_cond_wait.c: Likewise.
7068 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
7069 * pthread_mutex_unlock.c: Likewise.
7071 * pthread_setcanceltype.c: Add additional alias
7072 __pthread_setcanceltype.
7074 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
7075 * sem_open.c (sem_open): Likewise.
7076 Use __libc_open, __libc_write, and __libc_close instead of
7077 open, write, and close respectively.
7079 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
7080 Rewrite as statement expression since it must return a value.
7082 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
7083 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
7086 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
7087 alias __pthread_once_internal.
7089 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
7091 2002-12-06 Ulrich Drepper <drepper@redhat.com>
7093 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
7094 * tst-stdio1.c: New file.
7095 * tst-stdio2.c: New file.
7097 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
7099 * Makefile (tests): Comment out tst-locale2 for now.
7100 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
7102 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
7104 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
7105 Use _IO_lock_init instead of explicit assignment.
7107 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
7108 Define __libc_lock_* and __libc_lock_recursive macros with
7109 lowlevellock macros, not pthread mutexes.
7111 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
7112 of pthread_mutex_lock.
7113 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
7114 instead of pthread_mutex_unlock.
7116 2002-12-06 Roland McGrath <roland@redhat.com>
7118 * allocatestack.c (__stack_user): Use uninitialized defn.
7119 * init.c (__pthread_initialize_minimal): Initialize it here.
7121 2002-12-05 Roland McGrath <roland@redhat.com>
7123 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
7125 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
7127 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
7130 2002-12-05 Ulrich Drepper <drepper@redhat.com>
7132 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
7134 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
7135 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
7136 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
7137 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
7138 for __libc_lock_* macros.
7139 * Makefile (routines): Add libc-lowlevellock.
7141 2002-10-09 Roland McGrath <roland@redhat.com>
7143 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
7144 Under [__PIC__], call the function via the pointer fetched for
7145 comparison rather than a call by name that uses the PLT.
7146 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
7147 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
7148 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
7149 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
7150 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
7152 2002-12-04 Roland McGrath <roland@redhat.com>
7154 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
7156 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
7157 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
7159 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
7161 2002-12-04 Ulrich Drepper <drepper@redhat.com>
7163 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
7164 a completely opaque, non-integer type.
7165 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7167 2002-12-05 Jakub Jelinek <jakub@redhat.com>
7169 * sysdeps/i386/tls.h: Include stdlib.h.
7170 * sysdeps/x86_64/tls.h: Likewise.
7172 2002-12-04 Ulrich Drepper <drepper@redhat.com>
7174 * Makefile (tests): Add tst-locale2.
7175 (tests-static): Likewise.
7176 * tst-locale2.c: New file.
7178 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
7179 volatile and add memory clobbers to lock operations.
7181 2002-12-03 Ulrich Drepper <drepper@redhat.com>
7183 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
7184 * sysdeps/i386/i486/bits/atomic.h: New file.
7185 * sysdeps/i386/i586/bits/atomic.h: New file.
7186 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
7187 include i486 version.
7188 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
7189 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
7190 Patch by Marijn Ros <marijn@mad.scientist.com>.
7192 * allocatestack.c (get_cached_stack): Don't crash if we first
7193 found a stack with a larger size then needed.
7194 Reported by Hui Huang <hui.huang@sun.com>.
7196 * Makefile (tests): Add tst-sysconf.
7197 * tst-sysconf.c: New file.
7199 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
7200 PTHREAD_THREADS_MAX.
7202 2002-12-02 Roland McGrath <roland@redhat.com>
7204 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
7205 Declare using hidden_proto instead of attribute_hidden, so there are
7206 non-.hidden static symbols for gdb to find.
7207 (__pthread_keys): Likewise.
7208 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
7209 * allocatestack.c (__stack_user): Likewise.
7210 * pthread_create.c (__pthread_keys): Likewise.
7211 (__nptl_threads_events, __nptl_last_event): Make these static instead
7213 * pthread_key_create.c (__pthread_pthread_keys_max,
7214 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
7216 2002-12-02 Ulrich Drepper <drepper@redhat.com>
7218 * Makefile (tests): Add tst-locale1. If buid-static is yes link
7220 * tst-locale1.c: New file.
7222 * pthread_cond_timedwait.c: Include <stdlib.h>.
7224 * Makefile (tests): Add tst-fork2 and tst-fork3.
7225 * tst-fork2.c: New file.
7226 * tst-fork3.c: New file.
7228 2002-11-28 Ulrich Drepper <drepper@redhat.com>
7230 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
7232 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
7233 require it to 200112L.
7235 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
7236 instruction only if HAVE_CMOV is defined.
7237 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
7239 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
7241 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
7243 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
7245 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
7247 2002-11-27 Ulrich Drepper <drepper@redhat.com>
7249 * sysdeps/x86_64/bits/atomic.h: New file.
7251 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
7254 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
7255 possible since gettid cannot fail.
7257 * sysdeps/x86_64/pthreaddef.h: New file.
7259 * sysdeps/i386/pthreaddef.h (gettid): Removed.
7261 * sysdeps/x86_64/pthread_spin_init.c: New file.
7262 * sysdeps/x86_64/pthread_spin_lock.c: New file.
7263 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
7264 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
7266 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
7267 Add missing lock prefix. Minute optimization.
7269 * tst-spin2.c (main): Also check successful trylock call.
7271 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
7272 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
7274 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
7275 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
7277 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
7278 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
7279 value in case of an error. Add support for INTERNAL_SYSCALL.
7281 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
7282 value in case of an error.
7284 * sysdeps/x86_64/tls.h: New file.
7286 2002-11-26 Ulrich Drepper <drepper@redhat.com>
7288 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
7289 takes the array member name and the index as parameters.
7290 (THREAD_SETMEM_NC): Likewise.
7291 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
7292 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
7295 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
7296 to decide which code to use.
7297 (THREAD_SETMEM_NC): Likewise.
7299 * allocatestack.c (queue_stack): Don't remove stack from list here.
7300 Do it in the caller. Correct condition to prematurely terminate
7301 loop to free stacks.
7302 (__deallocate_stack): Remove stack from list here.
7304 2002-11-26 Ulrich Drepper <drepper@redhat.com>
7306 * Makefile (tests): Add tst-stack1.
7307 * tst-stack1.c: New file.
7309 * allocatestack.c (allocate_stack): Initialize the TCB on a user
7312 * pthread_attr_getstack.c: Return bottom of the thread area.
7314 2002-11-25 Ulrich Drepper <drepper@redhat.com>
7316 * Makefile (libpthread-routines): Add pt-allocrtsig and
7317 pthread_kill_other_threads.
7318 * pt-allocrtsig.c: New file.
7319 * pthread_kill_other_threads.c: New file.
7320 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
7321 all three functions.
7322 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
7324 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
7325 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
7326 and __libc_allocate_rtsig_private.
7327 * Versions (libpthread): Export pthread_kill_other_threads_np,
7328 __libc_current_sigrtmin, and __libc_current_sigrtmax.
7330 2002-11-24 Ulrich Drepper <drepper@redhat.com>
7332 * allocatestack.c (allocate_stack): stackaddr in attribute points to
7333 the end of the stack. Adjust computations.
7334 When mprotect call fails dequeue stack and free it.
7335 * pthread_attr_setstack.c: Store top of the stack in stackaddr
7337 * pthread_getattr_np.c: Likewise.
7339 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
7342 2002-11-23 Ulrich Drepper <drepper@redhat.com>
7344 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
7345 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
7347 2002-11-22 Ulrich Drepper <drepper@redhat.com>
7349 * pthread_getspecific.c: Optimize access to first 2nd-level array.
7350 * pthread_setspecific.c: Likewise.
7352 2002-11-21 Ulrich Drepper <drepper@redhat.com>
7354 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
7355 definitions. Get them from the official place.
7356 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
7358 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
7359 Use new CLONE_ flags in clone() calls.
7361 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
7362 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
7364 * Versions: Add pthread_* functions for libc.
7365 * forward.c: New file.
7367 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
7369 * herrno.c: New file.
7372 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
7373 sem_trywait, and sem_timedwait. Add herrno and res.
7374 * sem_init.c: Don't initialize lock and waiters members.
7375 * sem_open.c: Likewise.
7376 * sem_post.c: Removed.
7377 * sem_wait.c: Removed.
7378 * sem_trywait.c: Removed.
7379 * sem_timedwait.c: Removed.
7380 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
7381 Includes full implementations of sem_post, sem_wait, sem_trywait,
7383 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
7384 for new implementation.
7385 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
7388 * tst-sem3.c: Improve error message.
7389 * tst-signal3.c: Likewise.
7391 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
7392 to tell the kernel about the termination futex and to initialize tid
7393 member. Don't initialize main_thread.
7394 * descr.h (struct pthread): Remove main_thread member.
7395 * cancelllation.c (__do_cancel): Remove code handling main thread.
7396 The main thread is not special anymore.
7398 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
7399 size of the stacks to stack_cache_actsize.
7401 * pt-readv.c: Add missing "defined".
7402 * pt-sigwait.c: Likewise.
7403 * pt-writev.c: Likewise.
7405 2002-11-09 Ulrich Drepper <drepper@redhat.com>
7407 * Versions: Export __connect from libpthread.
7408 Patch by Luca Barbieri <ldb@ldb.ods.org>.
7410 * Makefile (libpthread-routines): Add pt-raise.
7411 * sysdeps/unix/sysv/linux/raise.c: New file.
7412 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
7413 * sysdeps/generic/pt-raise.c: New file.
7415 * pthread_cond_init.c: Initialize all data elements of the condvar
7416 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
7418 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
7419 * pthread_create.c: Likewise.
7421 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
7422 * tst-key1.c: New file.
7423 * tst-key2.c: New file.
7424 * tst-key3.c: New file.
7426 * Versions: Export pthread_detach for version GLIBC_2.0.
7427 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
7429 2002-11-08 Ulrich Drepper <drepper@redhat.com>
7431 * pthread_key_create.c: Terminate search after an unused key was found.
7432 Patch by Luca Barbieri <ldb@ldb.ods.org>.
7434 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
7435 Patch by Luca Barbieri <ldb@ldb.ods.org>.
7437 2002-10-10 Ulrich Drepper <drepper@redhat.com>
7439 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
7440 dynamic lookup for errno in PIC.
7442 * allocatestack.c (get_cached_stack): Rearrange code slightly to
7443 release the stack lock as soon as possible.
7444 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
7445 the static TLS block.
7446 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
7448 * cancellation.c: Renamed from cancelation.c.
7449 * Makefile: Adjust accordingly.
7450 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
7451 * cleanup_defer.c: Use CANCELLATION_P.
7452 * pthread_testcancel.c: Likewise.
7453 * descr.h: Fix spelling in comments.
7455 * pthread_getattr_np.c: Likewise.
7456 * pthread_getschedparam.c: Likewise.
7457 * pthread_setschedparam.c: Likewise.
7458 * Versions: Likewise.
7460 * pt-pselect.c: New file.
7461 * Makefile (libpthread-routines): Add pt-pselect.
7462 * Versions: Add pselect.
7464 * tst-cancel4.c: New file.
7465 * Makefile (tests): Add tst-cancel4.
7467 2002-10-09 Ulrich Drepper <drepper@redhat.com>
7469 * pthread_mutex_lock.c: Always record lock ownership.
7470 * pthread_mutex_timedlock.c: Likewise.
7471 * pthread_mutex_trylock.c: Likewise.
7473 * pt-readv.c: New file.
7474 * pt-writev.c: New file.
7475 * pt-creat.c: New file.
7476 * pt-msgrcv.c: New file.
7477 * pt-msgsnd.c: New file.
7478 * pt-poll.c: New file.
7479 * pt-select.c: New file.
7480 * pt-sigpause.c: New file.
7481 * pt-sigsuspend.c: New file.
7482 * pt-sigwait.c: New file.
7483 * pt-sigwaitinfo.c: New file.
7484 * pt-waitid.c: New file.
7485 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
7486 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
7487 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
7488 * Versions: Add all the new functions.
7490 * tst-exit1.c: New file.
7491 * Makefile (tests): Add tst-exit1.
7493 * sem_timedwait.c: Minor optimization for more optimal fastpath.
7495 2002-10-08 Ulrich Drepper <drepper@redhat.com>
7497 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
7499 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
7500 call. pthread_join is an official cancellation point.
7501 * pthread_timedjoin.c: Likewise.
7503 * pthread_cond_wait.c: Revert order in which internal lock are dropped
7504 and the condvar's mutex are retrieved.
7505 * pthread_cond_timedwait.c: Likewise.
7506 Reported by dice@saros.East.Sun.COM.
7508 2002-10-07 Ulrich Drepper <drepper@redhat.com>
7510 * pthreadP.h: Cut out all type definitions and move them...
7511 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
7512 * pthreadP.h: Include <internaltypes.h>.
7514 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
7517 * sem_trywait.c: Shuffle #includes around to get right order.
7518 * sem_timedwait.c: Likewise.
7519 * sem_post.c: Likewise.
7520 * sem_wait.c: Likewise.
7522 * nptl 0.3 released.
7524 * Makefile (tests): Add tst-signal3.
7525 * tst-signal3.c: New file.
7527 2002-10-05 Ulrich Drepper <drepper@redhat.com>
7529 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
7530 the asms modify the sem object.
7531 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
7533 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
7535 * pthreadP.h (struct sem): New type. Actual semaphore type.
7536 * semaphoreP.h: Include pthreadP.h.
7537 * sem_getvalue.c: Adjust to sem_t change.
7538 * sem_init.c: Likewise.
7539 * sem_open.c: Likewise.
7540 * sem_post.c: Likewise.
7541 * sem_timedwait.c: Likewise.
7542 * sem_trywait.c: Likewise.
7543 * sem_wait.c: Likewise.
7545 2002-10-04 Ulrich Drepper <drepper@redhat.com>
7547 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
7548 * tst-basic2.c: New file.
7549 * tst-exec1.c: New file.
7550 * tst-exec2.c: New file.
7551 * tst-exec3.c: New file.
7553 * tst-fork1.c: Remove extra */.
7555 * nptl 0.2 released. The API for IA-32 is complete.