1 2003-05-26 Ulrich Drepper <drepper@redhat.com>
3 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
5 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6 correctly. Actually use requeue. Little optimization.
7 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8 mutex address early. Handle cancellation state as 32-bit value.
9 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10 Remove unnecessary label.
12 2003-05-25 Ulrich Drepper <drepper@redhat.com>
14 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
15 instead of FUTEX_WAIT.
16 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
17 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
18 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
19 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
20 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
21 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
22 used in condvar structure. Call __pthread_mutex_cond_lock instead
23 of __pthread_mutex_lock_internal.
24 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
25 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
26 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
27 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
28 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
29 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
30 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
31 Add pthread_mutex_cond_lock.
32 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
33 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
34 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
36 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
37 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
38 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
40 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
41 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
43 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
44 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
46 * pthreadP.h: Declare __pthread_mutex_cond_lock.
47 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
48 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
49 macro don't define aliases.
51 * cancellation.c: Remove __pthread_enable_asynccancel_2.
52 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
53 * sysdeps/pthread/pthread_cond_timedwait.c: Use
54 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
55 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
56 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
57 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
58 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
59 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
61 2003-05-17 Ulrich Drepper <drepper@redhat.com>
63 * sem_open.c: Fix one endless loop. Implement correct semantics
64 wrt opening the same semaphore more then once.
65 * sem_close.c: Adjust for sem_open change.
66 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
67 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
68 * Makefile (tests): Add tst-sem7.
69 * tst-sem7.c: New file.
71 2003-05-16 Roland McGrath <roland@redhat.com>
73 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
74 uninitialized variable braino.
76 2003-05-16 Ulrich Drepper <drepper@redhat.com>
78 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
79 test for syscall availability.
81 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
82 __no_posix_timers to -1 if the syscalls don't exist.
84 * pthread_join.c (pthread_join): Set tid field of the joined
85 thread to -1. This isn't necessary but helps to recognize some
86 error conditions with almost no cost.
88 * allocatestack.c (FREE_P): Also negative values indicate an
91 * unwind.c: Include <unistd.h>.
93 2003-05-14 Ulrich Drepper <drepper@redhat.com>
95 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
97 2003-05-14 Jakub Jelinek <jakub@redhat.com>
99 * Makefile (crti-objs, crtn-objs): New variables.
100 (omit-deps, extra-objs): Add crtn.
101 ($(objpfx)libpthread.so): Depend on both crti and crtn
102 and links to them in multidir.
103 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
105 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
107 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
108 (lll_mutex_unlock): Use atomic_exchange_rel.
110 2003-05-11 Ulrich Drepper <drepper@redhat.com>
112 * cond-perf.c (cons): Add missing locking around setting of alldone.
114 2003-05-10 Ulrich Drepper <drepper@redhat.com>
116 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
118 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
120 2003-05-09 Ulrich Drepper <drepper@redhat.com>
122 * tst-sem6.c: New file.
123 * Makefile (tests): Add tst-sem6.
125 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
126 Use atomic_exchange_rel instead of atomic_exchange.
127 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
130 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
131 code for lll_futex_wait and lll_futex_wake in static apps. Use
132 vsyscall is possible.
134 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
135 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
136 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
137 pthread_setaffinity_np.
138 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
139 and pthread_setaffinity_np.
140 * Makefile (libpthread-routines): Add pthread_getaffinity and
143 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
144 use it in case mmap to allocate the stack fails.
145 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
147 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
150 2003-05-08 Ulrich Drepper <drepper@redhat.com>
152 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
153 handler implementation. It is now lockless in fork().
154 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
155 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
156 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
157 declare the __fork_*_lists.
158 (struct fork_handler): Include pointers to all three functions.
159 Add next, refcntr and need_signal elements.
160 (__fork_handlers): New declaration.
161 (__register_atfork_malloc): Remove declaration.
162 (HAVE_register_atfork_malloc): Remove definition.
163 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
164 __pthread_child_handler variable.
165 (__libc_pthread_init): Use __register_atfork instead of explicitly
167 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
169 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
171 * unwind.c (unwind_cleanup): Print error message and then abort. This
172 function must never be reached.
174 * cond-perf.c: New file.
176 2003-05-05 Ulrich Drepper <drepper@redhat.com>
178 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
180 2003-05-04 Roland McGrath <roland@redhat.com>
182 * Makefile ($(objpfx)../libc.so): New target.
184 2003-05-02 Ulrich Drepper <drepper@redhat.com>
186 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
187 (pthread_condattr_t): Size is only an int, don't use long for
189 (pthread_mutexattr_t): Likewise.
190 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
191 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
192 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
194 2003-05-01 Ulrich Drepper <drepper@redhat.com>
196 * sysdeps/i386/tls.h: Define THREAD_ID.
197 * sysdeps/ia64/tls.h: Likewise.
198 * sysdeps/powerpc/tls.h: Likewise.
199 * sysdeps/s390/tls.h: Likewise.
200 * sysdeps/sh/tls.h: Likewise.
201 * sysdeps/x86_64/tls.h: Likewise.
202 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
204 * pthread_mutex_timedlock.c: Likewise.
205 * pthread_mutex_trylock.c: Likewise.
206 * pthread_mutex_unlock.c: Likewise.
207 * pthread_rwlock_trywrlock.c: Likewise.
208 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
209 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
210 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
211 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
213 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
216 2003-04-29 Jakub Jelinek <jakub@redhat.com>
218 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
219 (__SIZEOF_PTHREAD_COND_T): Define to 48.
220 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
221 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
222 Make __align long long instead of long.
223 (pthread_rwlock_t): Formatting.
224 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
225 (pthread_rwlock_t): Formatting.
226 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
227 (pthread_cond_t): Make __align long long instead of long.
228 (pthread_rwlock_t): Move __flags field to the same position as in
231 2003-04-30 Ulrich Drepper <drepper@redhat.com>
233 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
234 * tst-rwlock7.c (do_test): Likewise.
236 2003-04-26 Roland McGrath <roland@redhat.com>
238 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
240 2003-04-22 Jakub Jelinek <jakub@redhat.com>
242 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
243 sizeof (struct pthread).
244 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
246 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
248 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
250 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
252 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
254 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
256 (NO_TLS_OFFSET): Define.
257 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
258 add TLS_TCB_SIZE unnecessarily.
260 2003-04-22 Roland McGrath <roland@redhat.com>
262 * Makeconfig (shared-thread-library): Reverse link order to work
265 2003-04-22 Ulrich Drepper <drepper@redhat.com>
267 * semaphore.h: Fix typo in comment.
269 2003-04-21 Ulrich Drepper <drepper@redhat.com>
271 * sysdeps/pthread/sigfillset.c: New file.
273 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
274 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
275 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
276 * sysdeps/pthread/sigaction.c: Likewise.
277 * sysdeps/pthread/sigprocmask.c: New file.
278 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
280 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
281 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
284 2003-04-19 Ulrich Drepper <drepper@redhat.com>
286 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
287 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
289 * sysdeps/unix/sysv/linux/unregister-atfork.c
290 (__unregister_atfork): Don't free memory not allocated dynamically.
292 * semaphore.h: Remove __THROW marker from cancellation points.
293 * nptl/sysdeps/pthread/pthread.h: Likewise.
295 2003-04-18 Ulrich Drepper <drepper@redhat.com>
297 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
298 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
301 2003-04-16 Jakub Jelinek <jakub@redhat.com>
303 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
305 2003-04-15 Roland McGrath <roland@redhat.com>
307 * forward.c (__pthread_unwind): Tweak to avoid warning.
309 2003-04-15 Ulrich Drepper <drepper@redhat.com>
311 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
313 2003-04-14 Ulrich Drepper <drepper@redhat.com>
315 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
316 overflow CFA advance instructions.
317 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
319 2003-04-14 Jakub Jelinek <jakub@redhat.com>
321 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
322 * sysdeps/i386/pthread_spin_lock.c: Likewise.
323 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
326 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
327 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
328 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
329 DW_CFA_advance_loc for .Laddl-.Lsubl.
331 2003-04-13 Ulrich Drepper <drepper@redhat.com>
333 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
334 position-independent unwind data for static libraries.
335 Add missing unwind info. Add comments.
337 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
338 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
339 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
340 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
342 2003-04-12 Ulrich Drepper <drepper@redhat.com>
344 * Makefile: Make sure all cancellation points are compiled with
345 exception and asynchronous unwind tables.
347 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
348 which mishandles loading of global object addresses in PIC.
349 (THREAD_SETMEM_NC): Likewise.
351 2003-04-11 Ulrich Drepper <drepper@redhat.com>
353 * pthread.h: Define new data structure for cleanup buffer. Declare
354 new cleanup handler interfaces.
355 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
356 (struct pthread): Add cleanup_jmp_buf pointer. Define
357 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
358 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
359 it. Declare old cleanup handler installation functions.
360 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
362 * cleanup_defer.c: Likewise.
363 * cleanup_compat.c: New file. Old cleanup code.
364 * cleanup_def_compat.c: New file. Old cleanup code.
365 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
366 if own thread descriptor.
367 * unwind.c: New file.
368 * forward.c: Add __pthread_unwind.
369 * init.c (pthread_functions): Add __pthread_unwind.
370 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
371 Add ptr___pthread_unwind.
372 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
374 * Makefile (libpthread-routines): Add cleanup_compat,
375 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
376 table generation if necessary.
377 * version.c: Record whether unwind support is compiled in.
378 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
379 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
381 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
382 complication to generate unwind information for syscall wrappers.
383 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
384 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
385 __cleanup_fct_attribute.
387 * Makefile: Add rules to build and run tst-cleanup0.
388 * tst-cleanup0.c: New file.
389 * tst-cleanup0.expect: New file.
391 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
392 caller. Optimize to avoid often unecessary local variable.
394 2003-04-11 Roland McGrath <roland@redhat.com>
396 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
397 sets variable `multidir'; include that.
399 ($(objpfx)$(multidir)/crti.o): New target.
400 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
402 2003-04-11 Ulrich Drepper <drepper@redhat.com>
404 * tst-attr2.c (do_test): Add cast to avoid warning.
405 * tst-mutex4.c (do_test): Likewise.
407 2003-04-10 Ulrich Drepper <drepper@redhat.com>
409 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
412 2003-04-09 Ulrich Drepper <drepper@redhat.com>
414 * Makefile (tests): Add tst-detach1.
415 * tst-detach1.c: New file.
417 2003-04-08 Ulrich Drepper <drepper@redhat.com>
419 * sysdeps/pthread/pthread.h: Remove duplicate
420 pthread_cleanup_{push,pop} definitions.
422 * tst-barrier2.c: Eliminate warnings.
423 * tst-cancel4.c: Likewise.
424 * tst-cond4.c: Likewise.
425 * tst-cond6.c: Likewise.
426 * tst-detach1.c: Likewise.
427 * tst-rwlock4.c: Likewise.
428 * tst-rwlock6.c: Likewise.
429 * tst-rwlock7.c: Likewise.
430 * tst-sem3.c: Likewise.
431 * tst-spin2.c: Likewise.
432 * tst-umask1.c: Likewise.
434 2003-04-07 Ulrich Drepper <drepper@redhat.com>
436 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
438 2003-04-06 Ulrich Drepper <drepper@redhat.com>
440 * descr.h (struct pthread): Move cancelhandling member to the front.
442 2003-04-05 Ulrich Drepper <drepper@redhat.com>
444 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
445 malloc_parent, and malloc_child statically.
446 (__register_atfork_malloc): New function.
447 (free_mem): Don't free any of the malloc_* variables on the list.
448 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
449 Define HAVE_register_atfork_malloc.
451 2003-04-04 Ulrich Drepper <drepper@redhat.com>
453 * sysdeps/pthread/createthread.c (create_thread): Add some more
454 comments explaining when to set multiple_threads and when not.
456 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
457 THREAD_ATOMIC_BIT_SET if not already defined.
458 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
459 THREAD_ATOMIC_BIT_SET:
460 * sysdeps/x86_64/tls.h: Likewise.
461 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
462 THREAD_ATOMIC_CMPXCHG_VAL.
463 (_pthread_cleanup_pop_restore): Likewise.
464 * cancellation.c (__pthread_enable_asynccancel): Likewise.
465 (__pthread_enable_asynccancel_2): Likewise.
466 (__pthread_disable_asynccancel): Likewise.
467 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
468 (__libc_disable_asynccancel): Likewise.
469 * init.c (sigcancel_handler): Likewise.
470 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
471 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
473 2003-04-03 Ulrich Drepper <drepper@redhat.com>
475 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
476 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
477 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
478 * Makefile (tests): Add tst-cancel11.
479 * tst-cancel11.c: New file.
481 2003-04-01 Ulrich Drepper <drepper@redhat.com>
483 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
484 round, not the first. Use specific_used flag instead of local
485 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
486 (__free_tcb): Don't call deallocate_tsd here.
487 (start_thread): Call deallocate_tsd here.
488 * pthread_setspecific.c: Set specific_used flag really only when
490 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
491 * tst-tsd3.c: New file.
492 * tst-tsd4.c: New file.
494 2003-03-31 Ulrich Drepper <drepper@redhat.com>
496 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
497 Use atomic_exchange_and_add instead of __lll_add.
498 (__lll_mutex_timedlock): Likewise.
499 Patch by Ian Wienand.
501 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
503 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
504 (SINGLE_THREAD_P): Fix typo.
505 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
507 2003-03-31 Ulrich Drepper <drepper@redhat.com>
509 * Makefile (tests): Add tst-align.
510 * tst-align.c: New file.
511 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
513 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
516 * tst-tsd2.c: Add casts to avoid warnings.
518 2003-03-30 Ulrich Drepper <drepper@redhat.com>
520 * descr.h (struct pthread): Move most often used elements to the front.
522 2003-03-29 Ulrich Drepper <drepper@redhat.com>
524 * Makefile (libpthread-routines): Add pthread_atfork.
525 (libpthread-static-only-routines): Add pthread_atfork.
527 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
529 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
531 (INSTALL_DTV): Add parens.
532 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
533 Use passed descr instead of THREAD_SELF.
534 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
535 (__lll_mutex_timedlock_wait): Correct expected value after
537 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
538 Release lock before waking up the waiters.
539 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
540 criteria. Reorderstruct passed to cleanup handler. Fix
541 handling of cancellation and failung pthread_mutex_unlock call.
542 Use __pthread_enable_asynccancel_2 instead of
543 __pthread_enable_asynccancel.
544 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
545 Return result of lock re-get if it fails.
546 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
547 for __pthread_cleanup_push.
548 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
549 completely broken rwlock implementation.
550 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
551 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
552 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
553 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
554 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
555 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
556 versioned_symbol macro.
557 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
558 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
560 2003-03-27 Ulrich Drepper <drepper@redhat.com>
562 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
563 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
565 (struct timer): Remove th and bar field.
566 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
567 debugging code. Create only one helper thread.
568 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
570 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
571 Renamed. Define statically. Use thread info from siginfo.
572 (__helper_once): New variable.
573 (__helper_tid): New variable.
574 (__reset_helper_control): New function.
575 (__start_helper_thread): New function.
577 * pthread_create.c (start_thread): Don't use setjmp inside
578 __builtin_expect to work around gcc bug.
580 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
581 timer_delete syscall fails, but not with ENOSYS, set
584 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
585 (timer_settime): Fix typo.
586 * sysdeps/unix/sysv/linux/timer_getoverr.c
587 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
589 2003-03-27 Jakub Jelinek <jakub@redhat.com>
591 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
592 offset of cleanupbuf.__prev.
594 2003-03-26 Jakub Jelinek <jakub@redhat.com>
596 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
599 2003-03-26 Ulrich Drepper <drepper@redhat.com>
601 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
602 NULL provide default definition to syscall.
604 2003-03-25 Roland McGrath <roland@redhat.com>
606 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
607 (timer_id2ptr): Fix typo.
609 2003-03-25 Ulrich Drepper <drepper@redhat.com>
611 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
612 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
613 * sysdeps/ia64/pthreaddef.h: Likewise.
614 * sysdeps/powerpc/pthreaddef.h: Likewise.
615 * sysdeps/s390/pthreaddef.h: Likewise.
616 * sysdeps/sh/pthreaddef.h: Likewise.
617 * sysdeps/x86_64/pthreaddef.h: Likewise.
618 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
619 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
621 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
622 SIGTIMER is not unblocked.
623 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
625 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
627 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
628 pass pointer through as ID.
629 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
630 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
631 * sysdeps/unix/sysv/linux/timer_create.c: New file.
632 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
633 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
634 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
635 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
636 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
637 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
638 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
639 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
640 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
641 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
642 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
643 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
644 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
645 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
646 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
647 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
648 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
649 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
650 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
651 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
652 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
653 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
654 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
655 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
656 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
657 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
658 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
659 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
660 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
661 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
663 * pthreadP.h: Remove FRAME_LEFT definition.
664 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
665 already left frame. Programs which have this problem are not POSIX
667 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
669 2003-03-24 Ulrich Drepper <drepper@redhat.com>
671 * sysdeps/pthread/tst-timer.c: Check return values of the
674 2003-03-23 Roland McGrath <roland@redhat.com>
676 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
677 * tst-tls3mod.c: Likewise.
678 * tst-tls1.c: Likewise.
679 * tst-tls2.c: Likewise.
681 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
684 * tst-join5.c (tf1, tf2): Add a cast.
686 * Makeconfig (includes): Append -I$(..)nptl to this variable.
688 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
690 * tst-cond4.c: Likewise.
691 * tst-cond6.c: Likewise.
692 * tst-flock2.c: Likewise.
693 * tst-mutex4.c: Likewise.
694 * tst-rwlock4.c: Likewise.
695 * tst-signal1.c: Likewise.
696 * tst-spin2.c: Likewise.
697 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
699 * tst-mutex4.c: Use test-skeleton.c.
700 * tst-spin2.c: Likewise.
701 * tst-sysconf.c: Likewise.
702 * tst-barrier2.c: Likewise.
703 * tst-cond4.c: Likewise.
704 * tst-cond6.c: Likewise.
705 * tst-rwlock4.c: Likewise.
706 * tst-unload.c: Likewise.
707 * tst-flock2.c (do_test): Use return instead of exit.
709 2003-03-22 Jakub Jelinek <jakub@redhat.com>
711 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
713 2003-03-21 Ulrich Drepper <drepper@redhat.com>
715 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
716 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
717 instead of __lll_compare_and_swap.
718 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
720 Removed definition if __lll_compare_and_swap.
722 * cancellation.c: Adjust for new form of compare&exchange macros.
723 * cleanup_defer.c: Likewise.
725 * libc-cancellation.c: Likewise.
726 * old_pthread_cond_broadcast.c: Likewise.
727 * old_pthread_cond_signal.c: Likewise.
728 * old_pthread_cond_timedwait.c: Likewise.
729 * old_pthread_cond_wait.c: Likewise.
730 * pthread_cancel.c: Likewise.
731 * pthread_create.c: Likewise.
732 * pthread_detach.c: Likewise.
733 * pthread_join.c: Likewise.
734 * pthread_key_delete.c: Likewise.
735 * pthread_setcancelstate.c: Likewise.
736 * pthread_setcanceltype.c: Likewise.
737 * pthread_timedjoin.c: Likewise.
738 * pthread_tryjoin.c: Likewise.
739 * sysdeps/pthread/createthread.c: Likewise.
741 2003-03-20 Ulrich Drepper <drepper@redhat.com>
743 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
744 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
745 definitions. Replace uses with calls to atomic_* functions.
746 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
747 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
748 __lll_test_and_set calls with atomic_exchange_and_add and
749 atomic_exchange calls respectively.
750 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
751 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
752 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
753 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
754 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
755 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
756 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
758 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
759 returns the old value.
761 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
763 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
764 int for variable OLDVAL and correct inline assembler contraint.
765 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
766 type int for variable OLD.
768 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
770 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
771 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
772 instead of multiple_threads field in the TCB.
774 2003-03-19 Ulrich Drepper <drepper@redhat.com>
776 * sysdeps/i386/i686/bits/atomic.h: Removed.
777 * sysdeps/i386/i586/bits/atomic.h: Removed.
778 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
779 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
780 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
781 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
782 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
783 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
784 * atomic.h: Removed. Moved to glibc.
786 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
787 support for clock selection.
789 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
792 2003-03-18 Roland McGrath <roland@redhat.com>
794 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
795 Add __lll_rel_instr first. Add memory clobber.
796 (lll_mutex_unlock): Use __lll_test_and_set.
797 From Paul Mackerras <paulus@samba.org>.
799 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
801 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
802 (SINGLE_THREAD_P): Add `header.' prefix.
803 From Paul Mackerras <paulus@samba.org>.
805 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
806 pthread_timedjoin_np to ...
807 (libpthread: GLIBC_2.3.3): ... here.
808 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
810 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
811 Avoid shadowing VAL variable.
813 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
816 2003-03-18 Ulrich Drepper <drepper@redhat.com>
818 * Makefile (tests): Add tst-cond11.
819 * tst-cond11.c: New file.
821 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
822 struct passed to cleanup handler to eliminate one more
824 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
826 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
827 (pthrad_cond_t): Replace __unused field with __clock.
829 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
830 waken all waiters in cleanup handler.
831 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
832 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
834 * pthread_condattr_getclock.c: New file.
835 * pthread_condattr_setclock.c: New file.
836 * sysdeps/pthread/pthread.h: Declare these new functions.
837 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
838 * Makefile (libpthread-routines): Add the new functions.
839 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
840 Renamed field to value. Document use of the bits.
841 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
843 * pthread_condattr_setpshared.c: Likewise.
844 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
845 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
846 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
848 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
849 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
850 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
851 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
852 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
853 Implement clock selection.
854 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
855 * pthread-errnos.sym: Add ENOSYS.
856 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
857 _POSIX_CLOCK_SELECTION.
858 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
860 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
861 invalid .size directive.
863 2003-03-17 Roland McGrath <roland@redhat.com>
865 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
868 2003-03-17 Ulrich Drepper <drepper@redhat.com>
870 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
871 Use __lll_add instead of spelling it out. Use protected symbol names.
872 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
874 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
875 Renamed from lll_compare_and_swap. Use new name where necessary.
876 (__lll_add): Defined.
877 (__lll_dec_if_positive): Defined.
878 (__lll_test_and_set): Defined.
879 * sysdeps/ia64/pthread_spin_init.c: Removed.
880 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
881 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
882 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
883 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
884 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
885 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
886 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
887 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
888 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
889 __sync_lock_release_si.
890 Patch by Jakub Jelinek.
892 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
893 Fix timeout handling.
894 (__lll_timedwait_tid): Likewise.
895 (lll_unlock_wake_cb): Wake up other waiters if necessary.
896 Patch by Jakub Jelinek.
898 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
900 2003-03-17 Roland McGrath <roland@redhat.com>
902 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
903 * sysdeps/pthread/pthread_spin_init.c: New file.
904 * sysdeps/pthread/pthread_spin_unlock.c: New file.
905 * sysdeps/powerpc/Makefile: New file.
906 * sysdeps/powerpc/pthread_spin_lock.c: New file.
907 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
908 * sysdeps/powerpc/pthreaddef.h: New file.
909 * sysdeps/powerpc/tcb-offsets.sym: New file.
910 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
911 * sysdeps/powerpc/tls.h: New file.
912 * sysdeps/powerpc/bits/atomic.h: New file.
913 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
914 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
915 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
917 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
918 * sysdeps/unix/sysv/linux/sem_post.c: New file.
919 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
920 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
921 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
922 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
923 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
924 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
925 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
926 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
927 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
928 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
929 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
930 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
931 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
933 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
935 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
936 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
937 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
938 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
939 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
941 2003-03-17 Ulrich Drepper <drepper@redhat.com>
943 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
944 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
945 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
946 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
947 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
949 2003-03-16 Roland McGrath <roland@redhat.com>
951 * tst-fork4.c: Include <string.h>.
952 * tst-signal2.c: Likewise.
953 * tst-mutex5.c (do_test): exit -> return.
954 * tst-mutex2.c: Include <stdlib.h>.
956 2003-03-16 Ulrich Drepper <drepper@redhat.com>
958 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
959 (__lll_mutex_timedlock_wait): Correct expected value after
960 spurious wakeup. Otherwise we would never wait again.
962 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
963 zone versus inline asm stupidity. Use correct instructions.
965 * tst-rwlock6.c: Add some more status output.
967 2003-03-15 Roland McGrath <roland@redhat.com>
969 * sysdeps/pthread/configure.in: New file.
970 * sysdeps/pthread/configure: New file (generated).
972 2003-03-15 Ulrich Drepper <drepper@redhat.com>
974 * allocatestack.c (allocate_stack): Store the exact stack size of
975 user allocated stacks.
977 2003-03-15 Jakub Jelinek <jakub@redhat.com>
979 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
980 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
981 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
982 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
983 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
984 Use `header.' prefix.
985 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
987 2003-03-15 Ulrich Drepper <drepper@redhat.com>
989 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
990 __builtin_frame_address, use stack pointer.
992 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
993 instead of __builtin_frame_pointer.
995 2003-03-14 Ulrich Drepper <drepper@redhat.com>
997 * tst-basic1.c (do_test): Add cast to avoid warning.
998 * tst-basic2.c (do_test): Likewise.
1000 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
1001 amount of stack correction.
1003 * tst-fork4.c: Use test-skeleton.c.
1005 2003-03-14 Roland McGrath <roland@redhat.com>
1007 * init.c: Fix typo "#eli" for "#else".
1009 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
1011 * allocatestack.c (__stack_user): Use hidden_data_def.
1012 * pthread_create.c (__pthread_keys): Likewise.
1014 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
1016 2003-03-14 Roland McGrath <roland@redhat.com>
1018 * tst-fork4.c: New file.
1019 * Makefile (tests): Add it.
1021 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
1022 we always define the padding space.
1023 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
1024 stopped supporting its own extensions fully.
1025 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
1026 struct also called `header', so `header.multiple_threads' is the field
1027 name to use on all machines.
1028 * allocatestack.c (allocate_stack): Use `header.' prefix.
1029 * sysdeps/pthread/createthread.c (create_thread): Likewise.
1030 * pthread_create.c (__pthread_create_2_1): Likewise.
1031 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
1032 (THREAD_SELF): Likewise.
1033 * sysdeps/x86_64/tls.h: Likewise.
1034 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1035 (SINGLE_THREAD_P): Likewise.
1036 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1037 (SINGLE_THREAD_P): Likewise.
1038 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1039 (SINGLE_THREAD_P): Likewise.
1041 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
1044 2003-03-14 Ulrich Drepper <drepper@redhat.com>
1046 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
1047 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
1049 * pthread_create.c (start_thread): setjmp is expected to return 0.
1051 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
1052 (THREAD_GETMEM_NC): Likewise.
1054 2003-03-13 Ulrich Drepper <drepper@redhat.com>
1056 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
1057 and the size of the stack which must be allocated is a multiple,
1058 allocate one more page.
1059 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
1060 MULTI_PAGE_ALIASING.
1062 2003-03-13 Roland McGrath <roland@redhat.com>
1064 * pthread_create.c (start_thread): Set EXITING_BIT after the
1065 event-reporting (and destructors), not before.
1067 2003-03-13 Jakub Jelinek <jakub@redhat.com>
1069 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
1070 lll_futex_wake): Declare register variables as long int instead of
1071 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
1072 Make syscall arguments clobbered by the syscall.
1073 (lll_futex_wait): Define using lll_futex_timed_wait.
1075 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
1078 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
1081 * allocatestack.c (nptl_ncreated): Only declare if
1082 COLORING_INCREMENT != 0.
1084 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
1085 (__libc_enable_asynccancel_2): Remove prototype.
1087 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
1088 ctid to match kernel.
1090 2003-03-12 Ulrich Drepper <drepper@redhat.com>
1092 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
1093 libc_multiple_threads.
1094 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
1095 __libc_multiple_threads to...
1096 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
1098 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
1100 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1101 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1103 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
1104 (__pthread_once_internal): Define.
1106 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
1107 macros instead of .symver directly.
1108 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1109 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1111 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
1112 * sysdeps/x86_64/tcb-offsets.sym: New file.
1113 * sysdeps/x86_64/Makefile: New file.
1115 * sysdeps/i386/tcb-offsets.sym: Add SELF.
1116 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
1117 to access own pthread_t in TCB.
1118 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1120 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1122 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1124 2003-03-12 Roland McGrath <roland@redhat.com>
1126 * pthread-errnos.sym: New file.
1127 * Makefile (gen-as-const-headers): New variable, list that file.
1128 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
1129 header <pthread-errnos.h> instead of defining errno values here.
1130 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1131 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1132 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1133 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1134 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1136 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1138 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1139 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1140 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
1141 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1142 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1143 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1144 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1145 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1146 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1147 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
1148 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1149 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1150 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1151 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1152 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1153 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1154 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1155 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1156 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1157 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1158 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1159 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
1160 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
1161 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
1162 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
1163 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1164 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1166 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
1167 CLONE_CHILD_SETTID worked.
1169 2003-03-12 Ulrich Drepper <drepper@redhat.com>
1171 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
1173 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
1176 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1177 (pthread_cond_t): Add padding.
1179 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
1180 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
1181 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
1183 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1184 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
1185 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1186 (__pthread_rwlock_timedrdlock): Likewise.
1187 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
1188 (__pthread_rwlock_wrlock): Likewise.
1189 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
1190 (__pthread_rwlock_rdlock): Likewise.
1192 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
1194 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
1195 result of lock re-get if it fails.
1197 2003-03-11 Ulrich Drepper <drepper@redhat.com>
1199 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
1200 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1201 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
1202 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1203 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1204 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1205 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1206 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1207 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1208 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1210 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
1211 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
1213 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
1214 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
1215 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
1216 (create_thread): Likewise.
1217 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
1218 * init.c (__pthread_initialize_minimal_internal): Initialize
1219 __libc_multiple_threads_ptr if necessary.
1220 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
1221 __pthread_multiple_threads and __libc_multiple_threads_ptr.
1222 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
1223 __libc_multiple_threads.
1224 (__libc_pthread_init): Return pointer to __libc_pthread_init if
1227 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
1228 (THREAD_SETMEM_NC): Likewise.
1230 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
1231 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
1232 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
1233 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
1235 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
1236 Eliminate one entire instruction.
1238 * cancellation.c (__pthread_enable_asynccancel_2): New function.
1239 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
1240 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1241 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
1242 instead of __pthread_enable_asynccancel.
1243 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
1244 (__pthread_cond_wait): Likewise.
1245 * sysdeps/pthread/pthread_cond_timedwait.c
1246 (__pthread_cond_timedwait): Likewise.
1247 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
1249 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
1250 (__condvar_cleanup): Wake up all waiters in case we got signaled
1251 after being woken up but before disabling asynchronous
1253 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
1254 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1255 (__condvar_cleanup): Likewise.
1257 * init.c (__NR_set_tid_address): If already defined, don't redefine.
1258 Make it an error if architecture has no #if case. Add x86-64.
1260 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
1261 pt-initfini.s generation.
1263 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
1264 (TLS_INIT_TP): Fix typo.
1266 2003-03-11 Jakub Jelinek <jakub@redhat.com>
1268 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
1269 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
1271 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
1272 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
1273 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
1274 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
1275 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
1276 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
1277 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
1278 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
1280 2003-03-11 Ulrich Drepper <drepper@redhat.com>
1282 * sysdeps/pthread/pthread_cond_timedwait.c
1283 (__pthread_cond_timedwait): Return the result of the final
1284 locking. If it succeeds, the regular function return value.
1286 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
1287 Return result of the final locking.
1288 * version.c (__nptl_main): Work around problems with the strange
1289 INTERNAL_SYSCALL macro on ppc32.
1290 * init.c (__pthread_initialize_minimal_internal): Unblock
1291 SIGCANCEL in case the parent blocked it.
1292 Reported by Paul Mackerras <paulus@samba.org>.
1294 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
1295 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
1296 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
1298 2003-03-11 Jakub Jelinek <jakub@redhat.com>
1300 * sysdeps/pthread/pthread_cond_timedwait.c
1301 (__pthread_cond_timedwait): Unlock and fail if
1302 __pthread_mutex_unlock_internal failed.
1304 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
1305 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
1307 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
1308 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
1309 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
1310 ALLOCATE_STACK): New macros.
1311 (TLS_TPADJ): New macro.
1312 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
1313 (allocate_stack): Handle TLS_DTV_AT_TP and
1314 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
1315 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
1317 * init.c [__ia64__] (__NR_set_tid_address): Define.
1319 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
1320 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
1321 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
1322 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
1323 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
1324 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
1325 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
1326 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
1327 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
1328 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
1329 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
1330 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
1331 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
1332 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
1333 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
1334 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
1335 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
1336 * sysdeps/ia64/bits/atomic.h: New file.
1337 * sysdeps/ia64/Makefile: New file.
1338 * sysdeps/ia64/pthread_spin_init.c: New file.
1339 * sysdeps/ia64/pthread_spin_lock.c: New file.
1340 * sysdeps/ia64/pthread_spin_trylock.c: New file.
1341 * sysdeps/ia64/pthread_spin_unlock.c: New file.
1342 * sysdeps/ia64/pthreaddef.h: New file.
1343 * sysdeps/ia64/tcb-offsets.sym: New file.
1344 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
1345 * sysdeps/ia64/tls.h: New file.
1347 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
1348 to syscall instead of no arguments.
1350 2003-03-10 Ulrich Drepper <drepper@redhat.com>
1352 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
1353 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
1354 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
1355 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
1357 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
1360 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
1362 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
1363 lowlevelbarrier.sym.
1364 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
1365 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
1366 Include lowlevelbarrier.h and don't define offsets locally.
1367 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
1369 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1370 (__lll_mutex_lock_wait): Reverse order of first two parameters.
1371 (__lll_mutex_timedlock_wait): Likewise.
1372 (lll_mutex_lock): Adjust asm for that.
1373 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
1374 (lll_lock): Adjust asm for operand order change.
1375 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
1376 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
1378 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
1379 Reverse order of parameters.
1380 (__lll_timedwait_tid): Remove regparms attribute.
1381 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
1382 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
1384 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1385 (__lll_timedwait_tid): Remove one unnecessary instruction.
1387 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
1388 __lll_mutex_timedlock_wait only for NOT_IN_libc.
1389 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
1392 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1393 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
1395 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
1398 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
1399 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
1401 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
1402 define LOCK here (if UP is not defined). The actual code is in
1405 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
1406 LOCK is already defined. Don't define lll_unlock_wake_cb and
1407 __lll_timedwait_tid for libc.so.
1408 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
1409 define LOCK here (if UP is not defined). The actual code is in
1412 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
1413 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
1414 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
1415 instead of lowlevelsem.h.
1416 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
1417 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
1418 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
1420 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
1422 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
1423 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
1424 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
1426 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
1428 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
1431 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
1433 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
1434 of __libc_locking_needed.
1435 (lll_trylock): Initialize %eax to zero.
1437 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
1438 pthread_cond_t definition.
1440 2003-03-10 Roland McGrath <roland@redhat.com>
1442 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
1443 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
1444 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
1445 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
1446 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
1448 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
1449 Instead of setting PD->multiple_threads, set globals
1450 __pthread_multiple_threads and __libc_multiple_threads.
1451 * sysdeps/pthread/createthread.c (create_thread): Likewise.
1452 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
1453 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
1455 * descr.h (struct pthread): Conditionalize first member on
1456 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
1457 containing an anonymous tcbhead_t. Move `list' member out.
1458 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
1459 * allocatestack.c: Remove use of `header.data.' prefix.
1460 * pthread_create.c: Likewise.
1461 * init.c (__pthread_initialize_minimal_internal): Likewise.
1462 * sysdeps/pthread/createthread.c (create_thread): Likewise.
1463 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
1464 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
1465 * sysdeps/x86_64/tls.h: Likewise.
1466 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1467 (SINGLE_THREAD_P): Likewise.
1468 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1469 (SINGLE_THREAD_P): Likewise.
1470 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
1471 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
1473 2003-03-09 Ulrich Drepper <drepper@redhat.com>
1475 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
1477 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
1478 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
1480 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
1481 leftovers from the ia32 code.
1483 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
1485 (clear_once_control): Don't load %esi.
1487 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
1490 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
1492 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
1493 * sysdeps/unix/sysv/linux/createthread.c: ...here.
1495 * Makefile (tests): Add tst-cond10.
1496 * tst-cond10.c: New file.
1498 2003-03-08 Ulrich Drepper <drepper@redhat.com>
1500 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
1501 * tst-signal3.c (do_test): Likewise.
1502 * tst-sem5.c (do_test): Likewise.
1503 * tst-kill6.c (do_test): Likewise.
1504 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
1506 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
1508 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
1509 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
1510 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1511 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1512 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1513 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1514 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1516 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1518 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1519 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1520 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1521 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1522 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1523 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
1524 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
1525 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1527 * allocatestack.c (allocate_stack): If mprotect() fails free the
1530 2003-03-07 Ulrich Drepper <drepper@redhat.com>
1532 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
1534 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
1535 lll_wake_tid. This was used only to work around kernel limits in
1537 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1538 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
1539 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1540 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1542 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
1543 (__pthread_initialize_minimal_internal): Change initialization of
1544 __static_tls_align_m1 appropriately.
1545 * pthreadP.h (__static_tls_align_m1): Renamed from
1547 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
1548 instead of __static_tls_align-1.
1550 2003-03-04 Ulrich Drepper <drepper@redhat.com>
1552 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
1554 * pthread_create.c: Define __pthread_keys using nocommon
1555 attribute, not by placing it explicitly in bss.
1556 Remove DEFINE_DEALLOC definition. Not needed anymore.
1558 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
1559 Use it in mmap call to allocate stacks.
1561 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
1563 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
1564 result of the thread function.
1566 2003-03-03 Ulrich Drepper <drepper@redhat.com>
1568 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
1569 version is just fine.
1571 * sysdeps/unix/sysv/linux/libc_pthread_init.c
1572 (__pthread_child_handler): Renamed from pthread_child_handler,
1573 exported, and marked hidden. Change all users.
1574 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
1575 free __pthread_child_handler from child list.
1577 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
1579 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
1581 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1582 Fix handling of cancellation and failing pthread_mutex_unlock call.
1583 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
1584 (__pthread_cond_wait): Likewise.
1586 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
1587 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
1588 lll_futex_timed_wait call.
1589 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1590 (pthread_rwlock_timedwrlock): Likewise.
1592 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
1593 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
1594 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
1596 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
1597 check of lll_futex_wake return value.
1599 2003-03-03 Roland McGrath <roland@redhat.com>
1601 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
1603 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1604 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
1605 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1607 2003-03-02 Ulrich Drepper <drepper@redhat.com>
1609 * sysdeps/pthread/timer_create.c (timer_create): Return correct
1610 error for CPU clocks.
1612 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1613 _POSIX_MONOTONIC_CLOCK.
1614 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1616 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1619 2003-03-01 Ulrich Drepper <drepper@redhat.com>
1621 * descr.h (struct pthread): Move cleanup field to the front.
1623 2003-03-01 Roland McGrath <roland@redhat.com>
1625 * sem_open.c (sem_open): Braino fix.
1627 2003-03-01 Ulrich Drepper <drepper@redhat.com>
1629 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
1630 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
1631 __pthread_cleanup_pop functionality.
1632 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1634 * descr.h (struct pthread): Move tid field to the front now that
1637 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
1638 (__lll_mutex_timedlock_wait): Remove.
1639 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
1640 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
1641 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
1642 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1643 (lll_unlock_wake_cb): Don't save and restore %esi.
1644 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
1646 (__lll_timedwait_tid): Add alignment.
1647 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
1648 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
1650 (__lll_timedwait_tid): Removed.
1651 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1652 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
1653 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
1654 (pthread_barrier_wait): Don't save, load, and restore %esi for
1656 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1657 (__pthread_cond_signal): Don't save, load, and restore %esi.
1658 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1659 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
1660 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
1661 Don't save, load, and restore %esi.
1663 2003-02-27 Ulrich Drepper <drepper@redhat.com>
1665 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1666 Release lock before waking up the waiters.
1668 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
1670 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
1671 (reader_thread): Likewise.
1673 * sysdeps/pthread/pthread_rwlock_unlock.c
1674 (__pthread_rwlock_unlock): Release internal lock early. Don't try
1675 to wake up readers if there are none.
1677 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1678 Release internal lock before wake threads.
1680 2003-02-26 Ulrich Drepper <drepper@redhat.com>
1682 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
1683 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
1685 * tst-rwlock9.c: Likewise.
1686 * tst-rwlock10.c: New file.
1687 * tst-rwlock11.c: New file.
1689 * Makefile (tests): Add tst-dlsym1.
1690 * tst-dlsym1.c: New file.
1692 * init.c (__pthread_initialize_minimal_internal): Set
1693 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
1694 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
1696 2003-02-24 Ulrich Drepper <drepper@redhat.com>
1698 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
1700 * tst-cond2.c: Fix sychronization with child.
1702 * tst-rwlock8.c (reader_thread): Remove unused variable.
1704 * Makefile: Add rules to build and run tst-tls3.
1705 * tst-tls3.c: New file.
1706 * tst-tls3mod.c: New file.
1708 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
1709 * tst-rwlock8.c: New file.
1710 * tst-rwlock9.c: New file.
1711 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
1712 complete broken rwlock implementation.
1713 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1715 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1717 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1718 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1719 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
1720 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
1721 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
1722 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
1723 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
1725 2003-02-23 Roland McGrath <roland@redhat.com>
1727 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
1729 2003-02-23 Ulrich Drepper <drepper@redhat.com>
1731 * Makefile (tests): Add tst-context1.
1732 * tst-context1.c: New file.
1734 * Makefile (tests): Add tst-tls1 and tst-tls2.
1735 * tst-tls1.c: New file.
1736 * tst-tls2.c: New file.
1738 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
1741 * pthread_create.c (start_thread): Set EXITING_BIT early.
1743 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
1744 (THREAD_GETMEM_NC): Likewise.
1746 2003-02-22 Ulrich Drepper <drepper@redhat.com>
1748 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
1749 off 3 more bytes by using offset-less instructions when possible.
1751 * Makefile: Add dependency for $(objpfx)version.d.
1753 * eintr.c (eintr_source): Add unnecessary return but the compiler
1756 * tst-kill3.c: Include <unistd.h>.
1758 2003-02-21 Roland McGrath <roland@redhat.com>
1760 * pthread_create.c (start_thread): Call __libc_thread_freeres.
1762 2003-02-21 Ulrich Drepper <drepper@redhat.com>
1764 * Makefile (tests): Add tst-eintr1.
1765 (distribute): Add eintr.c.
1766 * tst-eintr1.c: New file.
1767 * eintr.c: New file.
1769 * pthread_cancel.c (pthread_cancel): Use tkill directly.
1771 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
1772 Disallow sending SIGCANCEL.
1774 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
1775 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
1776 * tst-kill1.c: New file.
1777 * tst-kill2.c: New file.
1778 * tst-kill3.c: New file.
1779 * tst-kill5.c: New file.
1780 * tst-kill6.c: New file.
1781 * tst-basic7.c: Renamed to...
1782 * tst-kill4.c: ...this.
1784 2003-02-21 Roland McGrath <roland@redhat.com>
1786 * Makefile (install-lib-ldscripts): New variable.
1788 2003-02-21 Ulrich Drepper <drepper@redhat.com>
1790 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
1791 * pthread_cancel.c: Use INVALID_TD_P.
1792 * pthread_detach.c: Likewise.
1793 * pthread_getschedparam.c: Likewise.
1794 * pthread_setschedparam.c: Likewise.
1795 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
1796 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
1797 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
1798 * pthread_timedjoin.c: Likewise.
1800 * tst-basic7.c: Include <signal.h>.
1802 * pthread_join.c (pthread_join): Limited checking for invalid
1804 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
1806 2003-02-20 Ulrich Drepper <drepper@redhat.com>
1808 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
1809 beginning of the loop. Clear the entire first block of TSD.
1810 * Makefile (tests): Add tst-key4.
1811 * tst-key4.c: New file.
1813 2003-02-18 Ulrich Drepper <drepper@redhat.com>
1815 * Makefile (tests): Add tst-basic7.
1816 * tst-basic7.c: New file.
1818 * pthread_create.c (deallocate_tsd): Mark as internal_function.
1819 Add some more __builtin_expect.
1821 * pthreadP.h: Define dummy version of DEBUGGING_P.
1823 2003-02-17 Ulrich Drepper <drepper@redhat.com>
1825 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
1826 _POSIX_THREAD_PRIORITY_SCHEDULING.
1827 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
1828 _XOPEN_REALTIME_THREADS.
1829 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1831 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
1832 kernel returns EINVAL for PID <= 0, work around it.
1834 * Makefile (tests): Add tst-signal5.
1835 * tst-signal5.c: New file.
1837 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1840 * tst-cancel1.c (tf): Block all signals.
1842 * Makefile (tests): Add tst-basic6.
1843 * tst-basic6.c: New file.
1845 * tst-basic1.c: Add test for process ID.
1847 * Makefile (tests): Add tst-cancel10.
1848 * tst-cancel10.c: New file.
1850 * Makefile (tests): Add tst-signal4.
1851 * tst-signal4.c: New file.
1853 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
1854 __sigismember instead of sigismember. Add __builtin_expect.
1856 2003-02-16 Ulrich Drepper <drepper@redhat.com>
1858 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
1859 pthread_setcancelstate, and pthread_rwlock_setpshared.
1861 * tst-cancel7.c (do_test): Make sure the pid file exists before
1862 canceling the thread.
1864 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
1865 pthread_rwlock_timedrdlock tests.
1866 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
1867 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1868 Check for invalid tv_nsec field.
1869 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1872 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
1873 recursive mutex of overflow.
1875 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
1877 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1878 going into an endless loop.
1879 * Makefile (tests): Add tst-cancel9.
1880 * tst-cancel9.c: New file.
1882 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
1884 2003-02-15 Ulrich Drepper <drepper@redhat.com>
1886 * tst-mutex5.c (do_test): Add more timedlock tests.
1888 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
1889 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
1891 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
1892 use INLINE_SYSCALL. Error number is returned, not -1.
1894 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
1895 and __deallocate_stack with internal_function.
1896 * pthread_create.c: Adjust definitions appropriately.
1897 * allocatestack.c: Likewise.
1899 * pthread_join.c: Add one more __builtin_expect.
1900 * pthread_timedjoin.c: Likewise.
1902 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
1903 not data of sequence number does not match.
1904 Add one __builtin_expect.
1906 * Makefile (tests): Add tst-clock1.
1907 * tst-clock1.c: New file.
1909 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
1911 * Makefile (tests): Add tst-basic5.
1912 * tst-basic5.c: New file.
1914 2003-02-14 Ulrich Drepper <drepper@redhat.com>
1916 * Makefile (tests): Add tst-basic4.
1917 * tst-basic4.c: New file.
1919 * pthreadP.h: Add declaraction for __nptl_nthreads.
1920 * pthread_create.c: Define __nptl_nthreads
1921 (start_thread): Increment __nptl_nthreads at beginning. Decrement
1922 after thread is done. If then zero, call exit(0).
1923 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1924 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
1925 * init.c (pthread_functions): Initialize ptr_nthreads.
1926 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
1927 (__reclaim_stacks): Decrement __nptl_nthreads.
1928 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
1930 * Makefile (tests): Add tst-basic3.
1931 * tst-basic3.c: New file.
1933 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
1934 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
1935 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
1936 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
1937 if asynchronous canceling is enabled.
1938 * pthread_join.c (pthread_join): When recognizing circular joins,
1939 take into account the other thread might be already canceled.
1940 * Makefile (tests): Add tst-join5.
1941 * tst-join5.c: New file.
1943 * Makefile (tests): Add tst-join4.
1944 * tst-join4.c: New file.
1946 2003-02-13 Ulrich Drepper <drepper@redhat.com>
1948 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
1950 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1952 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
1953 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
1954 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
1956 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
1958 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
1959 error if lll_futex_wake failed.
1961 2003-02-13 Ulrich Drepper <drepper@redhat.com>
1963 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
1964 handling of cancellation and failung pthread_mutex_unlock call.
1965 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1966 * Makefile (tests): Add tst-cond8 and tst-cond9.
1967 * tst-cond8.c: New file.
1968 * tst-cond9.c: New file.
1970 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
1972 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
1973 non-standard initializers with __USE_GNU.
1975 * Makefile (tests): Add tst-cleanup3.
1976 * tst-cleanup3.c: New file.
1978 2003-02-12 Ulrich Drepper <drepper@redhat.com>
1980 * Makefile (tests): Add tst-attr1 and tst-attr2.
1981 * tst-attr1.c: New file.
1982 * tst-attr2.c: New file.
1984 * Makefile: Add rules to build and run tst-atfork2 test.
1985 * tst-atfork2.c: New file.
1986 * tst-atfork2mod.c: New file.
1988 * sysdeps/unix/sysv/linux/unregister-atfork.c
1989 (__unregister_atfork): Free the memory allocated for the handlers
1990 after removing them from the lists.
1992 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
1995 * tst-atfork1.c (do_test): Wait for the child we forked.
1996 Report error in child.
1998 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
2000 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
2002 2003-02-10 Ulrich Drepper <drepper@redhat.com>
2004 * Makefile (tests): Add tst-cancel8.
2005 * tst-cancel8.c: New file.
2007 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
2008 clearing of control variable.
2009 * Makefile (tests): Add tst-once3 and tst-once4.
2010 * tst-once3.c: New file.
2011 * tst-once4.c: New file.
2013 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
2015 * sysdeps/sh/Makefile: New file.
2016 * sysdeps/sh/bits/atomic.h: New file.
2017 * sysdeps/sh/pthread_spin_init.c: New file.
2018 * sysdeps/sh/pthread_spin_lock.c: New file.
2019 * sysdeps/sh/pthread_spin_trylock.S: New file.
2020 * sysdeps/sh/pthread_spin_unlock.S: New file.
2021 * sysdeps/sh/pthreaddef.h: New file.
2022 * sysdeps/sh/tcb-offsets.sym: New file.
2023 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
2024 * sysdeps/sh/tls.h: New file.
2025 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
2026 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
2027 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
2028 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
2029 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
2030 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
2031 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
2032 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
2033 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
2034 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
2035 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
2036 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
2037 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
2038 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
2039 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
2040 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
2041 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
2042 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
2043 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
2044 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
2045 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
2046 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
2047 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
2048 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
2049 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
2050 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
2051 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
2052 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
2053 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
2054 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
2056 2003-02-08 Ulrich Drepper <drepper@redhat.com>
2058 * tst-cond2.c: Rearrange code to not rely on behavior undefined
2061 * tst-basic2.c (do_test): Lock mutex before creating the thread.
2063 2003-02-07 Ulrich Drepper <drepper@redhat.com>
2065 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
2066 (TLS_GET_FS): New #define.
2067 (TLS_SET_FS): New #define.
2068 Correct value of __NR_set_thread_area.
2070 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
2072 2003-02-06 Ulrich Drepper <drepper@redhat.com>
2074 * Makefile (tests): Add tst-popen1.
2075 * tst-popen1.c: New file.
2077 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
2078 but inactive generalization.
2079 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2080 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2081 Minor optimization, remove one instruction.
2082 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2084 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
2086 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
2088 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
2090 * init.c (__NR_set_tid_address): Add #ifdef for s390.
2091 * sysdeps/pthread/pthread_barrier_wait.c: New file.
2092 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
2093 * sysdeps/pthread/pthread_cond_signal.c: New file.
2094 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
2095 * sysdeps/pthread/pthread_cond_wait.c: New file.
2096 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
2097 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
2098 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
2099 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
2100 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
2101 * sysdeps/s390/Makefile: New file.
2102 * sysdeps/s390/bits/atomic.h: New file.
2103 * sysdeps/s390/pthread_spin_init.c: New file.
2104 * sysdeps/s390/pthread_spin_lock.c: New file.
2105 * sysdeps/s390/pthread_spin_trylock.c: New file.
2106 * sysdeps/s390/pthread_spin_unlock.c: New file.
2107 * sysdeps/s390/pthreaddef.h: New file.
2108 * sysdeps/s390/tcb-offsets.sym: New file.
2109 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
2110 * sysdeps/s390/tls.h: New file.
2111 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
2112 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
2113 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
2114 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
2115 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
2116 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
2117 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
2118 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
2119 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
2120 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
2121 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
2122 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
2123 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
2124 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
2125 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
2126 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
2127 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
2128 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
2129 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
2130 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
2131 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
2132 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
2133 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
2135 2003-02-04 Ulrich Drepper <drepper@redhat.com>
2137 * atomic.h: Add a couple more default implementations.
2138 (atomic_compare_and_exchange_acq): Use
2139 __arch_compare_and_exchange_32_acq in return value definition. It
2141 (atomic_bit_set): Renamed from atomic_set_bit.
2142 Add missing atomic_ prefixes.
2144 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
2145 thread library is available, use correct value to mark initialized
2148 2003-02-03 Ulrich Drepper <drepper@redhat.com>
2150 * allocatestack.c (allocate_stack): Use __getpagesize instead of
2151 __sysconf to determine pagesize.
2153 * pthread_create.c: Include <atomic.h>.
2154 * allocatestack.c (allocate_stack): Implement coloring of the
2155 allocated stack memory. Rename pagesize to pagesize_m1. It's the
2156 size minus one. Adjust users.
2157 * sysdeps/i386/i686/Makefile: New file.
2159 2003-02-02 Ulrich Drepper <drepper@redhat.com>
2161 * allocatestack.c: Improve comment throughout the file.
2163 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2164 (__lll_lock_wait): Add branch prediction.
2165 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
2166 (__lll_lock_wait): Likewise.
2167 (lll_unlock_wake_cb): Removed.
2169 2003-01-31 Ulrich Drepper <drepper@redhat.com>
2171 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
2172 _POSIX_THREAD_PRIORITY_SCHEDULING.
2174 2003-01-30 Jakub Jelinek <jakub@redhat.com>
2176 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2177 Fix return type of ptr___pthread_getspecific.
2179 2003-01-29 Ulrich Drepper <drepper@redhat.com>
2181 * Makefile (tests): Add tst-umask1.
2182 (tst-umask1-ARGS): Define.
2183 * tst-umask1.c: New file.
2185 2003-01-28 Ulrich Drepper <drepper@redhat.com>
2187 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
2188 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
2189 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
2190 pthread_rwlock_unlock.
2191 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
2192 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
2193 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
2194 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
2195 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2197 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
2198 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2200 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
2201 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
2202 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
2204 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
2205 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
2207 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
2208 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
2209 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
2211 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
2212 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
2214 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
2216 * Makefile (libpthread-routines): Remove lowlevelcond and
2217 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
2218 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
2219 and pthread_cond_broadcast.
2220 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
2221 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
2222 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
2223 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
2224 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
2225 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
2226 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
2227 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
2228 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
2229 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
2230 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
2231 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
2232 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
2233 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
2234 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
2235 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
2236 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
2237 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
2238 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
2239 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
2240 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
2241 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
2242 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
2243 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
2244 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
2245 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
2246 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
2247 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
2248 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
2249 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
2250 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
2252 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
2253 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
2254 of the code is moved to ...
2255 * sysdeps/pthread/createthread.c: ...here. New file.
2257 2003-01-27 Ulrich Drepper <drepper@redhat.com>
2259 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
2260 (__new_sem_post): Clear %eax before returning.
2261 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
2263 * Makefile (tests): Add tst-cleanup2.
2264 * tst-cleanup2.c: New file.
2266 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
2267 Interpret first parameter correctly.
2269 2003-01-17 Ulrich Drepper <drepper@redhat.com>
2271 * Makefile (headers): Add bits/semaphore.h.
2273 2003-01-16 Jakub Jelinek <jakub@redhat.com>
2275 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
2278 2003-01-14 Ulrich Drepper <drepper@redhat.com>
2280 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
2281 must be used and mapping failed.
2282 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
2284 * Makefile (CFLAGS-pthread_self.os): Define this, not
2285 CFLAGS-pthread_self.c.
2287 2003-01-13 Ulrich Drepper <drepper@redhat.com>
2289 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
2292 * Makefile (libpthread-routines): Add version. Add rules to build
2293 version.os and banner.h.
2294 * version.c: New file.
2296 2003-01-13 Jakub Jelinek <jakub@redhat.com>
2298 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
2299 the alias unconditional.
2300 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
2302 2003-01-13 Ulrich Drepper <drepper@redhat.com>
2304 * Makefile (CFLAGS-pthread_self.c): New definition.
2306 2003-01-06 Jakub Jelinek <jakub@redhat.com>
2308 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
2309 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
2310 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
2311 * init.c (__pthread_initialize_minimal_internal): Likewise.
2313 2003-01-07 Jakub Jelinek <jakub@redhat.com>
2315 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
2317 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
2318 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
2319 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
2320 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
2321 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
2322 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
2324 2003-01-06 Jakub Jelinek <jakub@redhat.com>
2326 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
2327 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
2328 * tst-cancel-wrappers.sh: Remove all exceptions.
2330 2003-01-05 Ulrich Drepper <drepper@redhat.com>
2332 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
2333 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
2335 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
2336 Use __libc_pthread_functions array if SHARED.
2338 * pthreadP.h: Move pthread_cond_2_0_t definition to...
2339 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
2341 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
2342 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
2343 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
2344 __libc_ptf_call instead of __libc_maybe_call.
2346 (__libc_cleanup_region_start): Wrap function name with PTF call.
2347 (__libc_cleanup_region_end): Likewise.
2348 (__libc_cleanup_end): Likewise.
2350 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
2351 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
2352 * pthread_key_create.c: Add __pthread_key_create_internal alias.
2353 * pthreadP.h: Add prototypes.
2355 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
2356 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
2357 __pthread_rwlock_unlock aliases.
2358 * pthreadP.h: Add prototypes for new aliases.
2360 * pthreadP.h (struct pthead_functions): Moved to...
2361 * sysdeps/pthread/pthread-functions.h: ...here. New file.
2362 * init.c (pthread_functions): Add initializers for new elements.
2364 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
2365 __pthread_cleanup_pop_restore aliases.
2366 * pthreadP.h: Add prototypes.
2368 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
2369 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
2370 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
2371 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2372 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
2373 * pthreadP.h: Adjust prototypes and callers.
2375 2003-01-04 Ulrich Drepper <drepper@redhat.com>
2377 * Makefile (tests): Add tst-cancel7.
2378 (tst-cancel7-ARGS): New variable.
2379 * tst-cancel7.c: New file.
2381 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
2382 around gcc defficiencies.
2383 * old_pthread_cond_signal.c: Likewise.
2384 * old_pthread_cond_timedwait.c: Likewise.
2385 * old_pthread_cond_wait.c: Likewise.
2387 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
2389 2003-01-03 Ulrich Drepper <drepper@redhat.com>
2391 * Makefile (tests): Add tst-cond7.
2392 * tst-cond7.c: New file.
2394 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
2395 (condvar_cleanup): Get condvar address from the right place.
2397 * atomic.h: Correct definitions of atomic_full_barrier,
2398 atomic_read_barrier, atomic_write_barrier.
2400 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
2402 * old_pthread_cond_signal.c: Likewise.
2403 * old_pthread_cond_timedwait.c: Likewise.
2404 * old_pthread_cond_wait.c: Likewise.
2406 2003-01-03 Jakub Jelinek <jakub@redhat.com>
2408 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
2410 2003-01-03 Ulrich Drepper <drepper@redhat.com>
2412 * pthreadP.h (pthread_cond_2_0_t): New type.
2413 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
2414 Use new type for the 2.0 condvar function prototypes.
2415 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
2416 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
2418 * old_pthread_cond_destroy.c: Likewise.
2419 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
2420 * old_pthread_cond_signal.c: Likewise.
2421 * old_pthread_cond_timedwait.c: Likewise.
2422 * old_pthread_cond_wait.c: Likewise.
2424 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
2425 (__pthread_cond_wait): Don't save cancellation mode and seq value
2428 * herrno.c (__h_errno_location): Don't define as weak.
2430 2003-01-02 Jakub Jelinek <jakub@redhat.com>
2432 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
2433 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
2434 and pthread_cond_wait.
2435 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
2437 (__pthread_cond_broadcast_2_0): ... this.
2438 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
2440 (__pthread_cond_destroy_2_0): ... this.
2441 * old_pthread_cond_init.c (__old_pthread_cond_init):
2443 (__pthread_cond_init_2_0): ... this.
2444 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
2446 (__pthread_cond_signal_2_0): ... this.
2447 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
2449 (__pthread_cond_wait_2_0): ... this.
2450 * pthread_cond_destroy.c: Include shlib-compat.h.
2451 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
2452 * pthread_cond_init.c: Include shlib-compat.h.
2453 (pthread_cond_init): Change strong_alias into versioned_symbol.
2454 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
2455 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
2457 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
2458 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
2459 __pthread_cond_wait_2_0): New prototypes.
2460 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
2461 __old_pthread_cond_init, __old_pthread_cond_signal,
2462 __old_pthread_cond_wait): Removed.
2463 * init.c: Include shlib-compat.h.
2464 (pthread_functions): Guard ptr___pthread_attr_init_2_0
2465 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
2466 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
2467 ptr___pthread_cond_*_2_0 fields.
2468 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
2469 pthread_cond_*@GLIBC_2.0 compatibility symbols.
2471 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
2472 LIBC_SIGACTION was not yet defined.
2473 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
2474 [!defined LIBC_SIGACTION] (__sigaction): New function and
2476 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
2477 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
2479 2003-01-02 Jakub Jelinek <jakub@redhat.com>
2481 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
2483 2003-01-02 Ulrich Drepper <drepper@redhat.com>
2485 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2486 New, larger type definition.
2487 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
2489 * Versions [libpthread]: Add definitions for new pthread_cond_*
2490 interfaces for version GLIBC_2.3.2.
2491 * pthread_cond_init.c: Update initialization for new type definition.
2492 * Makefile (libpthread-routines): Remove pthread_cond_wait,
2493 pthread_cond_timedwait, pthread_cond_signal, and
2494 pthread_cond_broadcast. Add old_pthread_cond_init,
2495 old_pthread_cond_destroy, old_pthread_cond_wait,
2496 old_pthread_cond_timedwait, old_pthread_cond_signal, and
2497 old_pthread_cond_broadcast.
2498 * old_pthread_cond_broadcast.c: New file.
2499 * old_pthread_cond_destroy.c: New file.
2500 * old_pthread_cond_init.c: New file.
2501 * old_pthread_cond_signal.c: New file.
2502 * old_pthread_cond_timedwait.c: New file.
2503 * old_pthread_cond_wait.c: New file.
2504 * pthreadP.h: Add prototypes for the compatibility interfaces.
2506 * pthread_cond_destroy.c: Don't include <errno.h>.
2508 2003-01-01 Ulrich Drepper <drepper@redhat.com>
2510 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
2511 unnecessary zero offset when addressing MUTEX.
2513 2002-12-31 Ulrich Drepper <drepper@redhat.com>
2515 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
2517 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
2518 for __register_atfork.
2520 2002-12-31 Jakub Jelinek <jakub@redhat.com>
2522 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
2523 instead of ASSEMBLER test macro.
2525 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
2526 __libc_current_sigrtmax): Add libc_hidden_def.
2528 * sysdeps/pthread/list.h: Remove assert.h include.
2530 2002-12-31 Ulrich Drepper <drepper@redhat.com>
2532 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
2533 __pthread_initialize_minimal_internal not
2534 __pthread_initialize_minimal.
2536 2002-12-30 Ulrich Drepper <drepper@redhat.com>
2538 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
2539 __pthread_initialize_minimal as hidden.
2541 * init.c (__pthread_initialize_minimal_internal): Don't mark as
2544 2002-12-31 Jakub Jelinek <jakub@redhat.com>
2546 * Makefile ($(inst_libdir)/libpthread.so): Depend on
2547 $(common-objpfx)format.lds, include that into the output script.
2549 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
2551 2002-12-28 Andreas Jaeger <aj@suse.de>
2553 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
2554 nsec resolution changes.
2555 (xstat64_conv): Likewise.
2556 (xstat32_conv): Likewise.
2557 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
2559 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
2560 structs stat and stat64.
2561 * time/time.h (__timespec_defined): Define for __USE_MISC.
2562 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
2564 2002-12-30 Jakub Jelinek <jakub@redhat.com>
2566 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
2568 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
2569 (pthread_exit): Use strong_alias to avoid warnings.
2570 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
2571 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
2572 ptr___pthread_attr_init_2_*.
2573 * init.c (pthread_functions): Adjust.
2575 2002-12-29 Ulrich Drepper <drepper@redhat.com>
2577 * forward.c: Make all functions available by default again. It
2578 caused too much trouble.
2580 * pt-siglongjmp.c: Removed.
2582 2002-12-28 Jakub Jelinek <jakub@redhat.com>
2584 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
2585 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
2586 * sysdeps/i386/Makefile: New file.
2587 * sysdeps/i386/tcb-offsets.sym: New file.
2588 * sysdeps/pthread/tcb-offsets.h: New file.
2589 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2590 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
2592 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
2593 __register_atfork...
2594 (GLIBC_2.3.2): ...here.
2596 2002-12-28 Ulrich Drepper <drepper@redhat.com>
2598 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
2599 pthread_attr_setstackaddr with __attribute_deprecated__.
2601 2002-12-27 Jakub Jelinek <jakub@redhat.com>
2603 * pt-system.c (system): Remove cancellation handling.
2604 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
2605 cancellation routines.
2607 2002-12-28 Ulrich Drepper <drepper@redhat.com>
2609 * descr.h: Include <dl-sysdep.h>.
2610 (struct pthread): Move header.data.list to the back of the struct.
2611 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
2612 (MULTIPLE_THREADS_OFFSET): Adjust offset.
2613 (SYSINFO_OFFSEET): Likewise.
2615 2002-12-27 Jakub Jelinek <jakub@redhat.com>
2617 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
2619 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
2620 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
2621 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
2622 (USE_DL_SYSINFO): Undef.
2624 2002-12-22 Jakub Jelinek <jakub@redhat.com>
2626 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
2627 $(common-objpfx)libc.so.
2628 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
2629 it is bigger than pipe buffer size even on arches with bigger
2631 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
2633 2002-12-25 Ulrich Drepper <drepper@redhat.com>
2635 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
2636 correct errno access for case that USE___THREAD is not defined.
2638 2002-12-24 Ulrich Drepper <drepper@redhat.com>
2640 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
2641 Patch by Marijn Ros <marijn@mad.scientist.com>.
2643 2002-12-22 Roland McGrath <roland@redhat.com>
2645 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
2647 2002-12-20 Ulrich Drepper <drepper@redhat.com>
2649 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
2651 2002-12-19 Ulrich Drepper <drepper@redhat.com>
2653 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
2654 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
2655 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
2657 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
2659 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2660 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
2661 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
2662 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2663 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
2664 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
2665 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
2666 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2668 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
2670 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
2672 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
2674 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
2676 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
2677 that sysinfo is properly initialized.
2678 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
2679 to 1 only for ld.so.
2681 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2682 RTLD_CORRECT_DYNAMIC_WEAK.
2684 2002-12-19 Jakub Jelinek <jakub@redhat.com>
2686 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
2687 Use return 0 as 6th argument to FORWARD4.
2688 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
2690 2002-12-18 Ulrich Drepper <drepper@redhat.com>
2692 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
2693 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
2694 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
2695 (INIT_SYSINFO): New #define.
2696 (TLS_TP_INIT): Use INIT_SYSINFO.
2697 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2698 At test to make sure SYSINFO_OFFSET value is correct.
2699 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
2701 2002-12-18 Jakub Jelinek <jakub@redhat.com>
2703 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
2704 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
2705 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
2706 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
2707 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
2708 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
2709 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
2711 2002-12-18 Ulrich Drepper <drepper@redhat.com>
2713 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
2714 macro instead of using int $0x80 directly.
2716 * sysdeps/pthread/bits/stdio-lock.h: New file.
2717 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
2718 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
2719 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
2720 * Makefile (routines): Add libc-lowlevelmutex.
2722 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
2723 __i686.get_pc_thunk.dx.
2725 2002-12-17 Jakub Jelinek <jakub@redhat.com>
2727 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
2728 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
2729 ($(objpfx)tst-cancel-wrappers.out): New rule.
2730 * tst-cancel-wrappers.sh: New test.
2731 * tst-locale1.c: Include signal.h.
2732 (uselocale): Test static linking of __libc_current_sigrt*.
2734 2002-12-17 Ulrich Drepper <drepper@redhat.com>
2736 * Makefile (tests): Add tst-cancel6.
2737 * tst-cancel6.c: New file
2739 2002-12-17 Jakub Jelinek <jakub@redhat.com>
2741 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2742 Define meaningfully for assembler as well.
2743 * pthreadP.h (struct pthread_functions): Remove
2744 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
2745 and ptr_pthread_attr_init_2_1 fields.
2746 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
2747 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
2748 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
2749 (FORWARD3): Define using FORWARD4.
2750 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
2752 * pt-system.c: Remove duplicate stdlib.h include.
2754 2002-12-16 Ulrich Drepper <drepper@redhat.com>
2756 * sem_init.c: Define sem_init@GLIBC_2.0.
2757 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
2758 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
2760 * flockfile.c: Moved to...
2761 * sysdeps/pthread/flockfile.c: ...here. New file.
2762 * funlockfile.c: Moved to...
2763 * sysdeps/pthread/funlockfile.c: ...here. New file.
2764 * ftrylockfile.c: Moved to...
2765 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
2767 2002-12-16 Jakub Jelinek <jakub@redhat.com>
2769 * libc-cancellation.c: Guard both function with
2770 #if !defined NOT_IN_libc.
2771 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
2772 automatically provided pthread wrappers.
2773 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
2774 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
2776 * pt-open.c: Removed.
2777 * pt-fcntl.c: Removed.
2778 * pt-fsync.c: Removed.
2779 * pt-lseek.c: Removed.
2780 * pt-msgrcv.c: Removed.
2781 * pt-msgsnd.c: Removed.
2782 * pt-msync.c: Removed.
2783 * pt-nanosleep.c: Removed.
2784 * pt-open64.c: Removed.
2785 * pt-pause.c: Removed.
2786 * pt-pread.c: Removed.
2787 * pt-pread64.c: Removed.
2788 * pt-pwrite.c: Removed.
2789 * pt-pwrite64.c: Removed.
2790 * pt-read.c: Removed.
2791 * pt-recv.c: Removed.
2792 * pt-recvfrom.c: Removed.
2793 * pt-recvmsg.c: Removed.
2794 * pt-send.c: Removed.
2795 * pt-sendto.c: Removed.
2796 * pt-sigtimedwait.c: Removed.
2797 * pt-sigwait.c: Removed.
2798 * pt-wait.c: Removed.
2799 * pt-waitpid.c: Removed.
2800 * pt-write.c: Removed.
2801 * pt-accept.c: Removed.
2802 * pt-close.c: Removed.
2803 * pt-connect.c: Removed.
2804 * pt-lseek64.c: Removed.
2805 * pt-sendmsg.c: Removed.
2806 * pt-tcdrain.c: Removed.
2808 2002-12-15 Ulrich Drepper <drepper@redhat.com>
2810 * init.c (__pthread_initialize_minimal_internal): Renamed from
2811 __pthread_initialize_minimal. Make old name an alias. This
2812 converts a normal relocation into a relative relocation.
2814 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
2816 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
2817 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
2818 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
2819 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
2820 pt-sigwaitinfo, pt-waitid, and pt-writev.
2821 * pt-creat.c: Removed.
2822 * pt-poll.c: Removed.
2823 * pt-pselect.c: Removed.
2824 * pt-readv.c: Removed.
2825 * pt-select.c: Removed.
2826 * pt-sigpause.c: Removed.
2827 * pt-sigsuspend.c: Removed.
2828 * pt-sigwaitinfo.c: Removed.
2829 * pt-waitid.c: Removed.
2830 * pt-writev.c: Removed.
2832 * init.c (pthread_functions): New variable.
2833 (__pthread_initialize_minimal): Pass pointer to pthread_functions
2834 (or NULL) to __libc_pthread_init.
2835 * forward.c: Rewrite to use __libc:pthread_functions array to get
2837 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
2839 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2840 Take new parameter. Copy content of variable pointed to by it
2841 to __libc_pthread_init.
2843 * pthreadP.h (struct pthread_functions): New type.
2844 (__libc_pthread_init): Declare.
2846 * pthread_attr_destroy.c: Add namespace protected alias.
2847 * pthread_attr_getdetachstate.c: Likewise.
2848 * pthread_attr_getinheritsched.c: Likewise.
2849 * pthread_attr_getschedparam.c: Likewise.
2850 * pthread_attr_getschedpolicy.c: Likewise.
2851 * pthread_attr_getscope.c: Likewise.
2852 * pthread_attr_setdetachstate.c: Likewise.
2853 * pthread_attr_setinheritsched.c: Likewise.
2854 * pthread_attr_setschedparam.c: Likewise.
2855 * pthread_attr_setschedpolicy.c: Likewise.
2856 * pthread_attr_setscope.c: Likewise.
2857 * pthread_cond_broadcast.c: Likewise.
2858 * pthread_cond_destroy.c: Likewise.
2859 * pthread_cond_init.c: Likewise.
2860 * pthread_cond_signal.c: Likewise.
2861 * pthread_cond_wait.c: Likewise.
2862 * pthread_condattr_destroy.c: Likewise.
2863 * pthread_condattr_init.c: Likewise.
2864 * pthread_equal.c: Likewise.
2865 * pthread_exit.c: Likewise.
2866 * pthread_getschedparam.c: Likewise.
2867 * pthread_self.c: Likewise.
2868 * pthread_setcancelstate.c: Likewise.
2869 * pthread_setschedparam.c: Likewise.
2870 * pthread_mutex_destroy.c: Likewise.
2871 * pthread_mutex_init.c: Likewise.
2872 * pthreadP.h: Add prototypes for the aliases.
2874 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
2875 multiple_threads member in correct TCB to 1.
2877 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
2878 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
2879 member of thread decriptor, otherwise return unconditionally 1.
2881 2002-12-14 Ulrich Drepper <drepper@redhat.com>
2883 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
2884 regular Linux version. Remove file.
2885 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
2886 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
2887 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
2888 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
2889 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
2890 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
2891 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
2892 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
2893 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
2894 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
2895 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
2896 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
2897 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
2898 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
2899 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
2900 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
2901 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
2902 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
2903 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
2904 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
2905 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
2906 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
2907 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
2908 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
2909 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
2910 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
2911 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
2912 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
2913 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
2914 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
2916 2002-12-14 Jakub Jelinek <jakub@redhat.com>
2918 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
2919 * sysdeps/unix/sysv/linux/open.c: Removed.
2920 * sysdeps/unix/sysv/linux/fsync.c: Removed.
2921 * sysdeps/unix/sysv/linux/lseek.c: Removed.
2922 * sysdeps/unix/sysv/linux/msync.c: Removed.
2923 * sysdeps/unix/sysv/linux/read.c: Removed.
2924 * sysdeps/unix/sysv/linux/close.c: Removed.
2925 * sysdeps/unix/sysv/linux/creat.c: Removed.
2926 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
2927 * sysdeps/unix/sysv/linux/pause.c: Removed.
2928 * sysdeps/unix/sysv/linux/select.c: Removed.
2929 * sysdeps/unix/sysv/linux/write.c: Removed.
2931 2002-12-14 Ulrich Drepper <drepper@redhat.com>
2933 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
2934 element in TCB to see whether locking is needed.
2936 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
2937 MULTIPLE_THREADS_OFFSET value is correct.
2939 * sysdeps/unix/sysv/linux/close.c: New file.
2940 * sysdeps/unix/sysv/linux/connect.S: New file.
2941 * sysdeps/unix/sysv/linux/creat.c: New file.
2942 * sysdeps/unix/sysv/linux/fsync.c: New file.
2943 * sysdeps/unix/sysv/linux/llseek.c: New file.
2944 * sysdeps/unix/sysv/linux/lseek.c: New file.
2945 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
2946 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
2947 * sysdeps/unix/sysv/linux/msync.c: New file.
2948 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
2949 * sysdeps/unix/sysv/linux/open.c: New file.
2950 * sysdeps/unix/sysv/linux/open64.c: New file.
2951 * sysdeps/unix/sysv/linux/pause.c: New file.
2952 * sysdeps/unix/sysv/linux/poll.c: New file.
2953 * sysdeps/unix/sysv/linux/pread.c: New file.
2954 * sysdeps/unix/sysv/linux/pread64.c: New file.
2955 * sysdeps/unix/sysv/linux/pselect.c: New file.
2956 * sysdeps/unix/sysv/linux/pwrite.c: New file.
2957 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
2958 * sysdeps/unix/sysv/linux/readv.c: New file.
2959 * sysdeps/unix/sysv/linux/recv.S: New file.
2960 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
2961 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
2962 * sysdeps/unix/sysv/linux/select.c: New file.
2963 * sysdeps/unix/sysv/linux/send.S: New file.
2964 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
2965 * sysdeps/unix/sysv/linux/sendto.S: New file.
2966 * sysdeps/unix/sysv/linux/sigpause.c: New file.
2967 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
2968 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
2969 * sysdeps/unix/sysv/linux/sigwait.c: New file.
2970 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
2971 * sysdeps/unix/sysv/linux/system.c: New file.
2972 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
2973 * sysdeps/unix/sysv/linux/wait.c: New file.
2974 * sysdeps/unix/sysv/linux/waitid.c: New file.
2975 * sysdeps/unix/sysv/linux/waitpid.c: New file.
2976 * sysdeps/unix/sysv/linux/writev.c: New file.
2977 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
2979 * pt-readv.c: Fix comment.
2981 2002-12-14 Jakub Jelinek <jakub@redhat.com>
2983 * tst-cleanup1.c: Include stdlib.h.
2985 * tst-cancel5.c: New test.
2986 * Makefile (tests): Add tst-cancel5.
2987 (tst-cancel5): Link against libc.so libpthread.so in that order.
2989 2002-12-13 Ulrich Drepper <drepper@redhat.com>
2991 * forward.c (test_loaded): Prevent recursive calls.
2993 * Makefile (routines): Add libc-cancellation.
2994 * libc-cancellation.c: New file.
2995 * descr.h (struct pthread): Add multiple_threads field.
2996 * allocatestack.c (allocate_stack): Initialize multiple_header field of
2997 new thread descriptor to 1.
2998 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
2999 Initialize multiple_thread field after successful thread creation.
3000 * cancellation.c (__do_cancel): Move to pthreadP.h.
3001 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
3002 (__pthread_disable_asynccancel): Add internal_function attribute.
3003 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
3004 * pthread_setcancelstate.c: Likewise.
3005 * pthread_setcanceltype.c: Likewise.
3006 * pthread_exit.c: Likewise.
3007 * pthreadP.h (CANCELLATION_P): Likewise.
3008 (__do_cancel): Define as static inline.
3009 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
3010 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
3012 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
3013 fields. Define MULTIPLE_THREADS_OFFSET.
3014 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
3016 * sysdeps/unix/sysv/linux/accept.S: New file.
3017 * sysdeps/unix/sysv/linux/read.c: New file.
3018 * sysdeps/unix/sysv/linux/write.c: New file.
3019 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
3020 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
3021 initialization of __libc_locking_needed.
3022 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
3023 __libc_locking_needed, use multiple_threads field in TCB.
3024 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3026 2002-12-12 Ulrich Drepper <drepper@redhat.com>
3028 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
3030 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
3032 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
3033 access to __libc_locking_needed for PIC.
3035 2002-12-12 Jakub Jelinek <jakub@redhat.com>
3037 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
3038 declare for libc.so.
3039 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
3041 (__libc_lock_lock): Put into statement expression.
3042 (__libc_lock_unlock): Remove trailing semicolon.
3043 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
3045 2002-12-12 Roland McGrath <roland@redhat.com>
3047 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
3048 "m" constraint to refer to __libc_locking_needed. Declare it here.
3050 2002-12-12 Ulrich Drepper <drepper@redhat.com>
3052 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
3053 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
3054 Initialize __libc_locking_needed.
3055 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
3056 instead of __register_pthread_fork_handler.
3057 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
3058 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
3059 fork-gen with libc_pthread_init.
3060 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
3061 of __register_pthread_fork_handler.
3062 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
3063 of __register_pthread_fork_handler.
3064 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
3065 __libc_locking_needed to determine whether lock prefix can be avoided.
3066 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3068 2002-12-11 Ulrich Drepper <drepper@redhat.com>
3070 * Makefile (tests): Add tst-cleanup1.
3071 * tst-cleanup1.c: New file.
3072 * cancellation.c (__cleanup_thread): Removed.
3073 (__do_cancel): Remove call to __cleanup_thread.
3074 * pthreadP.h: Remove __cleanup_thread prorotype.
3076 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
3077 Remember function and argument even if cancellation handler
3078 function is not available.
3079 (__libc_cleanup_region_end): Execute registered function directly if
3080 pthread functions are not available.
3081 (__libc_cleanup_end): Likewise.
3083 * init.c (__pthread_initialize_minimal): Fix initialization in
3084 static lib by preventing gcc from being too clever.
3086 2002-12-10 Ulrich Drepper <drepper@redhat.com>
3088 * init.c (__pthread_initialize_minimal): Remove unneccesary
3091 * Makefile (tests): We can run tst-locale2 now.
3093 2002-12-09 Ulrich Drepper <drepper@redhat.com>
3095 * Versions: Remove duplicated sigwait entry.
3097 2002-12-08 Ulrich Drepper <drepper@redhat.com>
3099 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
3102 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
3104 * pthreadP.h: Declare __pthread_enable_asynccancel and
3105 __pthread_disable_asynccancel.
3106 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
3107 (CANCEL_RESET): Use __pthread_disable_asynccancel.
3108 * cancellation.c (__pthread_enable_asynccancel): New function.
3109 (__pthread_disable_asynccancel): New function.
3110 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
3111 * pt-close.c: Likewise.
3112 * pt-connect.c: Likewise.
3113 * pt-creat.c: Likewise.
3114 * pt-fcntl.c: Likewise.
3115 * pt-fsync.c: Likewise.
3116 * pt-lseek.c: Likewise.
3117 * pt-lseek64.c: Likewise.
3118 * pt-msgrcv.c: Likewise.
3119 * pt-msgsnd.c: Likewise.
3120 * pt-msync.c: Likewise.
3121 * pt-nanosleep.c: Likewise.
3122 * pt-open.c: Likewise.
3123 * pt-open64.c: Likewise.
3124 * pt-pause.c: Likewise.
3125 * pt-poll.c: Likewise.
3126 * pt-pread.c: Likewise.
3127 * pt-pread64.c: Likewise.
3128 * pt-pselect.c: Likewise.
3129 * pt-pwrite.c: Likewise.
3130 * pt-pwrite64.c: Likewise.
3131 * pt-read.c: Likewise.
3132 * pt-readv.c: Likewise.
3133 * pt-recv.c: Likewise.
3134 * pt-recvfrom.c: Likewise.
3135 * pt-recvmsg.c: Likewise.
3136 * pt-select.c: Likewise.
3137 * pt-send.c: Likewise.
3138 * pt-sendmsg.c: Likewise.
3139 * pt-sendto.c: Likewise.
3140 * pt-sigpause.c: Likewise.
3141 * pt-sigsuspend.c: Likewise.
3142 * pt-sigtimedwait.c: Likewise.
3143 * pt-sigwait.c: Likewise.
3144 * pt-sigwaitinfo.c: Likewise.
3145 * pt-system.c: Likewise.
3146 * pt-tcdrain.c: Likewise.
3147 * pt-wait.c: Likewise.
3148 * pt-waitid.c: Likewise.
3149 * pt-waitpid.c: Likewise.
3150 * pt-write.c: Likewise.
3151 * pt-writev.c: Likewise.
3152 * pthread_join.c: Likewise.
3153 * pthread_timedjoin.c: Likewise.
3155 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
3156 (__xpg_sigpause): New function.
3157 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
3159 2002-12-07 Ulrich Drepper <drepper@redhat.com>
3161 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
3163 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
3164 _GI_pthread_cleanup_pop to pthreadP.h.
3166 * ftrylockfile.c: Use _IO_lock_trylock instead of
3167 pthread_mutex_trylock.
3169 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
3170 (CANCEL_RESET): Likewise.
3171 (__pthread_setcanceltype_): Declare.
3172 (__pthread_mutex_lock_internal): Declare.
3173 (__pthread_mutex_unlock_internal): Declare.
3174 (__pthread_once_internal): Declare.
3175 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
3176 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
3178 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
3179 and pthread_mutex_unlock.
3180 * pthread_cond_wait.c: Likewise.
3181 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
3182 * pthread_mutex_unlock.c: Likewise.
3184 * pthread_setcanceltype.c: Add additional alias
3185 __pthread_setcanceltype.
3187 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
3188 * sem_open.c (sem_open): Likewise.
3189 Use __libc_open, __libc_write, and __libc_close instead of
3190 open, write, and close respectively.
3192 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
3193 Rewrite as statement expression since it must return a value.
3195 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
3196 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
3199 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
3200 alias __pthread_once_internal.
3202 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
3204 2002-12-06 Ulrich Drepper <drepper@redhat.com>
3206 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
3207 * tst-stdio1.c: New file.
3208 * tst-stdio2.c: New file.
3210 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
3212 * Makefile (tests): Comment out tst-locale2 for now.
3213 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
3215 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
3217 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
3218 Use _IO_lock_init instead of explicit assignment.
3220 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
3221 Define __libc_lock_* and __libc_lock_recursive macros with
3222 lowlevellock macros, not pthread mutexes.
3224 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
3225 of pthread_mutex_lock.
3226 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
3227 instead of pthread_mutex_unlock.
3229 2002-12-06 Roland McGrath <roland@redhat.com>
3231 * allocatestack.c (__stack_user): Use uninitialized defn.
3232 * init.c (__pthread_initialize_minimal): Initialize it here.
3234 2002-12-05 Roland McGrath <roland@redhat.com>
3236 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
3238 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
3240 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
3243 2002-12-05 Ulrich Drepper <drepper@redhat.com>
3245 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
3247 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
3248 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
3249 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
3250 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
3251 for __libc_lock_* macros.
3252 * Makefile (routines): Add libc-lowlevellock.
3254 2002-10-09 Roland McGrath <roland@redhat.com>
3256 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
3257 Under [__PIC__], call the function via the pointer fetched for
3258 comparison rather than a call by name that uses the PLT.
3259 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
3260 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
3261 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
3262 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
3263 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
3265 2002-12-04 Roland McGrath <roland@redhat.com>
3267 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
3269 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
3270 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
3272 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
3274 2002-12-04 Ulrich Drepper <drepper@redhat.com>
3276 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
3277 a completely opaque, non-integer type.
3278 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3280 2002-12-05 Jakub Jelinek <jakub@redhat.com>
3282 * sysdeps/i386/tls.h: Include stdlib.h.
3283 * sysdeps/x86_64/tls.h: Likewise.
3285 2002-12-04 Ulrich Drepper <drepper@redhat.com>
3287 * Makefile (tests): Add tst-locale2.
3288 (tests-static): Likewise.
3289 * tst-locale2.c: New file.
3291 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
3292 volatile and add memory clobbers to lock operations.
3294 2002-12-03 Ulrich Drepper <drepper@redhat.com>
3296 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
3297 * sysdeps/i386/i486/bits/atomic.h: New file.
3298 * sysdeps/i386/i586/bits/atomic.h: New file.
3299 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
3300 include i486 version.
3301 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
3302 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
3303 Patch by Marijn Ros <marijn@mad.scientist.com>.
3305 * allocatestack.c (get_cached_stack): Don't crash if we first
3306 found a stack with a larger size then needed.
3307 Reported by Hui Huang <hui.huang@sun.com>.
3309 * Makefile (tests): Add tst-sysconf.
3310 * tst-sysconf.c: New file.
3312 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
3313 PTHREAD_THREADS_MAX.
3315 2002-12-02 Roland McGrath <roland@redhat.com>
3317 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
3318 Declare using hidden_proto instead of attribute_hidden, so there are
3319 non-.hidden static symbols for gdb to find.
3320 (__pthread_keys): Likewise.
3321 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
3322 * allocatestack.c (__stack_user): Likewise.
3323 * pthread_create.c (__pthread_keys): Likewise.
3324 (__nptl_threads_events, __nptl_last_event): Make these static instead
3326 * pthread_key_create.c (__pthread_pthread_keys_max,
3327 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
3329 2002-12-02 Ulrich Drepper <drepper@redhat.com>
3331 * Makefile (tests): Add tst-locale1. If buid-static is yes link
3333 * tst-locale1.c: New file.
3335 * pthread_cond_timedwait.c: Include <stdlib.h>.
3337 * Makefile (tests): Add tst-fork2 and tst-fork3.
3338 * tst-fork2.c: New file.
3339 * tst-fork3.c: New file.
3341 2002-11-28 Ulrich Drepper <drepper@redhat.com>
3343 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
3345 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
3346 require it to 200112L.
3348 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
3349 instruction only if HAVE_CMOV is defined.
3350 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
3352 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
3354 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
3356 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
3358 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
3360 2002-11-27 Ulrich Drepper <drepper@redhat.com>
3362 * sysdeps/x86_64/bits/atomic.h: New file.
3364 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
3367 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
3368 possible since gettid cannot fail.
3370 * sysdeps/x86_64/pthreaddef.h: New file.
3372 * sysdeps/i386/pthreaddef.h (gettid): Removed.
3374 * sysdeps/x86_64/pthread_spin_init.c: New file.
3375 * sysdeps/x86_64/pthread_spin_lock.c: New file.
3376 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
3377 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
3379 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
3380 Add missing lock prefix. Minute optimization.
3382 * tst-spin2.c (main): Also check successful trylock call.
3384 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
3385 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
3387 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
3388 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
3390 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
3391 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
3392 value in case of an error. Add support for INTERNAL_SYSCALL.
3394 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
3395 value in case of an error.
3397 * sysdeps/x86_64/tls.h: New file.
3399 2002-11-26 Ulrich Drepper <drepper@redhat.com>
3401 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
3402 takes the array member name and the index as parameters.
3403 (THREAD_SETMEM_NC): Likewise.
3404 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
3405 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
3408 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
3409 to decide which code to use.
3410 (THREAD_SETMEM_NC): Likewise.
3412 * allocatestack.c (queue_stack): Don't remove stack from list here.
3413 Do it in the caller. Correct condition to prematurely terminate
3414 loop to free stacks.
3415 (__deallocate_stack): Remove stack from list here.
3417 2002-11-26 Ulrich Drepper <drepper@redhat.com>
3419 * Makefile (tests): Add tst-stack1.
3420 * tst-stack1.c: New file.
3422 * allocatestack.c (allocate_stack): Initialize the TCB on a user
3425 * pthread_attr_getstack.c: Return bottom of the thread area.
3427 2002-11-25 Ulrich Drepper <drepper@redhat.com>
3429 * Makefile (libpthread-routines): Add pt-allocrtsig and
3430 pthread_kill_other_threads.
3431 * pt-allocrtsig.c: New file.
3432 * pthread_kill_other_threads.c: New file.
3433 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
3434 all three functions.
3435 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
3437 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
3438 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
3439 and __libc_allocate_rtsig_private.
3440 * Versions (libpthread): Export pthread_kill_other_threads_np,
3441 __libc_current_sigrtmin, and __libc_current_sigrtmax.
3443 2002-11-24 Ulrich Drepper <drepper@redhat.com>
3445 * allocatestack.c (allocate_stack): stackaddr in attribute points to
3446 the end of the stack. Adjust computations.
3447 When mprotect call fails dequeue stack and free it.
3448 * pthread_attr_setstack.c: Store top of the stack in stackaddr
3450 * pthread_getattr_np.c: Likewise.
3452 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
3455 2002-11-23 Ulrich Drepper <drepper@redhat.com>
3457 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
3458 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
3460 2002-11-22 Ulrich Drepper <drepper@redhat.com>
3462 * pthread_getspecific.c: Optimize access to first 2nd-level array.
3463 * pthread_setspecific.c: Likewise.
3465 2002-11-21 Ulrich Drepper <drepper@redhat.com>
3467 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
3468 definitions. Get them from the official place.
3469 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
3471 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
3472 Use new CLONE_ flags in clone() calls.
3474 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
3475 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
3477 * Versions: Add pthread_* functions for libc.
3478 * forward.c: New file.
3480 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
3482 * herrno.c: New file.
3485 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
3486 sem_trywait, and sem_timedwait. Add herrno and res.
3487 * sem_init.c: Don't initialize lock and waiters members.
3488 * sem_open.c: Likewise.
3489 * sem_post.c: Removed.
3490 * sem_wait.c: Removed.
3491 * sem_trywait.c: Removed.
3492 * sem_timedwait.c: Removed.
3493 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
3494 Includes full implementations of sem_post, sem_wait, sem_trywait,
3496 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
3497 for new implementation.
3498 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
3501 * tst-sem3.c: Improve error message.
3502 * tst-signal3.c: Likewise.
3504 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
3505 to tell the kernel about the termination futex and to initialize tid
3506 member. Don't initialize main_thread.
3507 * descr.h (struct pthread): Remove main_thread member.
3508 * cancelllation.c (__do_cancel): Remove code handling main thread.
3509 The main thread is not special anymore.
3511 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
3512 size of the stacks to stack_cache_actsize.
3514 * pt-readv.c: Add missing "defined".
3515 * pt-sigwait.c: Likewise.
3516 * pt-writev.c: Likewise.
3518 2002-11-09 Ulrich Drepper <drepper@redhat.com>
3520 * Versions: Export __connect from libpthread.
3521 Patch by Luca Barbieri <ldb@ldb.ods.org>.
3523 * Makefile (libpthread-routines): Add pt-raise.
3524 * sysdeps/unix/sysv/linux/raise.c: New file.
3525 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
3526 * sysdeps/generic/pt-raise.c: New file.
3528 * pthread_cond_init.c: Initialize all data elements of the condvar
3529 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
3531 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
3532 * pthread_create.c: Likewise.
3534 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
3535 * tst-key1.c: New file.
3536 * tst-key2.c: New file.
3537 * tst-key3.c: New file.
3539 * Versions: Export pthread_detach for version GLIBC_2.0.
3540 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
3542 2002-11-08 Ulrich Drepper <drepper@redhat.com>
3544 * pthread_key_create.c: Terminate search after an unused key was found.
3545 Patch by Luca Barbieri <ldb@ldb.ods.org>.
3547 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
3548 Patch by Luca Barbieri <ldb@ldb.ods.org>.
3550 2002-10-10 Ulrich Drepper <drepper@redhat.com>
3552 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
3553 dynamic lookup for errno in PIC.
3555 * allocatestack.c (get_cached_stack): Rearrange code slightly to
3556 release the stack lock as soon as possible.
3557 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
3558 the static TLS block.
3559 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
3561 * cancellation.c: Renamed from cancelation.c.
3562 * Makefile: Adjust accordingly.
3563 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
3564 * cleanup_defer.c: Use CANCELLATION_P.
3565 * pthread_testcancel.c: Likewise.
3566 * descr.h: Fix spelling in comments.
3568 * pthread_getattr_np.c: Likewise.
3569 * pthread_getschedparam.c: Likewise.
3570 * pthread_setschedparam.c: Likewise.
3571 * Versions: Likewise.
3573 * pt-pselect.c: New file.
3574 * Makefile (libpthread-routines): Add pt-pselect.
3575 * Versions: Add pselect.
3577 * tst-cancel4.c: New file.
3578 * Makefile (tests): Add tst-cancel4.
3580 2002-10-09 Ulrich Drepper <drepper@redhat.com>
3582 * pthread_mutex_lock.c: Always record lock ownership.
3583 * pthread_mutex_timedlock.c: Likewise.
3584 * pthread_mutex_trylock.c: Likewise.
3586 * pt-readv.c: New file.
3587 * pt-writev.c: New file.
3588 * pt-creat.c: New file.
3589 * pt-msgrcv.c: New file.
3590 * pt-msgsnd.c: New file.
3591 * pt-poll.c: New file.
3592 * pt-select.c: New file.
3593 * pt-sigpause.c: New file.
3594 * pt-sigsuspend.c: New file.
3595 * pt-sigwait.c: New file.
3596 * pt-sigwaitinfo.c: New file.
3597 * pt-waitid.c: New file.
3598 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
3599 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
3600 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
3601 * Versions: Add all the new functions.
3603 * tst-exit1.c: New file.
3604 * Makefile (tests): Add tst-exit1.
3606 * sem_timedwait.c: Minor optimization for more optimal fastpath.
3608 2002-10-08 Ulrich Drepper <drepper@redhat.com>
3610 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
3612 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
3613 call. pthread_join is an official cancellation point.
3614 * pthread_timedjoin.c: Likewise.
3616 * pthread_cond_wait.c: Revert order in which internal lock are dropped
3617 and the condvar's mutex are retrieved.
3618 * pthread_cond_timedwait.c: Likewise.
3619 Reported by dice@saros.East.Sun.COM.
3621 2002-10-07 Ulrich Drepper <drepper@redhat.com>
3623 * pthreadP.h: Cut out all type definitions and move them...
3624 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
3625 * pthreadP.h: Include <internaltypes.h>.
3627 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
3630 * sem_trywait.c: Shuffle #includes around to get right order.
3631 * sem_timedwait.c: Likewise.
3632 * sem_post.c: Likewise.
3633 * sem_wait.c: Likewise.
3635 * nptl 0.3 released.
3637 * Makefile (tests): Add tst-signal3.
3638 * tst-signal3.c: New file.
3640 2002-10-05 Ulrich Drepper <drepper@redhat.com>
3642 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
3643 the asms modify the sem object.
3644 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
3646 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
3648 * pthreadP.h (struct sem): New type. Actual semaphore type.
3649 * semaphoreP.h: Include pthreadP.h.
3650 * sem_getvalue.c: Adjust to sem_t change.
3651 * sem_init.c: Likewise.
3652 * sem_open.c: Likewise.
3653 * sem_post.c: Likewise.
3654 * sem_timedwait.c: Likewise.
3655 * sem_trywait.c: Likewise.
3656 * sem_wait.c: Likewise.
3658 2002-10-04 Ulrich Drepper <drepper@redhat.com>
3660 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
3661 * tst-basic2.c: New file.
3662 * tst-exec1.c: New file.
3663 * tst-exec2.c: New file.
3664 * tst-exec3.c: New file.
3666 * tst-fork1.c: Remove extra */.
3668 * nptl 0.2 released. The API for IA-32 is complete.