From 76a50749f7af5935ba3739e815aa6a16ae4440d1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 26 Nov 2002 22:50:54 +0000 Subject: Initial revision 2002-11-26 Ulrich Drepper * allocatestack.c (queue_stack): Don't remove stack from list here. Do it in the caller. Correct condition to prematurely terminate loop to free stacks. (__deallocate_stack): Remove stack from list here. 2002-11-26 Ulrich Drepper * Makefile (tests): Add tst-stack1. * tst-stack1.c: New file. * allocatestack.c (allocate_stack): Initialize the TCB on a user provided stack. * pthread_attr_getstack.c: Return bottom of the thread area. 2002-11-25 Ulrich Drepper * Makefile (libpthread-routines): Add pt-allocrtsig and pthread_kill_other_threads. * pt-allocrtsig.c: New file. * pthread_kill_other_threads.c: New file. * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for all three functions. * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove allocrtsig. * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export __libc_current_sigrtmin_private, __libc_current_sigrtmax_private, and __libc_allocate_rtsig_private. * Versions (libpthread): Export pthread_kill_other_threads_np, __libc_current_sigrtmin, and __libc_current_sigrtmax. 2002-11-24 Ulrich Drepper * allocatestack.c (allocate_stack): stackaddr in attribute points to the end of the stack. Adjust computations. When mprotect call fails dequeue stack and free it. * pthread_attr_setstack.c: Store top of the stack in stackaddr attribute. * pthread_getattr_np.c: Likewise. * descr.h (IS_DETACHED): Add some more parenthesis to prevent surprises. 2002-11-23 Ulrich Drepper * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before attribute definitions. Patch by Luca Barbieri . 2002-11-22 Ulrich Drepper * pthread_getspecific.c: Optimize access to first 2nd-level array. * pthread_setspecific.c: Likewise. 2002-11-21 Ulrich Drepper * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags definitions. Get them from the official place. * sysdeps/unix/sysv/linux/i386/fork.c: Likewise. * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags. Use new CLONE_ flags in clone() calls. * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork. * sysdeps/unix/sysv/linux/i386/fork.c: New file. * Versions: Add pthread_* functions for libc. * forward.c: New file. * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add errno-loc. * herrno.c: New file. * res.c: New file. * Makefile (libpthread-routines): Remove sem_post, sem_wait, sem_trywait, and sem_timedwait. Add herrno and res. * sem_init.c: Don't initialize lock and waiters members. * sem_open.c: Likewise. * sem_post.c: Removed. * sem_wait.c: Removed. * sem_trywait.c: Removed. * sem_timedwait.c: Removed. * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite. Includes full implementations of sem_post, sem_wait, sem_trywait, and sem_timedwait. * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust for new implementation. * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock and waiters fields. * tst-sem3.c: Improve error message. * tst-signal3.c: Likewise. * init.c (__pthread_initialize_minimal): Use set_tid_address syscall to tell the kernel about the termination futex and to initialize tid member. Don't initialize main_thread. * descr.h (struct pthread): Remove main_thread member. * cancelllation.c (__do_cancel): Remove code handling main thread. The main thread is not special anymore. * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add size of the stacks to stack_cache_actsize. * pt-readv.c: Add missing "defined". * pt-sigwait.c: Likewise. * pt-writev.c: Likewise. 2002-11-09 Ulrich Drepper * Versions: Export __connect from libpthread. Patch by Luca Barbieri . * Makefile (libpthread-routines): Add pt-raise. * sysdeps/unix/sysv/linux/raise.c: New file. * sysdeps/unix/sysv/linux/pt-raise.c: New file. * sysdeps/generic/pt-raise.c: New file. * pthread_cond_init.c: Initialize all data elements of the condvar structure. Patch by Luca Barbieri . * pthread_attr_init.c: Actually implement 2.0 compatibility version. * pthread_create.c: Likewise. * Makefile (tests): Add tst-key1, tst-key2, tst-key3. * tst-key1.c: New file. * tst-key2.c: New file. * tst-key3.c: New file. * Versions: Export pthread_detach for version GLIBC_2.0. Reported by Saurabh Desai . 2002-11-08 Ulrich Drepper * pthread_key_create.c: Terminate search after an unused key was found. Patch by Luca Barbieri . * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero. Patch by Luca Barbieri . 2002-10-10 Ulrich Drepper * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic dynamic lookup for errno in PIC. * allocatestack.c (get_cached_stack): Rearrange code slightly to release the stack lock as soon as possible. Call _dl_allocate_tls_init for TCB from the cache to re-initialize the static TLS block. (allocate_stack): Call _dl_allocate_tls_init for user-provided stack. * cancellation.c: Renamed from cancelation.c. * Makefile: Adjust accordingly. * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P. * cleanup_defer.c: Use CANCELLATION_P. * pthread_testcancel.c: Likewise. * descr.h: Fix spelling in comments. * init.c: Likewise. * pthread_getattr_np.c: Likewise. * pthread_getschedparam.c: Likewise. * pthread_setschedparam.c: Likewise. * Versions: Likewise. * pt-pselect.c: New file. * Makefile (libpthread-routines): Add pt-pselect. * Versions: Add pselect. * tst-cancel4.c: New file. * Makefile (tests): Add tst-cancel4. 2002-10-09 Ulrich Drepper * pthread_mutex_lock.c: Always record lock ownership. * pthread_mutex_timedlock.c: Likewise. * pthread_mutex_trylock.c: Likewise. * pt-readv.c: New file. * pt-writev.c: New file. * pt-creat.c: New file. * pt-msgrcv.c: New file. * pt-msgsnd.c: New file. * pt-poll.c: New file. * pt-select.c: New file. * pt-sigpause.c: New file. * pt-sigsuspend.c: New file. * pt-sigwait.c: New file. * pt-sigwaitinfo.c: New file. * pt-waitid.c: New file. * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat, pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend, pt-sigwait, pt-sigwaitinfo, and pt-waitid. * Versions: Add all the new functions. * tst-exit1.c: New file. * Makefile (tests): Add tst-exit1. * sem_timedwait.c: Minor optimization for more optimal fastpath. 2002-10-08 Ulrich Drepper * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW. * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid call. pthread_join is an official cancellation point. * pthread_timedjoin.c: Likewise. * pthread_cond_wait.c: Revert order in which internal lock are dropped and the condvar's mutex are retrieved. * pthread_cond_timedwait.c: Likewise. Reported by dice@saros.East.Sun.COM. 2002-10-07 Ulrich Drepper * pthreadP.h: Cut out all type definitions and move them... * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file. * pthreadP.h: Include . * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little performance tweaks. * sem_trywait.c: Shuffle #includes around to get right order. * sem_timedwait.c: Likewise. * sem_post.c: Likewise. * sem_wait.c: Likewise. * nptl 0.3 released. * Makefile (tests): Add tst-signal3. * tst-signal3.c: New file. 2002-10-05 Ulrich Drepper * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that the asms modify the sem object. (__lll_sem_timedwait): Now takes struct sem* as first parameter. * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose the actual members. * pthreadP.h (struct sem): New type. Actual semaphore type. * semaphoreP.h: Include pthreadP.h. * sem_getvalue.c: Adjust to sem_t change. * sem_init.c: Likewise. * sem_open.c: Likewise. * sem_post.c: Likewise. * sem_timedwait.c: Likewise. * sem_trywait.c: Likewise. * sem_wait.c: Likewise. 2002-10-04 Ulrich Drepper * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3. * tst-basic2.c: New file. * tst-exec1.c: New file. * tst-exec2.c: New file. * tst-exec3.c: New file. * tst-fork1.c: Remove extra */. * nptl 0.2 released. The API for IA-32 is complete. --- nptl/ANNOUNCE | 92 +++ nptl/Banner | 1 + nptl/ChangeLog | 259 +++++++ nptl/DESIGN-barrier.txt | 49 ++ nptl/DESIGN-condvar.txt | 90 +++ nptl/DESIGN-rwlock.txt | 109 +++ nptl/DESIGN-sem-old.txt | 67 ++ nptl/DESIGN-sem.txt | 45 ++ nptl/Makeconfig | 30 + nptl/Makefile | 226 +++++++ nptl/TODO | 24 + nptl/TODO-kernel | 26 + nptl/Versions | 205 ++++++ nptl/alloca_cutoff.c | 36 + nptl/allocatestack.c | 507 ++++++++++++++ nptl/atomic.h | 109 +++ nptl/cancellation.c | 92 +++ nptl/cleanup.c | 63 ++ nptl/cleanup_defer.c | 86 +++ nptl/configure | 5 + nptl/descr.h | 179 +++++ nptl/events.c | 32 + nptl/flockfile.c | 31 + nptl/forward.c | 151 +++++ nptl/ftrylockfile.c | 31 + nptl/funlockfile.c | 31 + nptl/herrno.c | 36 + nptl/init.c | 172 +++++ nptl/old_pthread_atfork.c | 27 + nptl/perf.c | 749 +++++++++++++++++++++ nptl/pt-accept.c | 40 ++ nptl/pt-allocrtsig.c | 50 ++ nptl/pt-close.c | 45 ++ nptl/pt-connect.c | 41 ++ nptl/pt-creat.c | 45 ++ nptl/pt-fcntl.c | 54 ++ nptl/pt-fsync.c | 44 ++ nptl/pt-longjmp.c | 65 ++ nptl/pt-lseek.c | 45 ++ nptl/pt-lseek64.c | 40 ++ nptl/pt-msgrcv.c | 40 ++ nptl/pt-msgsnd.c | 46 ++ nptl/pt-msync.c | 44 ++ nptl/pt-nanosleep.c | 45 ++ nptl/pt-open.c | 53 ++ nptl/pt-open64.c | 54 ++ nptl/pt-pause.c | 40 ++ nptl/pt-poll.c | 44 ++ nptl/pt-pread.c | 40 ++ nptl/pt-pread64.c | 41 ++ nptl/pt-pselect.c | 41 ++ nptl/pt-pwrite.c | 40 ++ nptl/pt-pwrite64.c | 41 ++ nptl/pt-read.c | 45 ++ nptl/pt-readv.c | 58 ++ nptl/pt-recv.c | 40 ++ nptl/pt-recvfrom.c | 41 ++ nptl/pt-recvmsg.c | 40 ++ nptl/pt-select.c | 46 ++ nptl/pt-send.c | 41 ++ nptl/pt-sendmsg.c | 40 ++ nptl/pt-sendto.c | 41 ++ nptl/pt-siglongjmp.c | 32 + nptl/pt-sigpause.c | 41 ++ nptl/pt-sigsuspend.c | 44 ++ nptl/pt-sigtimedwait.c | 45 ++ nptl/pt-sigwait.c | 60 ++ nptl/pt-sigwaitinfo.c | 44 ++ nptl/pt-system.c | 40 ++ nptl/pt-tcdrain.c | 40 ++ nptl/pt-wait.c | 41 ++ nptl/pt-waitid.c | 41 ++ nptl/pt-waitpid.c | 40 ++ nptl/pt-write.c | 45 ++ nptl/pt-writev.c | 58 ++ nptl/pthreadP.h | 182 +++++ nptl/pthread_atfork.c | 46 ++ nptl/pthread_attr_destroy.c | 66 ++ nptl/pthread_attr_getdetachstate.c | 38 ++ nptl/pthread_attr_getguardsize.c | 37 + nptl/pthread_attr_getinheritsched.c | 39 ++ nptl/pthread_attr_getschedparam.c | 39 ++ nptl/pthread_attr_getschedpolicy.c | 38 ++ nptl/pthread_attr_getscope.c | 39 ++ nptl/pthread_attr_getstack.c | 41 ++ nptl/pthread_attr_getstackaddr.c | 49 ++ nptl/pthread_attr_getstacksize.c | 40 ++ nptl/pthread_attr_init.c | 97 +++ nptl/pthread_attr_setdetachstate.c | 47 ++ nptl/pthread_attr_setguardsize.c | 40 ++ nptl/pthread_attr_setinheritsched.c | 46 ++ nptl/pthread_attr_setschedparam.c | 49 ++ nptl/pthread_attr_setschedpolicy.c | 43 ++ nptl/pthread_attr_setscope.c | 50 ++ nptl/pthread_attr_setstack.c | 47 ++ nptl/pthread_attr_setstackaddr.c | 43 ++ nptl/pthread_attr_setstacksize.c | 44 ++ nptl/pthread_barrier_destroy.c | 44 ++ nptl/pthread_barrier_init.c | 57 ++ nptl/pthread_barrierattr_destroy.c | 30 + nptl/pthread_barrierattr_getpshared.c | 31 + nptl/pthread_barrierattr_init.c | 30 + nptl/pthread_barrierattr_setpshared.c | 40 ++ nptl/pthread_cancel.c | 62 ++ nptl/pthread_clock_gettime.c | 46 ++ nptl/pthread_clock_settime.c | 32 + nptl/pthread_cond_broadcast.c | 30 + nptl/pthread_cond_destroy.c | 29 + nptl/pthread_cond_init.c | 37 + nptl/pthread_cond_signal.c | 30 + nptl/pthread_cond_timedwait.c | 71 ++ nptl/pthread_cond_wait.c | 66 ++ nptl/pthread_condattr_destroy.c | 29 + nptl/pthread_condattr_getpshared.c | 31 + nptl/pthread_condattr_init.c | 31 + nptl/pthread_condattr_setpshared.c | 30 + nptl/pthread_create.c | 419 ++++++++++++ nptl/pthread_detach.c | 51 ++ nptl/pthread_equal.c | 29 + nptl/pthread_exit.c | 31 + nptl/pthread_getattr_np.c | 65 ++ nptl/pthread_getconcurrency.c | 27 + nptl/pthread_getschedparam.c | 51 ++ nptl/pthread_getspecific.c | 68 ++ nptl/pthread_join.c | 100 +++ nptl/pthread_key_create.c | 68 ++ nptl/pthread_key_delete.c | 43 ++ nptl/pthread_kill_other_threads.c | 37 + nptl/pthread_mutex_destroy.c | 29 + nptl/pthread_mutex_init.c | 55 ++ nptl/pthread_mutex_lock.c | 77 +++ nptl/pthread_mutex_timedlock.c | 88 +++ nptl/pthread_mutex_trylock.c | 70 ++ nptl/pthread_mutex_unlock.c | 65 ++ nptl/pthread_mutexattr_destroy.c | 29 + nptl/pthread_mutexattr_getpshared.c | 38 ++ nptl/pthread_mutexattr_gettype.c | 38 ++ nptl/pthread_mutexattr_init.c | 38 ++ nptl/pthread_mutexattr_setpshared.c | 45 ++ nptl/pthread_mutexattr_settype.c | 43 ++ nptl/pthread_rwlock_destroy.c | 30 + nptl/pthread_rwlock_init.c | 51 ++ nptl/pthread_rwlock_tryrdlock.c | 50 ++ nptl/pthread_rwlock_trywrlock.c | 43 ++ nptl/pthread_rwlockattr_destroy.c | 30 + nptl/pthread_rwlockattr_getkind_np.c | 31 + nptl/pthread_rwlockattr_getpshared.c | 31 + nptl/pthread_rwlockattr_init.c | 35 + nptl/pthread_rwlockattr_setkind_np.c | 41 ++ nptl/pthread_rwlockattr_setpshared.c | 40 ++ nptl/pthread_self.c | 28 + nptl/pthread_setcancelstate.c | 68 ++ nptl/pthread_setcanceltype.c | 71 ++ nptl/pthread_setconcurrency.c | 37 + nptl/pthread_setschedparam.c | 59 ++ nptl/pthread_setspecific.c | 91 +++ nptl/pthread_testcancel.c | 28 + nptl/pthread_timedjoin.c | 108 +++ nptl/pthread_tryjoin.c | 75 +++ nptl/res.c | 33 + nptl/sem_close.c | 29 + nptl/sem_destroy.c | 34 + nptl/sem_getvalue.c | 38 ++ nptl/sem_init.c | 51 ++ nptl/sem_open.c | 258 +++++++ nptl/sem_unlink.c | 64 ++ nptl/semaphore.h | 74 ++ nptl/semaphoreP.h | 46 ++ nptl/shlib-versions | 9 + nptl/sockperf.c | 594 ++++++++++++++++ nptl/sysdeps/generic/lowlevellock.h | 89 +++ nptl/sysdeps/generic/pt-raise.c | 30 + nptl/sysdeps/i386/i686/bits/atomic.h | 340 ++++++++++ nptl/sysdeps/i386/i686/pthread_spin_trylock.S | 34 + nptl/sysdeps/i386/i686/tls.h | 36 + nptl/sysdeps/i386/pthread_sigmask.c | 34 + nptl/sysdeps/i386/pthread_spin_destroy.c | 29 + nptl/sysdeps/i386/pthread_spin_init.c | 20 + nptl/sysdeps/i386/pthread_spin_lock.c | 48 ++ nptl/sysdeps/i386/pthread_spin_unlock.S | 32 + nptl/sysdeps/i386/pthreaddef.h | 55 ++ nptl/sysdeps/i386/tls.h | 332 +++++++++ nptl/sysdeps/pthread/Makefile | 33 + nptl/sysdeps/pthread/Subdirs | 1 + nptl/sysdeps/pthread/allocalim.h | 29 + nptl/sysdeps/pthread/bits/libc-lock.h | 335 +++++++++ nptl/sysdeps/pthread/bits/sigthread.h | 38 ++ nptl/sysdeps/pthread/list.h | 116 ++++ nptl/sysdeps/pthread/posix-timer.h | 210 ++++++ nptl/sysdeps/pthread/pt-initfini.c | 124 ++++ nptl/sysdeps/pthread/pthread.h | 743 ++++++++++++++++++++ nptl/sysdeps/pthread/pthread_getcpuclockid.c | 43 ++ nptl/sysdeps/pthread/pthread_once.c | 54 ++ nptl/sysdeps/pthread/pthread_sigmask.c | 44 ++ nptl/sysdeps/pthread/sigaction.c | 24 + nptl/sysdeps/pthread/timer_create.c | 179 +++++ nptl/sysdeps/pthread/timer_delete.c | 70 ++ nptl/sysdeps/pthread/timer_getoverr.c | 45 ++ nptl/sysdeps/pthread/timer_gettime.c | 71 ++ nptl/sysdeps/pthread/timer_routines.c | 592 ++++++++++++++++ nptl/sysdeps/pthread/timer_settime.c | 137 ++++ nptl/sysdeps/pthread/tst-timer.c | 114 ++++ nptl/sysdeps/unix/sysv/linux/Implies | 1 + nptl/sysdeps/unix/sysv/linux/Makefile | 24 + nptl/sysdeps/unix/sysv/linux/Versions | 12 + nptl/sysdeps/unix/sysv/linux/allocrtsig.c | 54 ++ nptl/sysdeps/unix/sysv/linux/bits/local_lim.h | 80 +++ nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h | 144 ++++ nptl/sysdeps/unix/sysv/linux/configure | 3 + nptl/sysdeps/unix/sysv/linux/fork-gen.c | 37 + nptl/sysdeps/unix/sysv/linux/fork.c | 124 ++++ nptl/sysdeps/unix/sysv/linux/fork.h | 60 ++ .../unix/sysv/linux/i386/bits/pthreadtypes.h | 150 +++++ nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h | 39 ++ nptl/sysdeps/unix/sysv/linux/i386/createthread.c | 146 ++++ nptl/sysdeps/unix/sysv/linux/i386/fork.c | 31 + .../unix/sysv/linux/i386/i486/lowlevelcond.S | 279 ++++++++ .../unix/sysv/linux/i386/i486/lowlevellock.S | 180 +++++ .../unix/sysv/linux/i386/i486/lowlevelmutex.S | 176 +++++ .../unix/sysv/linux/i386/i486/lowlevelrwlock.S | 566 ++++++++++++++++ .../unix/sysv/linux/i386/i486/lowlevelsem.S | 311 +++++++++ .../sysv/linux/i386/i486/pthread_barrier_wait.S | 122 ++++ .../unix/sysv/linux/i386/i586/lowlevelcond.S | 20 + .../unix/sysv/linux/i386/i586/lowlevellock.S | 20 + .../unix/sysv/linux/i386/i586/lowlevelmutex.S | 20 + .../unix/sysv/linux/i386/i586/lowlevelrwlock.S | 20 + .../unix/sysv/linux/i386/i586/lowlevelsem.S | 20 + .../sysv/linux/i386/i586/pthread_barrier_wait.S | 20 + .../unix/sysv/linux/i386/i686/lowlevelcond.S | 20 + .../unix/sysv/linux/i386/i686/lowlevellock.S | 20 + .../unix/sysv/linux/i386/i686/lowlevelmutex.S | 20 + .../unix/sysv/linux/i386/i686/lowlevelrwlock.S | 20 + .../unix/sysv/linux/i386/i686/lowlevelsem.S | 20 + .../sysv/linux/i386/i686/pthread_barrier_wait.S | 20 + nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h | 257 +++++++ nptl/sysdeps/unix/sysv/linux/i386/lowlevelsem.h | 101 +++ nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S | 49 ++ nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S | 171 +++++ nptl/sysdeps/unix/sysv/linux/internaltypes.h | 130 ++++ nptl/sysdeps/unix/sysv/linux/jmp-unwind.c | 33 + nptl/sysdeps/unix/sysv/linux/pt-fork.c | 28 + nptl/sysdeps/unix/sysv/linux/pt-raise.c | 31 + nptl/sysdeps/unix/sysv/linux/pthread_kill.c | 36 + nptl/sysdeps/unix/sysv/linux/pthread_yield.c | 30 + nptl/sysdeps/unix/sysv/linux/raise.c | 39 ++ nptl/sysdeps/unix/sysv/linux/register-atfork.c | 87 +++ nptl/sysdeps/unix/sysv/linux/unregister-atfork.c | 49 ++ nptl/tst-atfork1.c | 112 +++ nptl/tst-barrier1.c | 71 ++ nptl/tst-barrier2.c | 182 +++++ nptl/tst-barrier3.c | 154 +++++ nptl/tst-basic1.c | 70 ++ nptl/tst-basic2.c | 95 +++ nptl/tst-cancel1.c | 150 +++++ nptl/tst-cancel2.c | 100 +++ nptl/tst-cancel3.c | 98 +++ nptl/tst-cancel4.c | 461 +++++++++++++ nptl/tst-cond1.c | 94 +++ nptl/tst-cond2.c | 118 ++++ nptl/tst-cond3.c | 113 ++++ nptl/tst-cond4.c | 237 +++++++ nptl/tst-cond5.c | 106 +++ nptl/tst-cond6.c | 233 +++++++ nptl/tst-exec1.c | 160 +++++ nptl/tst-exec2.c | 155 +++++ nptl/tst-exec3.c | 153 +++++ nptl/tst-exit1.c | 83 +++ nptl/tst-flock1.c | 93 +++ nptl/tst-flock2.c | 260 +++++++ nptl/tst-fork1.c | 101 +++ nptl/tst-join1.c | 83 +++ nptl/tst-join2.c | 104 +++ nptl/tst-join3.c | 123 ++++ nptl/tst-key1.c | 89 +++ nptl/tst-key2.c | 115 ++++ nptl/tst-key3.c | 156 +++++ nptl/tst-mutex1.c | 57 ++ nptl/tst-mutex2.c | 100 +++ nptl/tst-mutex3.c | 89 +++ nptl/tst-mutex4.c | 187 +++++ nptl/tst-mutex5.c | 118 ++++ nptl/tst-mutex6.c | 55 ++ nptl/tst-mutex7.c | 97 +++ nptl/tst-once1.c | 51 ++ nptl/tst-once2.c | 85 +++ nptl/tst-rwlock1.c | 117 ++++ nptl/tst-rwlock2.c | 143 ++++ nptl/tst-rwlock3.c | 93 +++ nptl/tst-rwlock4.c | 187 +++++ nptl/tst-rwlock5.c | 87 +++ nptl/tst-rwlock6.c | 161 +++++ nptl/tst-rwlock7.c | 161 +++++ nptl/tst-sem1.c | 89 +++ nptl/tst-sem2.c | 54 ++ nptl/tst-sem3.c | 142 ++++ nptl/tst-sem4.c | 147 ++++ nptl/tst-sem5.c | 80 +++ nptl/tst-signal1.c | 189 ++++++ nptl/tst-signal2.c | 197 ++++++ nptl/tst-signal3.c | 240 +++++++ nptl/tst-spin1.c | 57 ++ nptl/tst-spin2.c | 142 ++++ nptl/tst-spin3.c | 55 ++ nptl/tst-stack1.c | 144 ++++ nptl/tst-tsd1.c | 118 ++++ nptl/tst-tsd2.c | 97 +++ nptl/tst-unload.c | 45 ++ nptl_db/Makefile | 57 ++ nptl_db/Versions | 21 + nptl_db/proc_service.h | 73 ++ nptl_db/shlib-versions | 2 + nptl_db/td_init.c | 32 + nptl_db/td_log.c | 32 + nptl_db/td_symbol_list.c | 55 ++ nptl_db/td_ta_clear_event.c | 52 ++ nptl_db/td_ta_delete.c | 42 ++ nptl_db/td_ta_enable_stats.c | 35 + nptl_db/td_ta_event_addr.c | 69 ++ nptl_db/td_ta_event_getmsg.c | 85 +++ nptl_db/td_ta_get_nthreads.c | 41 ++ nptl_db/td_ta_get_ph.c | 36 + nptl_db/td_ta_get_stats.c | 35 + nptl_db/td_ta_map_id2thr.c | 38 ++ nptl_db/td_ta_map_lwp2thr.c | 43 ++ nptl_db/td_ta_new.c | 115 ++++ nptl_db/td_ta_reset_stats.c | 35 + nptl_db/td_ta_set_event.c | 52 ++ nptl_db/td_ta_setconcurrency.c | 35 + nptl_db/td_ta_thr_iter.c | 125 ++++ nptl_db/td_ta_tsd_iter.c | 53 ++ nptl_db/td_thr_clear_event.c | 54 ++ nptl_db/td_thr_dbresume.c | 30 + nptl_db/td_thr_dbsuspend.c | 30 + nptl_db/td_thr_event_enable.c | 41 ++ nptl_db/td_thr_event_getmsg.c | 60 ++ nptl_db/td_thr_get_info.c | 64 ++ nptl_db/td_thr_getfpregs.c | 52 ++ nptl_db/td_thr_getgregs.c | 52 ++ nptl_db/td_thr_getxregs.c | 30 + nptl_db/td_thr_getxregsize.c | 30 + nptl_db/td_thr_set_event.c | 54 ++ nptl_db/td_thr_setfpregs.c | 49 ++ nptl_db/td_thr_setgregs.c | 49 ++ nptl_db/td_thr_setprio.c | 30 + nptl_db/td_thr_setsigpending.c | 31 + nptl_db/td_thr_setxregs.c | 30 + nptl_db/td_thr_sigsetmask.c | 30 + nptl_db/td_thr_tls_get_addr.c | 70 ++ nptl_db/td_thr_tsd.c | 71 ++ nptl_db/td_thr_validate.c | 66 ++ nptl_db/thread_db.h | 451 +++++++++++++ nptl_db/thread_dbP.h | 98 +++ 352 files changed, 29447 insertions(+) create mode 100644 nptl/ANNOUNCE create mode 100644 nptl/Banner create mode 100644 nptl/ChangeLog create mode 100644 nptl/DESIGN-barrier.txt create mode 100644 nptl/DESIGN-condvar.txt create mode 100644 nptl/DESIGN-rwlock.txt create mode 100644 nptl/DESIGN-sem-old.txt create mode 100644 nptl/DESIGN-sem.txt create mode 100644 nptl/Makeconfig create mode 100644 nptl/Makefile create mode 100644 nptl/TODO create mode 100644 nptl/TODO-kernel create mode 100644 nptl/Versions create mode 100644 nptl/alloca_cutoff.c create mode 100644 nptl/allocatestack.c create mode 100644 nptl/atomic.h create mode 100644 nptl/cancellation.c create mode 100644 nptl/cleanup.c create mode 100644 nptl/cleanup_defer.c create mode 100644 nptl/configure create mode 100644 nptl/descr.h create mode 100644 nptl/events.c create mode 100644 nptl/flockfile.c create mode 100644 nptl/forward.c create mode 100644 nptl/ftrylockfile.c create mode 100644 nptl/funlockfile.c create mode 100644 nptl/herrno.c create mode 100644 nptl/init.c create mode 100644 nptl/old_pthread_atfork.c create mode 100644 nptl/perf.c create mode 100644 nptl/pt-accept.c create mode 100644 nptl/pt-allocrtsig.c create mode 100644 nptl/pt-close.c create mode 100644 nptl/pt-connect.c create mode 100644 nptl/pt-creat.c create mode 100644 nptl/pt-fcntl.c create mode 100644 nptl/pt-fsync.c create mode 100644 nptl/pt-longjmp.c create mode 100644 nptl/pt-lseek.c create mode 100644 nptl/pt-lseek64.c create mode 100644 nptl/pt-msgrcv.c create mode 100644 nptl/pt-msgsnd.c create mode 100644 nptl/pt-msync.c create mode 100644 nptl/pt-nanosleep.c create mode 100644 nptl/pt-open.c create mode 100644 nptl/pt-open64.c create mode 100644 nptl/pt-pause.c create mode 100644 nptl/pt-poll.c create mode 100644 nptl/pt-pread.c create mode 100644 nptl/pt-pread64.c create mode 100644 nptl/pt-pselect.c create mode 100644 nptl/pt-pwrite.c create mode 100644 nptl/pt-pwrite64.c create mode 100644 nptl/pt-read.c create mode 100644 nptl/pt-readv.c create mode 100644 nptl/pt-recv.c create mode 100644 nptl/pt-recvfrom.c create mode 100644 nptl/pt-recvmsg.c create mode 100644 nptl/pt-select.c create mode 100644 nptl/pt-send.c create mode 100644 nptl/pt-sendmsg.c create mode 100644 nptl/pt-sendto.c create mode 100644 nptl/pt-siglongjmp.c create mode 100644 nptl/pt-sigpause.c create mode 100644 nptl/pt-sigsuspend.c create mode 100644 nptl/pt-sigtimedwait.c create mode 100644 nptl/pt-sigwait.c create mode 100644 nptl/pt-sigwaitinfo.c create mode 100644 nptl/pt-system.c create mode 100644 nptl/pt-tcdrain.c create mode 100644 nptl/pt-wait.c create mode 100644 nptl/pt-waitid.c create mode 100644 nptl/pt-waitpid.c create mode 100644 nptl/pt-write.c create mode 100644 nptl/pt-writev.c create mode 100644 nptl/pthreadP.h create mode 100644 nptl/pthread_atfork.c create mode 100644 nptl/pthread_attr_destroy.c create mode 100644 nptl/pthread_attr_getdetachstate.c create mode 100644 nptl/pthread_attr_getguardsize.c create mode 100644 nptl/pthread_attr_getinheritsched.c create mode 100644 nptl/pthread_attr_getschedparam.c create mode 100644 nptl/pthread_attr_getschedpolicy.c create mode 100644 nptl/pthread_attr_getscope.c create mode 100644 nptl/pthread_attr_getstack.c create mode 100644 nptl/pthread_attr_getstackaddr.c create mode 100644 nptl/pthread_attr_getstacksize.c create mode 100644 nptl/pthread_attr_init.c create mode 100644 nptl/pthread_attr_setdetachstate.c create mode 100644 nptl/pthread_attr_setguardsize.c create mode 100644 nptl/pthread_attr_setinheritsched.c create mode 100644 nptl/pthread_attr_setschedparam.c create mode 100644 nptl/pthread_attr_setschedpolicy.c create mode 100644 nptl/pthread_attr_setscope.c create mode 100644 nptl/pthread_attr_setstack.c create mode 100644 nptl/pthread_attr_setstackaddr.c create mode 100644 nptl/pthread_attr_setstacksize.c create mode 100644 nptl/pthread_barrier_destroy.c create mode 100644 nptl/pthread_barrier_init.c create mode 100644 nptl/pthread_barrierattr_destroy.c create mode 100644 nptl/pthread_barrierattr_getpshared.c create mode 100644 nptl/pthread_barrierattr_init.c create mode 100644 nptl/pthread_barrierattr_setpshared.c create mode 100644 nptl/pthread_cancel.c create mode 100644 nptl/pthread_clock_gettime.c create mode 100644 nptl/pthread_clock_settime.c create mode 100644 nptl/pthread_cond_broadcast.c create mode 100644 nptl/pthread_cond_destroy.c create mode 100644 nptl/pthread_cond_init.c create mode 100644 nptl/pthread_cond_signal.c create mode 100644 nptl/pthread_cond_timedwait.c create mode 100644 nptl/pthread_cond_wait.c create mode 100644 nptl/pthread_condattr_destroy.c create mode 100644 nptl/pthread_condattr_getpshared.c create mode 100644 nptl/pthread_condattr_init.c create mode 100644 nptl/pthread_condattr_setpshared.c create mode 100644 nptl/pthread_create.c create mode 100644 nptl/pthread_detach.c create mode 100644 nptl/pthread_equal.c create mode 100644 nptl/pthread_exit.c create mode 100644 nptl/pthread_getattr_np.c create mode 100644 nptl/pthread_getconcurrency.c create mode 100644 nptl/pthread_getschedparam.c create mode 100644 nptl/pthread_getspecific.c create mode 100644 nptl/pthread_join.c create mode 100644 nptl/pthread_key_create.c create mode 100644 nptl/pthread_key_delete.c create mode 100644 nptl/pthread_kill_other_threads.c create mode 100644 nptl/pthread_mutex_destroy.c create mode 100644 nptl/pthread_mutex_init.c create mode 100644 nptl/pthread_mutex_lock.c create mode 100644 nptl/pthread_mutex_timedlock.c create mode 100644 nptl/pthread_mutex_trylock.c create mode 100644 nptl/pthread_mutex_unlock.c create mode 100644 nptl/pthread_mutexattr_destroy.c create mode 100644 nptl/pthread_mutexattr_getpshared.c create mode 100644 nptl/pthread_mutexattr_gettype.c create mode 100644 nptl/pthread_mutexattr_init.c create mode 100644 nptl/pthread_mutexattr_setpshared.c create mode 100644 nptl/pthread_mutexattr_settype.c create mode 100644 nptl/pthread_rwlock_destroy.c create mode 100644 nptl/pthread_rwlock_init.c create mode 100644 nptl/pthread_rwlock_tryrdlock.c create mode 100644 nptl/pthread_rwlock_trywrlock.c create mode 100644 nptl/pthread_rwlockattr_destroy.c create mode 100644 nptl/pthread_rwlockattr_getkind_np.c create mode 100644 nptl/pthread_rwlockattr_getpshared.c create mode 100644 nptl/pthread_rwlockattr_init.c create mode 100644 nptl/pthread_rwlockattr_setkind_np.c create mode 100644 nptl/pthread_rwlockattr_setpshared.c create mode 100644 nptl/pthread_self.c create mode 100644 nptl/pthread_setcancelstate.c create mode 100644 nptl/pthread_setcanceltype.c create mode 100644 nptl/pthread_setconcurrency.c create mode 100644 nptl/pthread_setschedparam.c create mode 100644 nptl/pthread_setspecific.c create mode 100644 nptl/pthread_testcancel.c create mode 100644 nptl/pthread_timedjoin.c create mode 100644 nptl/pthread_tryjoin.c create mode 100644 nptl/res.c create mode 100644 nptl/sem_close.c create mode 100644 nptl/sem_destroy.c create mode 100644 nptl/sem_getvalue.c create mode 100644 nptl/sem_init.c create mode 100644 nptl/sem_open.c create mode 100644 nptl/sem_unlink.c create mode 100644 nptl/semaphore.h create mode 100644 nptl/semaphoreP.h create mode 100644 nptl/shlib-versions create mode 100644 nptl/sockperf.c create mode 100644 nptl/sysdeps/generic/lowlevellock.h create mode 100644 nptl/sysdeps/generic/pt-raise.c create mode 100644 nptl/sysdeps/i386/i686/bits/atomic.h create mode 100644 nptl/sysdeps/i386/i686/pthread_spin_trylock.S create mode 100644 nptl/sysdeps/i386/i686/tls.h create mode 100644 nptl/sysdeps/i386/pthread_sigmask.c create mode 100644 nptl/sysdeps/i386/pthread_spin_destroy.c create mode 100644 nptl/sysdeps/i386/pthread_spin_init.c create mode 100644 nptl/sysdeps/i386/pthread_spin_lock.c create mode 100644 nptl/sysdeps/i386/pthread_spin_unlock.S create mode 100644 nptl/sysdeps/i386/pthreaddef.h create mode 100644 nptl/sysdeps/i386/tls.h create mode 100644 nptl/sysdeps/pthread/Makefile create mode 100644 nptl/sysdeps/pthread/Subdirs create mode 100644 nptl/sysdeps/pthread/allocalim.h create mode 100644 nptl/sysdeps/pthread/bits/libc-lock.h create mode 100644 nptl/sysdeps/pthread/bits/sigthread.h create mode 100644 nptl/sysdeps/pthread/list.h create mode 100644 nptl/sysdeps/pthread/posix-timer.h create mode 100644 nptl/sysdeps/pthread/pt-initfini.c create mode 100644 nptl/sysdeps/pthread/pthread.h create mode 100644 nptl/sysdeps/pthread/pthread_getcpuclockid.c create mode 100644 nptl/sysdeps/pthread/pthread_once.c create mode 100644 nptl/sysdeps/pthread/pthread_sigmask.c create mode 100644 nptl/sysdeps/pthread/sigaction.c create mode 100644 nptl/sysdeps/pthread/timer_create.c create mode 100644 nptl/sysdeps/pthread/timer_delete.c create mode 100644 nptl/sysdeps/pthread/timer_getoverr.c create mode 100644 nptl/sysdeps/pthread/timer_gettime.c create mode 100644 nptl/sysdeps/pthread/timer_routines.c create mode 100644 nptl/sysdeps/pthread/timer_settime.c create mode 100644 nptl/sysdeps/pthread/tst-timer.c create mode 100644 nptl/sysdeps/unix/sysv/linux/Implies create mode 100644 nptl/sysdeps/unix/sysv/linux/Makefile create mode 100644 nptl/sysdeps/unix/sysv/linux/Versions create mode 100644 nptl/sysdeps/unix/sysv/linux/allocrtsig.c create mode 100644 nptl/sysdeps/unix/sysv/linux/bits/local_lim.h create mode 100644 nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h create mode 100644 nptl/sysdeps/unix/sysv/linux/configure create mode 100644 nptl/sysdeps/unix/sysv/linux/fork-gen.c create mode 100644 nptl/sysdeps/unix/sysv/linux/fork.c create mode 100644 nptl/sysdeps/unix/sysv/linux/fork.h create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/createthread.c create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/fork.c create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/i586/lowlevellock.S create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_barrier_wait.S create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/i686/lowlevellock.S create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_barrier_wait.S create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/lowlevelsem.h create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S create mode 100644 nptl/sysdeps/unix/sysv/linux/internaltypes.h create mode 100644 nptl/sysdeps/unix/sysv/linux/jmp-unwind.c create mode 100644 nptl/sysdeps/unix/sysv/linux/pt-fork.c create mode 100644 nptl/sysdeps/unix/sysv/linux/pt-raise.c create mode 100644 nptl/sysdeps/unix/sysv/linux/pthread_kill.c create mode 100644 nptl/sysdeps/unix/sysv/linux/pthread_yield.c create mode 100644 nptl/sysdeps/unix/sysv/linux/raise.c create mode 100644 nptl/sysdeps/unix/sysv/linux/register-atfork.c create mode 100644 nptl/sysdeps/unix/sysv/linux/unregister-atfork.c create mode 100644 nptl/tst-atfork1.c create mode 100644 nptl/tst-barrier1.c create mode 100644 nptl/tst-barrier2.c create mode 100644 nptl/tst-barrier3.c create mode 100644 nptl/tst-basic1.c create mode 100644 nptl/tst-basic2.c create mode 100644 nptl/tst-cancel1.c create mode 100644 nptl/tst-cancel2.c create mode 100644 nptl/tst-cancel3.c create mode 100644 nptl/tst-cancel4.c create mode 100644 nptl/tst-cond1.c create mode 100644 nptl/tst-cond2.c create mode 100644 nptl/tst-cond3.c create mode 100644 nptl/tst-cond4.c create mode 100644 nptl/tst-cond5.c create mode 100644 nptl/tst-cond6.c create mode 100644 nptl/tst-exec1.c create mode 100644 nptl/tst-exec2.c create mode 100644 nptl/tst-exec3.c create mode 100644 nptl/tst-exit1.c create mode 100644 nptl/tst-flock1.c create mode 100644 nptl/tst-flock2.c create mode 100644 nptl/tst-fork1.c create mode 100644 nptl/tst-join1.c create mode 100644 nptl/tst-join2.c create mode 100644 nptl/tst-join3.c create mode 100644 nptl/tst-key1.c create mode 100644 nptl/tst-key2.c create mode 100644 nptl/tst-key3.c create mode 100644 nptl/tst-mutex1.c create mode 100644 nptl/tst-mutex2.c create mode 100644 nptl/tst-mutex3.c create mode 100644 nptl/tst-mutex4.c create mode 100644 nptl/tst-mutex5.c create mode 100644 nptl/tst-mutex6.c create mode 100644 nptl/tst-mutex7.c create mode 100644 nptl/tst-once1.c create mode 100644 nptl/tst-once2.c create mode 100644 nptl/tst-rwlock1.c create mode 100644 nptl/tst-rwlock2.c create mode 100644 nptl/tst-rwlock3.c create mode 100644 nptl/tst-rwlock4.c create mode 100644 nptl/tst-rwlock5.c create mode 100644 nptl/tst-rwlock6.c create mode 100644 nptl/tst-rwlock7.c create mode 100644 nptl/tst-sem1.c create mode 100644 nptl/tst-sem2.c create mode 100644 nptl/tst-sem3.c create mode 100644 nptl/tst-sem4.c create mode 100644 nptl/tst-sem5.c create mode 100644 nptl/tst-signal1.c create mode 100644 nptl/tst-signal2.c create mode 100644 nptl/tst-signal3.c create mode 100644 nptl/tst-spin1.c create mode 100644 nptl/tst-spin2.c create mode 100644 nptl/tst-spin3.c create mode 100644 nptl/tst-stack1.c create mode 100644 nptl/tst-tsd1.c create mode 100644 nptl/tst-tsd2.c create mode 100644 nptl/tst-unload.c create mode 100644 nptl_db/Makefile create mode 100644 nptl_db/Versions create mode 100644 nptl_db/proc_service.h create mode 100644 nptl_db/shlib-versions create mode 100644 nptl_db/td_init.c create mode 100644 nptl_db/td_log.c create mode 100644 nptl_db/td_symbol_list.c create mode 100644 nptl_db/td_ta_clear_event.c create mode 100644 nptl_db/td_ta_delete.c create mode 100644 nptl_db/td_ta_enable_stats.c create mode 100644 nptl_db/td_ta_event_addr.c create mode 100644 nptl_db/td_ta_event_getmsg.c create mode 100644 nptl_db/td_ta_get_nthreads.c create mode 100644 nptl_db/td_ta_get_ph.c create mode 100644 nptl_db/td_ta_get_stats.c create mode 100644 nptl_db/td_ta_map_id2thr.c create mode 100644 nptl_db/td_ta_map_lwp2thr.c create mode 100644 nptl_db/td_ta_new.c create mode 100644 nptl_db/td_ta_reset_stats.c create mode 100644 nptl_db/td_ta_set_event.c create mode 100644 nptl_db/td_ta_setconcurrency.c create mode 100644 nptl_db/td_ta_thr_iter.c create mode 100644 nptl_db/td_ta_tsd_iter.c create mode 100644 nptl_db/td_thr_clear_event.c create mode 100644 nptl_db/td_thr_dbresume.c create mode 100644 nptl_db/td_thr_dbsuspend.c create mode 100644 nptl_db/td_thr_event_enable.c create mode 100644 nptl_db/td_thr_event_getmsg.c create mode 100644 nptl_db/td_thr_get_info.c create mode 100644 nptl_db/td_thr_getfpregs.c create mode 100644 nptl_db/td_thr_getgregs.c create mode 100644 nptl_db/td_thr_getxregs.c create mode 100644 nptl_db/td_thr_getxregsize.c create mode 100644 nptl_db/td_thr_set_event.c create mode 100644 nptl_db/td_thr_setfpregs.c create mode 100644 nptl_db/td_thr_setgregs.c create mode 100644 nptl_db/td_thr_setprio.c create mode 100644 nptl_db/td_thr_setsigpending.c create mode 100644 nptl_db/td_thr_setxregs.c create mode 100644 nptl_db/td_thr_sigsetmask.c create mode 100644 nptl_db/td_thr_tls_get_addr.c create mode 100644 nptl_db/td_thr_tsd.c create mode 100644 nptl_db/td_thr_validate.c create mode 100644 nptl_db/thread_db.h create mode 100644 nptl_db/thread_dbP.h diff --git a/nptl/ANNOUNCE b/nptl/ANNOUNCE new file mode 100644 index 0000000000..b63c657b85 --- /dev/null +++ b/nptl/ANNOUNCE @@ -0,0 +1,92 @@ +Now that the Linux kernel is once again able to run all the tests we +have and since glibc 2.3 was released it was time for a new code drop. +I've uploaded the second code drop for the Native POSIX Thread +Library: + + ftp://people.redhat.com/drepper/nptl/nptl-0.2.tar.bz2 + +You need + +- the latest of Linus' kernel from BitKeeper (or 2.5.41 when it + is released); + +- glibc 2.3 + +- the very latest in tools such as + + + gcc either from the current development branch or the gcc 3.2 + from Red Hat Linux 8; + + + binutils preferrably from CVS, from H.J. Lu's latest release for + Linux, or from RHL 8. + + +Compiling glibc should proceed smoothly. But there are a number of +tests which fail, mostly because some functionality is missing in +glibc. Ignore those errors. It is only important that all tests in +nptl/ are passing. Run + + make subdirs=nptl check + +to run all thread tests. + + +This version features several improvements: + +- all APIs are now implemented; + +- fork handling has been improved; stacks in the child are freed; + atfork handlers are removed if they were registered from a module + which gets unloaded. + +- pthread_tryjoin_np and pthread_timedjoin_np are implemented + +- TSD handling corrected and optimized. + +- many more tests which also test the underlying kernel implementation. + +- the build infrastructure has been implemented so that the DSO and + archives are built in usable form and with correct named. + +- libthread_db has been implemented. This is the library which is + needed by all program which need to get access to internals of + libpthread (mainly debuggers). + +- the CPU clock functions are implemented + + + +The white paper hasn't yet been updated. It's still available at + + http://people.redhat.com/drepper/nptl-design.pdf + + +This release should be ready for some serious testing. I know it is +hard to compile which I why I'm looking into providing binary RPMs. +They can be used on non-critical systems. I'll only be able to +provide binaries for RHL8 based systems, though, and the kernel still +must be installed separately. + + +The next steps will include: + +- write more tests and fix the bugs which are discovered this way + +- update the white paper + +- write and run more performance tests + +- port to IA-64 + + +Interested parties are once again invited to join the mailing we +created: + + + phil-list@redhat.com + +Go to + + https://listman.redhat.com/mailman/listinfo/phil-list + +to subscribe, unsubscribe, or review the archive. diff --git a/nptl/Banner b/nptl/Banner new file mode 100644 index 0000000000..e5342825c3 --- /dev/null +++ b/nptl/Banner @@ -0,0 +1 @@ +nptl 0.9 by Ulrich Drepper diff --git a/nptl/ChangeLog b/nptl/ChangeLog new file mode 100644 index 0000000000..e34cbcf180 --- /dev/null +++ b/nptl/ChangeLog @@ -0,0 +1,259 @@ +2002-11-26 Ulrich Drepper + + * allocatestack.c (queue_stack): Don't remove stack from list here. + Do it in the caller. Correct condition to prematurely terminate + loop to free stacks. + (__deallocate_stack): Remove stack from list here. + +2002-11-26 Ulrich Drepper + + * Makefile (tests): Add tst-stack1. + * tst-stack1.c: New file. + + * allocatestack.c (allocate_stack): Initialize the TCB on a user + provided stack. + + * pthread_attr_getstack.c: Return bottom of the thread area. + +2002-11-25 Ulrich Drepper + + * Makefile (libpthread-routines): Add pt-allocrtsig and + pthread_kill_other_threads. + * pt-allocrtsig.c: New file. + * pthread_kill_other_threads.c: New file. + * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for + all three functions. + * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove + allocrtsig. + * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export + __libc_current_sigrtmin_private, __libc_current_sigrtmax_private, + and __libc_allocate_rtsig_private. + * Versions (libpthread): Export pthread_kill_other_threads_np, + __libc_current_sigrtmin, and __libc_current_sigrtmax. + +2002-11-24 Ulrich Drepper + + * allocatestack.c (allocate_stack): stackaddr in attribute points to + the end of the stack. Adjust computations. + When mprotect call fails dequeue stack and free it. + * pthread_attr_setstack.c: Store top of the stack in stackaddr + attribute. + * pthread_getattr_np.c: Likewise. + + * descr.h (IS_DETACHED): Add some more parenthesis to prevent + surprises. + +2002-11-23 Ulrich Drepper + + * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before + attribute definitions. Patch by Luca Barbieri . + +2002-11-22 Ulrich Drepper + + * pthread_getspecific.c: Optimize access to first 2nd-level array. + * pthread_setspecific.c: Likewise. + +2002-11-21 Ulrich Drepper + + * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags + definitions. Get them from the official place. + * sysdeps/unix/sysv/linux/i386/fork.c: Likewise. + + * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags. + Use new CLONE_ flags in clone() calls. + + * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork. + * sysdeps/unix/sysv/linux/i386/fork.c: New file. + + * Versions: Add pthread_* functions for libc. + * forward.c: New file. + + * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add + errno-loc. + * herrno.c: New file. + * res.c: New file. + + * Makefile (libpthread-routines): Remove sem_post, sem_wait, + sem_trywait, and sem_timedwait. Add herrno and res. + * sem_init.c: Don't initialize lock and waiters members. + * sem_open.c: Likewise. + * sem_post.c: Removed. + * sem_wait.c: Removed. + * sem_trywait.c: Removed. + * sem_timedwait.c: Removed. + * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite. + Includes full implementations of sem_post, sem_wait, sem_trywait, + and sem_timedwait. + * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust + for new implementation. + * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock + and waiters fields. + + * tst-sem3.c: Improve error message. + * tst-signal3.c: Likewise. + + * init.c (__pthread_initialize_minimal): Use set_tid_address syscall + to tell the kernel about the termination futex and to initialize tid + member. Don't initialize main_thread. + * descr.h (struct pthread): Remove main_thread member. + * cancelllation.c (__do_cancel): Remove code handling main thread. + The main thread is not special anymore. + + * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add + size of the stacks to stack_cache_actsize. + + * pt-readv.c: Add missing "defined". + * pt-sigwait.c: Likewise. + * pt-writev.c: Likewise. + +2002-11-09 Ulrich Drepper + + * Versions: Export __connect from libpthread. + Patch by Luca Barbieri . + + * Makefile (libpthread-routines): Add pt-raise. + * sysdeps/unix/sysv/linux/raise.c: New file. + * sysdeps/unix/sysv/linux/pt-raise.c: New file. + * sysdeps/generic/pt-raise.c: New file. + + * pthread_cond_init.c: Initialize all data elements of the condvar + structure. Patch by Luca Barbieri . + + * pthread_attr_init.c: Actually implement 2.0 compatibility version. + * pthread_create.c: Likewise. + + * Makefile (tests): Add tst-key1, tst-key2, tst-key3. + * tst-key1.c: New file. + * tst-key2.c: New file. + * tst-key3.c: New file. + + * Versions: Export pthread_detach for version GLIBC_2.0. + Reported by Saurabh Desai . + +2002-11-08 Ulrich Drepper + + * pthread_key_create.c: Terminate search after an unused key was found. + Patch by Luca Barbieri . + + * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero. + Patch by Luca Barbieri . + +2002-10-10 Ulrich Drepper + + * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic + dynamic lookup for errno in PIC. + + * allocatestack.c (get_cached_stack): Rearrange code slightly to + release the stack lock as soon as possible. + Call _dl_allocate_tls_init for TCB from the cache to re-initialize + the static TLS block. + (allocate_stack): Call _dl_allocate_tls_init for user-provided stack. + + * cancellation.c: Renamed from cancelation.c. + * Makefile: Adjust accordingly. + * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P. + * cleanup_defer.c: Use CANCELLATION_P. + * pthread_testcancel.c: Likewise. + * descr.h: Fix spelling in comments. + * init.c: Likewise. + * pthread_getattr_np.c: Likewise. + * pthread_getschedparam.c: Likewise. + * pthread_setschedparam.c: Likewise. + * Versions: Likewise. + + * pt-pselect.c: New file. + * Makefile (libpthread-routines): Add pt-pselect. + * Versions: Add pselect. + + * tst-cancel4.c: New file. + * Makefile (tests): Add tst-cancel4. + +2002-10-09 Ulrich Drepper + + * pthread_mutex_lock.c: Always record lock ownership. + * pthread_mutex_timedlock.c: Likewise. + * pthread_mutex_trylock.c: Likewise. + + * pt-readv.c: New file. + * pt-writev.c: New file. + * pt-creat.c: New file. + * pt-msgrcv.c: New file. + * pt-msgsnd.c: New file. + * pt-poll.c: New file. + * pt-select.c: New file. + * pt-sigpause.c: New file. + * pt-sigsuspend.c: New file. + * pt-sigwait.c: New file. + * pt-sigwaitinfo.c: New file. + * pt-waitid.c: New file. + * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat, + pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend, + pt-sigwait, pt-sigwaitinfo, and pt-waitid. + * Versions: Add all the new functions. + + * tst-exit1.c: New file. + * Makefile (tests): Add tst-exit1. + + * sem_timedwait.c: Minor optimization for more optimal fastpath. + +2002-10-08 Ulrich Drepper + + * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW. + + * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid + call. pthread_join is an official cancellation point. + * pthread_timedjoin.c: Likewise. + + * pthread_cond_wait.c: Revert order in which internal lock are dropped + and the condvar's mutex are retrieved. + * pthread_cond_timedwait.c: Likewise. + Reported by dice@saros.East.Sun.COM. + +2002-10-07 Ulrich Drepper + + * pthreadP.h: Cut out all type definitions and move them... + * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file. + * pthreadP.h: Include . + + * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little + performance tweaks. + + * sem_trywait.c: Shuffle #includes around to get right order. + * sem_timedwait.c: Likewise. + * sem_post.c: Likewise. + * sem_wait.c: Likewise. + + * nptl 0.3 released. + + * Makefile (tests): Add tst-signal3. + * tst-signal3.c: New file. + +2002-10-05 Ulrich Drepper + + * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that + the asms modify the sem object. + (__lll_sem_timedwait): Now takes struct sem* as first parameter. + + * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose + the actual members. + * pthreadP.h (struct sem): New type. Actual semaphore type. + * semaphoreP.h: Include pthreadP.h. + * sem_getvalue.c: Adjust to sem_t change. + * sem_init.c: Likewise. + * sem_open.c: Likewise. + * sem_post.c: Likewise. + * sem_timedwait.c: Likewise. + * sem_trywait.c: Likewise. + * sem_wait.c: Likewise. + +2002-10-04 Ulrich Drepper + + * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3. + * tst-basic2.c: New file. + * tst-exec1.c: New file. + * tst-exec2.c: New file. + * tst-exec3.c: New file. + + * tst-fork1.c: Remove extra */. + + * nptl 0.2 released. The API for IA-32 is complete. diff --git a/nptl/DESIGN-barrier.txt b/nptl/DESIGN-barrier.txt new file mode 100644 index 0000000000..782377f0c5 --- /dev/null +++ b/nptl/DESIGN-barrier.txt @@ -0,0 +1,49 @@ +Barriers pseudocode +=================== + + int pthread_barrier_wait(barrier_t * barrier); + +struct barrier_t { + + unsigned int lock: + - internal mutex + + unsigned int left; + - current barrier count, # of threads still needed. + + unsigned int init_count; + - number of threads needed for the barrier to continue. + + unsigned int curr_event; + - generation count +} + +pthread_barrier_wait(barrier_t *barrier) +{ + unsigned int event; + + lll_lock(barrier->lock); + if (!--barrier->left) { + barrier->left = barrier->init_count; + barrier->curr_event++; + futex_wake(&barrier->curr_event, INT_MAX) + lll_unlock(barrier->lock); + + return BARRIER_SERIAL_THREAD; + } + + event = barrier->curr_event; + for (;;) { + lll_unlock(barrier->lock); + + futex_wait(&barrier->curr_event, event) + + lll_lock(barrier->lock); + if (event != barrier->curr_event) + break; + } + lll_unlock(barrier->lock); + + return 0; +} + diff --git a/nptl/DESIGN-condvar.txt b/nptl/DESIGN-condvar.txt new file mode 100644 index 0000000000..303807be6d --- /dev/null +++ b/nptl/DESIGN-condvar.txt @@ -0,0 +1,90 @@ +Conditional Variable pseudocode. +================================ + + int pthread_cond_timedwait (pthread_cond_t *cv, pthread_mutex_t *mutex); + int pthread_cond_signal (pthread_cond_t *cv); + int pthread_cond_broadcast (pthread_cond_t *cv); + +struct pthread_cond_t { + + unsigned int lock: + + internal mutex + + unsigned int nr_wakers: + + number of threads signalled to be woken up. + + unsigned int nr_sleepers: + + number of threads waiting for the cv. + +} + +#define ALL_THREADS (1 << (BITS_PER_LONG-1)) + +cond_wait_timeout(cv, mutex, timeout): +{ + lll_lock(cv->lock); + mutex_unlock(mutex); + + cv->nr_sleepers++; + for (;;) { + + if (cv->nr_wakers) { + cv->nr_wakers--; + break; + } + val = cv->nr_wakers; + + lll_unlock(cv->lock); + + ret = FUTEX WAIT (cv->nr_wakers, val, timeout) + + lll_lock(cv->lock); + + if (ret == TIMEOUT) + break; + ret = 0; + } + if (!--cv->nr_sleepers) + cv->nr_wakers = 0; /* no memory of wakeups */ + lll_unlock(cv->lock); + mutex_lock(mutex); + + return ret; +} + +cond_signal(cv) +{ + int do_wakeup = 0; + + lll_lock(cv->lock); + if (cv->nr_sleepers) { + if (!++cv->nr_wakers) /* overflow detection for the nutcase */ + cv->nr_wakers = ALL_THREADS; + do_wakeup = 1; + } + lll_unlock(cv->lock); + if (do_wakeup) + FUTEX WAKE (cv->nr_wakers, 1) +} + +cond_broadcast(cv) +{ + int do_wakeup = 0; + + lll_lock(cv->lock); + if (cv->nr_sleepers) { + cv->nr_wakers |= ALL_THREADS; + do_wakeup = 1; + } + lll_unlock(cv->lock); + if (do_wakeup) + FUTEX WAKE (cv->nr_wakers, ALL_THREADS); +} + +weaknesses of the implementation: + + it might generate spurious wakeups in the broadcast case, but those are + allowed by POSIX. diff --git a/nptl/DESIGN-rwlock.txt b/nptl/DESIGN-rwlock.txt new file mode 100644 index 0000000000..6262a7a5b9 --- /dev/null +++ b/nptl/DESIGN-rwlock.txt @@ -0,0 +1,109 @@ +Reader Writer Locks pseudocode +============================== + + pthread_rwlock_rdlock(pthread_rwlock_t *rwlock); + pthread_rwlock_unlock(pthread_rwlock_t *rwlock); + pthread_rwlock_wrlock(pthread_rwlock_t *rwlock); + +struct pthread_rwlock_t { + + unsigned int lock: + - internal mutex + + unsigned int writers_preferred; + - locking mode: 0 recursive, readers preferred + 1 nonrecursive, writers preferred + + unsigned int readers; + - number of read-only references various threads have + + pthread_t writer; + - descriptor of the writer or 0 + + unsigned int readers_wakeup; + - 'all readers should wake up' futex. + + unsigned int writer_wakeup; + - 'one writer should wake up' futex. + + unsigned int nr_readers_queued; + - number of readers queued up. + + unsigned int nr_writers_queued; + - number of writers queued up. +} + +pthread_rwlock_rdlock(pthread_rwlock_t *rwlock) +{ + lll_lock(rwlock->lock); + for (;;) { + if (!rwlock->writer && (!rwlock->nr_writers_queued || + !rwlock->writers_preferred)) + break; + + rwlock->nr_readers_queued++; + lll_unlock(rwlock->lock); + + futex_wait(&rwlock->readers_wakeup, 0) + + lll_lock(rwlock->lock); + if (!--rwlock->nr_readers_queued) + rwlock->readers_wakeup = 0; + } + rwlock->readers++; + lll_unlock(rwlock->lock); +} + +pthread_rwlock_tryrdlock(pthread_rwlock_t *rwlock) +{ + int result = EBUSY; + lll_lock(rwlock->lock); + if (!rwlock->writer && (!rwlock->nr_writers_queued || + !rwlock->writers_preferred)) + rwlock->readers++; + lll_unlock(rwlock->lock); + return result; +} + +pthread_rwlock_wrlock(pthread_rwlock_t *rwlock) +{ + lll_lock(rwlock->lock); + for (;;) { + if (!rwlock->writer && !rwlock->readers) + break; + + rwlock->nr_writers_queued++; + lll_unlock(rwlock->lock); + + futex_wait(&rwlock->writer_wakeup, 0); + + lll_lock(rwlock->lock); + rwlock->nr_writers_queued--; + rwlock->writer_wakeup = 0; + } + rwlock->writer = pthread_self(); + lll_unlock(rwlock->lock); +} + +pthread_rwlock_unlock(pthread_rwlock_t *rwlock) +{ + lll_lock(rwlock->lock); + + if (rwlock->writer) + rwlock->writer = 0; + else + rwlock->readers--; + + if (!rwlock->readers) { + if (rwlock->nr_writers_queued) { + rwlock->writer_wakeup = 1; + futex_wake(&rwlock->writer_wakeup, 1); + } else + if (rwlock->nr_readers_queued) { + rwlock->readers_wakeup = 1; + futex_wake(&rwlock->readers_wakeup, MAX_INT); + } + } + + lll_unlock(rwlock->lock); +} diff --git