From e1e46622ac0fce73d802fa4a8a2e83cc25cd9e7a Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 14 Feb 2015 23:04:02 -0600 Subject: Revert "resolve merge" This reverts commit 6b6ede3d15f04fe825cfa9f697507457e3640344. --- Makefile.in | 2 +- Rules.mak | 4 +- extra/Configs/Config.in | 37 +- extra/Configs/defconfigs/arc/tb10x_defconfig | 2 +- include/cancel.h | 4 +- libc/signal/allocrtsig.c | 2 +- libc/stdlib/malloc-standard/malloc.h | 2 +- libc/stdlib/malloc/malloc.h | 4 +- libc/sysdeps/linux/common/bits/uClibc_local_lim.h | 2 +- libc/sysdeps/linux/common/not-cancel.h | 17 + libc/sysdeps/linux/common/pause.c | 2 +- libc/sysdeps/linux/common/pread_write.c | 2 +- libc/unistd/confstr.c | 5 +- libpthread/linuxthreads.old/Makefile | 13 + libpthread/linuxthreads.old/Makefile.in | 119 ++ libpthread/linuxthreads.old/attr.c | 240 +++ libpthread/linuxthreads.old/cancel.c | 219 +++ libpthread/linuxthreads.old/condvar.c | 304 ++++ libpthread/linuxthreads.old/debug.h | 40 + libpthread/linuxthreads.old/errno.c | 35 + libpthread/linuxthreads.old/events.c | 36 + libpthread/linuxthreads.old/forward.c | 173 +++ libpthread/linuxthreads.old/internals.h | 529 +++++++ libpthread/linuxthreads.old/join.c | 231 +++ libpthread/linuxthreads.old/libc_pthread_init.c | 43 + libpthread/linuxthreads.old/linuxthreads.texi | 1627 ++++++++++++++++++++ libpthread/linuxthreads.old/locale.c | 57 + libpthread/linuxthreads.old/lockfile.c | 42 + libpthread/linuxthreads.old/manager.c | 933 +++++++++++ libpthread/linuxthreads.old/mutex.c | 362 +++++ libpthread/linuxthreads.old/pt-machine.c | 21 + libpthread/linuxthreads.old/ptfork.c | 167 ++ libpthread/linuxthreads.old/pthread.c | 1165 ++++++++++++++ libpthread/linuxthreads.old/ptlongjmp.c | 67 + libpthread/linuxthreads.old/queue.h | 60 + libpthread/linuxthreads.old/restart.h | 50 + libpthread/linuxthreads.old/rwlock.c | 485 ++++++ libpthread/linuxthreads.old/semaphore.c | 299 ++++ libpthread/linuxthreads.old/semaphore.h | 97 ++ libpthread/linuxthreads.old/signals.c | 246 +++ libpthread/linuxthreads.old/specific.c | 198 +++ libpthread/linuxthreads.old/spinlock.c | 720 +++++++++ libpthread/linuxthreads.old/spinlock.h | 218 +++ .../linuxthreads.old/sysdeps/alpha/pt-machine.h | 126 ++ .../linuxthreads.old/sysdeps/arc/pt-machine.h | 42 + .../linuxthreads.old/sysdeps/arm/pt-machine.h | 110 ++ .../linuxthreads.old/sysdeps/avr32/pt-machine.h | 73 + .../linuxthreads.old/sysdeps/bfin/pt-machine.h | 75 + .../linuxthreads.old/sysdeps/c6x/pt-machine.h | 63 + .../linuxthreads.old/sysdeps/cris/pt-machine.h | 69 + .../linuxthreads.old/sysdeps/frv/pt-machine.h | 69 + .../linuxthreads.old/sysdeps/h8300/pt-machine.h | 57 + .../linuxthreads.old/sysdeps/i386/pt-machine.h | 146 ++ libpthread/linuxthreads.old/sysdeps/i386/tls.h | 184 +++ libpthread/linuxthreads.old/sysdeps/i386/useldt.h | 306 ++++ .../linuxthreads.old/sysdeps/ia64/pt-machine.h | 134 ++ libpthread/linuxthreads.old/sysdeps/ia64/tls.h | 138 ++ .../linuxthreads.old/sysdeps/m68k/pt-machine.h | 74 + .../sysdeps/microblaze/pt-machine.h | 106 ++ .../sysdeps/microblaze/sigcontextinfo.h | 17 + .../linuxthreads.old/sysdeps/mips/pt-machine.h | 105 ++ .../linuxthreads.old/sysdeps/nios/pt-machine.h | 67 + .../linuxthreads.old/sysdeps/nios2/pt-machine.h | 57 + .../linuxthreads.old/sysdeps/powerpc/pt-machine.h | 101 ++ .../sysdeps/pthread/bits/libc-lock.h | 415 +++++ .../sysdeps/pthread/bits/libc-tsd.h | 69 + .../sysdeps/pthread/bits/pthreadtypes.h | 145 ++ .../linuxthreads.old/sysdeps/pthread/not-cancel.h | 113 ++ .../sysdeps/pthread/pthread-functions.h | 113 ++ .../linuxthreads.old/sysdeps/pthread/pthread.h | 710 +++++++++ libpthread/linuxthreads.old/sysdeps/pthread/tls.h | 80 + .../linuxthreads.old/sysdeps/sh/pt-machine.h | 81 + libpthread/linuxthreads.old/sysdeps/sh/tls.h | 116 ++ .../linuxthreads.old/sysdeps/sh64/Makefile.arch | 30 + .../linuxthreads.old/sysdeps/sh64/pt-machine.c | 46 + .../linuxthreads.old/sysdeps/sh64/pt-machine.h | 38 + .../linuxthreads.old/sysdeps/sparc/pt-machine.h | 82 + .../linuxthreads.old/sysdeps/sparc/tcb-offsets.h | 1 + .../linuxthreads.old/sysdeps/v850/pt-machine.h | 52 + .../linuxthreads.old/sysdeps/x86_64/pt-machine.h | 87 ++ libpthread/linuxthreads.old/sysdeps/x86_64/tls.h | 133 ++ .../linuxthreads.old/sysdeps/xtensa/pt-machine.h | 79 + libpthread/linuxthreads.old/wrapsyscall.c | 246 +++ libpthread/linuxthreads.old_db/Banner | 1 + libpthread/linuxthreads.old_db/Makefile | 13 + libpthread/linuxthreads.old_db/Makefile.in | 78 + libpthread/linuxthreads.old_db/Versions | 24 + libpthread/linuxthreads.old_db/proc_service.h | 69 + libpthread/linuxthreads.old_db/td_init.c | 32 + libpthread/linuxthreads.old_db/td_log.c | 31 + libpthread/linuxthreads.old_db/td_symbol_list.c | 60 + libpthread/linuxthreads.old_db/td_ta_clear_event.c | 50 + libpthread/linuxthreads.old_db/td_ta_delete.c | 57 + .../linuxthreads.old_db/td_ta_enable_stats.c | 34 + libpthread/linuxthreads.old_db/td_ta_event_addr.c | 72 + .../linuxthreads.old_db/td_ta_event_getmsg.c | 127 ++ .../linuxthreads.old_db/td_ta_get_nthreads.c | 41 + libpthread/linuxthreads.old_db/td_ta_get_ph.c | 35 + libpthread/linuxthreads.old_db/td_ta_get_stats.c | 34 + libpthread/linuxthreads.old_db/td_ta_map_id2thr.c | 77 + libpthread/linuxthreads.old_db/td_ta_map_lwp2thr.c | 89 ++ libpthread/linuxthreads.old_db/td_ta_new.c | 148 ++ libpthread/linuxthreads.old_db/td_ta_reset_stats.c | 34 + libpthread/linuxthreads.old_db/td_ta_set_event.c | 50 + .../linuxthreads.old_db/td_ta_setconcurrency.c | 34 + libpthread/linuxthreads.old_db/td_ta_thr_iter.c | 172 +++ libpthread/linuxthreads.old_db/td_ta_tsd_iter.c | 54 + .../linuxthreads.old_db/td_thr_clear_event.c | 59 + libpthread/linuxthreads.old_db/td_thr_dbresume.c | 29 + libpthread/linuxthreads.old_db/td_thr_dbsuspend.c | 29 + .../linuxthreads.old_db/td_thr_event_enable.c | 54 + .../linuxthreads.old_db/td_thr_event_getmsg.c | 64 + libpthread/linuxthreads.old_db/td_thr_get_info.c | 82 + libpthread/linuxthreads.old_db/td_thr_getfpregs.c | 57 + libpthread/linuxthreads.old_db/td_thr_getgregs.c | 57 + libpthread/linuxthreads.old_db/td_thr_getxregs.c | 29 + .../linuxthreads.old_db/td_thr_getxregsize.c | 29 + libpthread/linuxthreads.old_db/td_thr_set_event.c | 59 + libpthread/linuxthreads.old_db/td_thr_setfpregs.c | 46 + libpthread/linuxthreads.old_db/td_thr_setgregs.c | 46 + libpthread/linuxthreads.old_db/td_thr_setprio.c | 29 + .../linuxthreads.old_db/td_thr_setsigpending.c | 30 + libpthread/linuxthreads.old_db/td_thr_setxregs.c | 29 + libpthread/linuxthreads.old_db/td_thr_sigsetmask.c | 29 + .../linuxthreads.old_db/td_thr_tls_get_addr.c | 68 + libpthread/linuxthreads.old_db/td_thr_tsd.c | 80 + libpthread/linuxthreads.old_db/td_thr_validate.c | 68 + libpthread/linuxthreads.old_db/thread_db.h | 458 ++++++ libpthread/linuxthreads.old_db/thread_dbP.h | 108 ++ libpthread/linuxthreads/Makefile.in | 87 +- libpthread/linuxthreads/alloca_cutoff.c | 35 + libpthread/linuxthreads/attr.c | 377 ++++- libpthread/linuxthreads/barrier.c | 127 ++ libpthread/linuxthreads/cancel.c | 90 +- libpthread/linuxthreads/condvar.c | 60 +- libpthread/linuxthreads/debug.h | 40 - libpthread/linuxthreads/descr.h | 268 ++++ libpthread/linuxthreads/errno.c | 15 +- libpthread/linuxthreads/events.c | 14 +- libpthread/linuxthreads/forward.c | 31 +- libpthread/linuxthreads/internals.h | 636 ++++---- libpthread/linuxthreads/join.c | 57 +- libpthread/linuxthreads/libc-cancellation.c | 60 + libpthread/linuxthreads/libc_pthread_init.c | 15 +- libpthread/linuxthreads/linuxthreads.texi | 1627 -------------------- libpthread/linuxthreads/locale.c | 57 - libpthread/linuxthreads/lockfile.c | 29 +- libpthread/linuxthreads/manager.c | 829 ++++++---- libpthread/linuxthreads/mutex.c | 57 +- libpthread/linuxthreads/pt-machine.c | 15 +- libpthread/linuxthreads/ptcleanup.c | 74 + libpthread/linuxthreads/ptclock_gettime.c | 67 + libpthread/linuxthreads/ptclock_settime.c | 53 + libpthread/linuxthreads/ptfork.c | 173 +-- libpthread/linuxthreads/pthandles.c | 5 + libpthread/linuxthreads/pthread.c | 1318 +++++++++------- libpthread/linuxthreads/pthread_atfork.c | 62 + libpthread/linuxthreads/pthread_setegid.c | 27 + libpthread/linuxthreads/pthread_seteuid.c | 27 + libpthread/linuxthreads/pthread_setgid.c | 27 + libpthread/linuxthreads/pthread_setregid.c | 27 + libpthread/linuxthreads/pthread_setresgid.c | 27 + libpthread/linuxthreads/pthread_setresuid.c | 27 + libpthread/linuxthreads/pthread_setreuid.c | 27 + libpthread/linuxthreads/pthread_setuid.c | 27 + libpthread/linuxthreads/ptlongjmp.c | 67 - libpthread/linuxthreads/queue.h | 1 + libpthread/linuxthreads/restart.h | 3 +- libpthread/linuxthreads/rwlock.c | 250 ++- libpthread/linuxthreads/semaphore.c | 18 +- libpthread/linuxthreads/semaphore.h | 2 +- libpthread/linuxthreads/sighandler.c | 71 + libpthread/linuxthreads/signals.c | 137 +- libpthread/linuxthreads/specific.c | 223 +-- libpthread/linuxthreads/spinlock.c | 24 +- libpthread/linuxthreads/spinlock.h | 8 +- .../linuxthreads/sysdeps/alpha/elf/pt-initfini.c | 89 ++ libpthread/linuxthreads/sysdeps/alpha/pspinlock.c | 109 ++ libpthread/linuxthreads/sysdeps/alpha/tls.h | 133 ++ libpthread/linuxthreads/sysdeps/arc/pt-machine.h | 42 - libpthread/linuxthreads/sysdeps/arm/pspinlock.c | 81 + libpthread/linuxthreads/sysdeps/arm/pt-machine.h | 69 +- .../linuxthreads/sysdeps/arm/sysdep-cancel.h | 8 + libpthread/linuxthreads/sysdeps/arm/tls.h | 171 ++ libpthread/linuxthreads/sysdeps/bfin/pt-machine.h | 75 - libpthread/linuxthreads/sysdeps/c6x/pt-machine.h | 63 - libpthread/linuxthreads/sysdeps/cris/pspinlock.c | 71 + libpthread/linuxthreads/sysdeps/cris/pt-machine.h | 21 +- libpthread/linuxthreads/sysdeps/frv/pt-machine.h | 69 - libpthread/linuxthreads/sysdeps/h8300/pt-machine.h | 57 - libpthread/linuxthreads/sysdeps/hppa/pspinlock.c | 80 + libpthread/linuxthreads/sysdeps/hppa/pt-machine.h | 59 + .../linuxthreads/sysdeps/i386/i686/pt-machine.h | 78 + libpthread/linuxthreads/sysdeps/i386/pspinlock.c | 102 ++ libpthread/linuxthreads/sysdeps/i386/pt-machine.h | 93 +- .../linuxthreads/sysdeps/i386/tcb-offsets.sym | 7 + libpthread/linuxthreads/sysdeps/i386/tls.h | 84 +- libpthread/linuxthreads/sysdeps/i386/useldt.h | 19 +- libpthread/linuxthreads/sysdeps/ia64/pspinlock.c | 78 + libpthread/linuxthreads/sysdeps/ia64/pt-machine.h | 6 +- .../linuxthreads/sysdeps/ia64/tcb-offsets.sym | 9 + libpthread/linuxthreads/sysdeps/ia64/tls.h | 6 + libpthread/linuxthreads/sysdeps/m68k/pspinlock.c | 91 ++ libpthread/linuxthreads/sysdeps/m68k/pt-machine.h | 8 +- .../linuxthreads/sysdeps/microblaze/pt-machine.h | 106 -- .../sysdeps/microblaze/sigcontextinfo.h | 17 - libpthread/linuxthreads/sysdeps/mips/pspinlock.c | 95 ++ libpthread/linuxthreads/sysdeps/mips/pt-machine.h | 41 +- libpthread/linuxthreads/sysdeps/mips/tls.h | 169 ++ libpthread/linuxthreads/sysdeps/nios/pt-machine.h | 67 - libpthread/linuxthreads/sysdeps/nios2/pt-machine.h | 57 - .../sysdeps/powerpc/powerpc32/pspinlock.c | 69 + .../sysdeps/powerpc/powerpc32/pt-machine.h | 119 ++ .../sysdeps/powerpc/powerpc64/pspinlock.c | 69 + .../sysdeps/powerpc/powerpc64/pt-machine.h | 184 +++ .../linuxthreads/sysdeps/powerpc/pspinlock.c | 8 + .../linuxthreads/sysdeps/powerpc/pt-machine.h | 103 +- .../linuxthreads/sysdeps/powerpc/tcb-offsets.sym | 19 + libpthread/linuxthreads/sysdeps/powerpc/tls.h | 164 ++ .../linuxthreads/sysdeps/pthread/bits/initspin.h | 27 + .../linuxthreads/sysdeps/pthread/bits/libc-lock.h | 65 +- .../linuxthreads/sysdeps/pthread/bits/libc-tsd.h | 14 +- .../sysdeps/pthread/bits/pthreadtypes.h | 12 +- .../linuxthreads/sysdeps/pthread/bits/typesizes.h | 65 + .../linuxthreads/sysdeps/pthread/errno-loc.c | 44 + .../linuxthreads/sysdeps/pthread/flockfile.c | 32 + .../linuxthreads/sysdeps/pthread/ftrylockfile.c | 32 + .../linuxthreads/sysdeps/pthread/funlockfile.c | 32 + .../linuxthreads/sysdeps/pthread/getcpuclockid.c | 116 ++ .../linuxthreads/sysdeps/pthread/herrno-loc.c | 44 + libpthread/linuxthreads/sysdeps/pthread/list.h | 113 ++ .../linuxthreads/sysdeps/pthread/malloc-machine.h | 66 + .../linuxthreads/sysdeps/pthread/not-cancel.h | 4 +- .../linuxthreads/sysdeps/pthread/posix-timer.h | 203 +++ .../linuxthreads/sysdeps/pthread/pt-initfini.c | 123 ++ .../sysdeps/pthread/pthread-functions.h | 14 +- libpthread/linuxthreads/sysdeps/pthread/pthread.h | 46 +- .../linuxthreads/sysdeps/pthread/ptlongjmp.c | 32 + .../linuxthreads/sysdeps/pthread/res-state.c | 46 + .../linuxthreads/sysdeps/pthread/semaphore.h | 1 + .../linuxthreads/sysdeps/pthread/sigaction.c | 56 + .../linuxthreads/sysdeps/pthread/tcb-offsets.h | 1 + .../linuxthreads/sysdeps/pthread/timer_create.c | 169 ++ .../linuxthreads/sysdeps/pthread/timer_delete.c | 69 + .../linuxthreads/sysdeps/pthread/timer_getoverr.c | 44 + .../linuxthreads/sysdeps/pthread/timer_gettime.c | 76 + .../linuxthreads/sysdeps/pthread/timer_routines.c | 572 +++++++ .../linuxthreads/sysdeps/pthread/timer_settime.c | 136 ++ libpthread/linuxthreads/sysdeps/pthread/tls.h | 80 - .../linuxthreads/sysdeps/pthread/tst-timer.c | 113 ++ .../linuxthreads/sysdeps/pthread/uClibc-glue.h | 47 + libpthread/linuxthreads/sysdeps/sh/pspinlock.c | 79 + libpthread/linuxthreads/sysdeps/sh/tcb-offsets.sym | 10 + libpthread/linuxthreads/sysdeps/sh/tls.h | 140 +- libpthread/linuxthreads/sysdeps/sh64/Makefile.arch | 30 - libpthread/linuxthreads/sysdeps/sh64/pt-machine.c | 46 - libpthread/linuxthreads/sysdeps/sh64/pt-machine.h | 38 - libpthread/linuxthreads/sysdeps/sparc/pspinlock.c | 87 ++ .../linuxthreads/sysdeps/sparc/tcb-offsets.h | 1 - .../linuxthreads/sysdeps/sparc/tcb-offsets.sym | 4 + libpthread/linuxthreads/sysdeps/sparc/tls.h | 114 ++ .../sysdeps/unix/sysv/linux/allocalim.h | 25 + .../sysdeps/unix/sysv/linux/allocrtsig.c | 88 ++ .../sysdeps/unix/sysv/linux/alpha/aio_cancel.c | 33 + .../sysdeps/unix/sysv/linux/alpha/bits/local_lim.h | 91 ++ .../sysdeps/unix/sysv/linux/alpha/bits/typesizes.h | 65 + .../sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S | 27 + .../sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h | 145 ++ .../sysdeps/unix/sysv/linux/alpha/vfork.S | 69 + .../sysdeps/unix/sysv/linux/arm/sysdep-cancel.h | 129 ++ .../sysdeps/unix/sysv/linux/arm/vfork.S | 77 + .../linuxthreads/sysdeps/unix/sysv/linux/execve.c | 39 + .../linuxthreads/sysdeps/unix/sysv/linux/fork.c | 29 + .../linuxthreads/sysdeps/unix/sysv/linux/fork.h | 57 + .../sysdeps/unix/sysv/linux/hppa/aio_cancel.c | 33 + .../sysdeps/unix/sysv/linux/hppa/bits/initspin.h | 26 + .../sysdeps/unix/sysv/linux/hppa/malloc-machine.h | 72 + .../sysdeps/unix/sysv/linux/hppa/pt-initfini.c | 108 ++ .../sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h | 188 +++ .../sysdeps/unix/sysv/linux/i386/sysdep-cancel.h | 186 +++ .../sysdeps/unix/sysv/linux/i386/vfork.S | 94 ++ .../sysdeps/unix/sysv/linux/ia64/bits/local_lim.h | 91 ++ .../sysdeps/unix/sysv/linux/ia64/fork.h | 24 + .../sysdeps/unix/sysv/linux/ia64/pt-initfini.c | 141 ++ .../sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c | 32 + .../sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h | 143 ++ .../sysdeps/unix/sysv/linux/ia64/vfork.S | 53 + .../sysdeps/unix/sysv/linux/jmp-unwind.c | 34 + .../sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h | 128 ++ .../sysdeps/unix/sysv/linux/m68k/vfork.S | 83 + .../unix/sysv/linux/mips/mips64/sysdep-cancel.h | 143 ++ .../sysdeps/unix/sysv/linux/mips/sysdep-cancel.h | 143 ++ .../sysdeps/unix/sysv/linux/mips/vfork.S | 104 ++ .../sysdeps/unix/sysv/linux/mq_notify.c | 284 ++++ .../sysv/linux/powerpc/powerpc32/sysdep-cancel.h | 158 ++ .../unix/sysv/linux/powerpc/powerpc32/vfork.S | 85 + .../sysv/linux/powerpc/powerpc64/sysdep-cancel.h | 126 ++ .../unix/sysv/linux/powerpc/powerpc64/vfork.S | 90 ++ .../sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c | 70 + .../sysdeps/unix/sysv/linux/pt-sigsuspend.c | 32 + .../linuxthreads/sysdeps/unix/sysv/linux/raise.c | 41 + .../sysdeps/unix/sysv/linux/register-atfork.c | 86 ++ .../sysdeps/unix/sysv/linux/sh/pt-initfini.c | 142 ++ .../linuxthreads/sysdeps/unix/sysv/linux/sh/smp.h | 23 + .../sysdeps/unix/sysv/linux/sh/sysdep-cancel.h | 226 +++ .../sysdeps/unix/sysv/linux/sh/vfork.S | 77 + .../linuxthreads/sysdeps/unix/sysv/linux/sigwait.c | 82 + .../linuxthreads/sysdeps/unix/sysv/linux/smp.h | 47 + .../sysdeps/unix/sysv/linux/sparc/aio_cancel.c | 33 + .../sysdeps/unix/sysv/linux/sparc/bits/local_lim.h | 91 ++ .../sysdeps/unix/sysv/linux/sparc/bits/typesizes.h | 65 + .../sysdeps/unix/sysv/linux/sparc/fork.h | 20 + .../sysdeps/unix/sysv/linux/sparc/sysdep-cancel.h | 100 ++ .../sysdeps/unix/sysv/linux/sparc/vfork.S | 64 + .../sysdeps/unix/sysv/linux/unregister-atfork.c | 48 + .../sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c | 1 + .../sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h | 131 ++ .../sysdeps/unix/sysv/linux/x86_64/vfork.S | 61 + libpthread/linuxthreads/sysdeps/v850/pt-machine.h | 52 - libpthread/linuxthreads/sysdeps/x86_64/pspinlock.c | 96 ++ .../linuxthreads/sysdeps/x86_64/pt-machine.h | 156 +- .../linuxthreads/sysdeps/x86_64/tcb-offsets.sym | 4 + .../linuxthreads/sysdeps/xtensa/pt-machine.h | 79 - libpthread/linuxthreads/wrapsyscall.c | 246 --- libpthread/linuxthreads_db/ChangeLog | 467 ++++++ libpthread/linuxthreads_db/Makefile.in | 16 +- libpthread/linuxthreads_db/Makefile.old | 56 + libpthread/linuxthreads_db/shlib-versions | 2 + libpthread/linuxthreads_db/td_init.c | 3 +- libpthread/linuxthreads_db/td_ta_clear_event.c | 2 +- libpthread/linuxthreads_db/td_ta_event_getmsg.c | 1 + libpthread/linuxthreads_db/td_ta_map_id2thr.c | 1 + libpthread/linuxthreads_db/td_ta_map_lwp2thr.c | 1 + libpthread/linuxthreads_db/td_ta_set_event.c | 2 +- libpthread/linuxthreads_db/td_ta_thr_iter.c | 5 +- libpthread/linuxthreads_db/td_ta_tsd_iter.c | 1 + libpthread/linuxthreads_db/td_thr_clear_event.c | 2 +- libpthread/linuxthreads_db/td_thr_tls_get_addr.c | 36 +- libpthread/linuxthreads_db/td_thr_tlsbase.c | 70 + libpthread/linuxthreads_db/td_thr_tsd.c | 1 + libpthread/linuxthreads_db/td_thr_validate.c | 1 + libpthread/linuxthreads_db/thread_dbP.h | 2 +- 342 files changed, 30902 insertions(+), 5280 deletions(-) create mode 100644 libpthread/linuxthreads.old/Makefile create mode 100644 libpthread/linuxthreads.old/Makefile.in create mode 100644 libpthread/linuxthreads.old/attr.c create mode 100644 libpthread/linuxthreads.old/cancel.c create mode 100644 libpthread/linuxthreads.old/condvar.c create mode 100644 libpthread/linuxthreads.old/debug.h create mode 100644 libpthread/linuxthreads.old/errno.c create mode 100644 libpthread/linuxthreads.old/events.c create mode 100644 libpthread/linuxthreads.old/forward.c create mode 100644 libpthread/linuxthreads.old/internals.h create mode 100644 libpthread/linuxthreads.old/join.c create mode 100644 libpthread/linuxthreads.old/libc_pthread_init.c create mode 100644 libpthread/linuxthreads.old/linuxthreads.texi create mode 100644 libpthread/linuxthreads.old/locale.c create mode 100644 libpthread/linuxthreads.old/lockfile.c create mode 100644 libpthread/linuxthreads.old/manager.c create mode 100644 libpthread/linuxthreads.old/mutex.c create mode 100644 libpthread/linuxthreads.old/pt-machine.c create mode 100644 libpthread/linuxthreads.old/ptfork.c create mode 100644 libpthread/linuxthreads.old/pthread.c create mode 100644 libpthread/linuxthreads.old/ptlongjmp.c create mode 100644 libpthread/linuxthreads.old/queue.h create mode 100644 libpthread/linuxthreads.old/restart.h create mode 100644 libpthread/linuxthreads.old/rwlock.c create mode 100644 libpthread/linuxthreads.old/semaphore.c create mode 100644 libpthread/linuxthreads.old/semaphore.h create mode 100644 libpthread/linuxthreads.old/signals.c create mode 100644 libpthread/linuxthreads.old/specific.c create mode 100644 libpthread/linuxthreads.old/spinlock.c create mode 100644 libpthread/linuxthreads.old/spinlock.h create mode 100644 libpthread/linuxthreads.old/sysdeps/alpha/pt-machine.h create mode 100644 libpthread/linuxthreads.old/sysdeps/arc/pt-machine.h create mode 100644 libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h create mode 100644 libpthread/linuxthreads.old/sysdeps/avr32/pt-machine.h create mode 100644 libpthread/linuxthreads.old/sysdeps/bfin/pt-machine.h create mode 100644 libpthread/linuxthreads.old/sysdeps/c6x/pt-machine.h create mode 100644 libpthread/linuxthreads.old/sysdeps/cris/pt-machine.h create mode 100644 libpthread/linuxthreads.old/sysdeps/frv/pt-machine.h create mode 100644 libpthread/linuxthreads.old/sysdeps/h8300/pt-machine.h create mode 100644 libpthread/linuxthreads.old/sysdeps/i386/pt-machine.h create mode 100644 libpthread/linuxthreads.old/sysdeps/i386/tls.h create mode 100644 libpthread/linuxthreads.old/sysdeps/i386/useldt.h create mode 100644 libpthread/linuxthreads.old/sysdeps/ia64/pt-machine.h create mode 100644 libpthread/linuxthreads.old/sysdeps/ia64/tls.h create mode 100644 libpthread/linuxthreads.old/sysdeps/m68k/pt-machine.h create mode 100644 libpthread/linuxthreads.old/sysdeps/microblaze/pt-machine.h create mode 100644 libpthread/linuxthreads.old/sysdeps/microblaze/sigcontextinfo.h create mode 100644 libpthread/linuxthreads.old/sysdeps/mips/pt-machine.h create mode 100644 libpthread/linuxthreads.old/sysdeps/nios/pt-machine.h create mode 100644 libpthread/linuxthreads.old/sysdeps/nios2/pt-machine.h create mode 100644 libpthread/linuxthreads.old/sysdeps/powerpc/pt-machine.h create mode 100644 libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h create mode 100644 libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-tsd.h create mode 100644 libpthread/linuxthreads.old/sysdeps/pthread/bits/pthreadtypes.h create mode 100644 libpthread/linuxthreads.old/sysdeps/pthread/not-cancel.h create mode 100644 libpthread/linuxthreads.old/sysdeps/pthread/pthread-functions.h create mode 100644 libpthread/linuxthreads.old/sysdeps/pthread/pthread.h create mode 100644 libpthread/linuxthreads.old/sysdeps/pthread/tls.h create mode 100644 libpthread/linuxthreads.old/sysdeps/sh/pt-machine.h create mode 100644 libpthread/linuxthreads.old/sysdeps/sh/tls.h create mode 100644 libpthread/linuxthreads.old/sysdeps/sh64/Makefile.arch create mode 100644 libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.c create mode 100644 libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.h create mode 100644 libpthread/linuxthreads.old/sysdeps/sparc/pt-machine.h create mode 100644 libpthread/linuxthreads.old/sysdeps/sparc/tcb-offsets.h create mode 100644 libpthread/linuxthreads.old/sysdeps/v850/pt-machine.h create mode 100644 libpthread/linuxthreads.old/sysdeps/x86_64/pt-machine.h create mode 100644 libpthread/linuxthreads.old/sysdeps/x86_64/tls.h create mode 100644 libpthread/linuxthreads.old/sysdeps/xtensa/pt-machine.h create mode 100644 libpthread/linuxthreads.old/wrapsyscall.c create mode 100644 libpthread/linuxthreads.old_db/Banner create mode 100644 libpthread/linuxthreads.old_db/Makefile create mode 100644 libpthread/linuxthreads.old_db/Makefile.in create mode 100644 libpthread/linuxthreads.old_db/Versions create mode 100644 libpthread/linuxthreads.old_db/proc_service.h create mode 100644 libpthread/linuxthreads.old_db/td_init.c create mode 100644 libpthread/linuxthreads.old_db/td_log.c create mode 100644 libpthread/linuxthreads.old_db/td_symbol_list.c create mode 100644 libpthread/linuxthreads.old_db/td_ta_clear_event.c create mode 100644 libpthread/linuxthreads.old_db/td_ta_delete.c create mode 100644 libpthread/linuxthreads.old_db/td_ta_enable_stats.c create mode 100644 libpthread/linuxthreads.old_db/td_ta_event_addr.c create mode 100644 libpthread/linuxthreads.old_db/td_ta_event_getmsg.c create mode 100644 libpthread/linuxthreads.old_db/td_ta_get_nthreads.c create mode 100644 libpthread/linuxthreads.old_db/td_ta_get_ph.c create mode 100644 libpthread/linuxthreads.old_db/td_ta_get_stats.c create mode 100644 libpthread/linuxthreads.old_db/td_ta_map_id2thr.c create mode 100644 libpthread/linuxthreads.old_db/td_ta_map_lwp2thr.c create mode 100644 libpthread/linuxthreads.old_db/td_ta_new.c create mode 100644 libpthread/linuxthreads.old_db/td_ta_reset_stats.c create mode 100644 libpthread/linuxthreads.old_db/td_ta_set_event.c create mode 100644 libpthread/linuxthreads.old_db/td_ta_setconcurrency.c create mode 100644 libpthread/linuxthreads.old_db/td_ta_thr_iter.c create mode 100644 libpthread/linuxthreads.old_db/td_ta_tsd_iter.c create mode 100644 libpthread/linuxthreads.old_db/td_thr_clear_event.c create mode 100644 libpthread/linuxthreads.old_db/td_thr_dbresume.c create mode 100644 libpthread/linuxthreads.old_db/td_thr_dbsuspend.c create mode 100644 libpthread/linuxthreads.old_db/td_thr_event_enable.c create mode 100644 libpthread/linuxthreads.old_db/td_thr_event_getmsg.c create mode 100644 libpthread/linuxthreads.old_db/td_thr_get_info.c create mode 100644 libpthread/linuxthreads.old_db/td_thr_getfpregs.c create mode 100644 libpthread/linuxthreads.old_db/td_thr_getgregs.c create mode 100644 libpthread/linuxthreads.old_db/td_thr_getxregs.c create mode 100644 libpthread/linuxthreads.old_db/td_thr_getxregsize.c create mode 100644 libpthread/linuxthreads.old_db/td_thr_set_event.c create mode 100644 libpthread/linuxthreads.old_db/td_thr_setfpregs.c create mode 100644 libpthread/linuxthreads.old_db/td_thr_setgregs.c create mode 100644 libpthread/linuxthreads.old_db/td_thr_setprio.c create mode 100644 libpthread/linuxthreads.old_db/td_thr_setsigpending.c create mode 100644 libpthread/linuxthreads.old_db/td_thr_setxregs.c create mode 100644 libpthread/linuxthreads.old_db/td_thr_sigsetmask.c create mode 100644 libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c create mode 100644 libpthread/linuxthreads.old_db/td_thr_tsd.c create mode 100644 libpthread/linuxthreads.old_db/td_thr_validate.c create mode 100644 libpthread/linuxthreads.old_db/thread_db.h create mode 100644 libpthread/linuxthreads.old_db/thread_dbP.h create mode 100644 libpthread/linuxthreads/alloca_cutoff.c create mode 100644 libpthread/linuxthreads/barrier.c delete mode 100644 libpthread/linuxthreads/debug.h create mode 100644 libpthread/linuxthreads/descr.h create mode 100644 libpthread/linuxthreads/libc-cancellation.c delete mode 100644 libpthread/linuxthreads/linuxthreads.texi delete mode 100644 libpthread/linuxthreads/locale.c create mode 100644 libpthread/linuxthreads/ptcleanup.c create mode 100644 libpthread/linuxthreads/ptclock_gettime.c create mode 100644 libpthread/linuxthreads/ptclock_settime.c create mode 100644 libpthread/linuxthreads/pthandles.c create mode 100644 libpthread/linuxthreads/pthread_atfork.c create mode 100644 libpthread/linuxthreads/pthread_setegid.c create mode 100644 libpthread/linuxthreads/pthread_seteuid.c create mode 100644 libpthread/linuxthreads/pthread_setgid.c create mode 100644 libpthread/linuxthreads/pthread_setregid.c create mode 100644 libpthread/linuxthreads/pthread_setresgid.c create mode 100644 libpthread/linuxthreads/pthread_setresuid.c create mode 100644 libpthread/linuxthreads/pthread_setreuid.c create mode 100644 libpthread/linuxthreads/pthread_setuid.c delete mode 100644 libpthread/linuxthreads/ptlongjmp.c create mode 100644 libpthread/linuxthreads/sighandler.c create mode 100644 libpthread/linuxthreads/sysdeps/alpha/elf/pt-initfini.c create mode 100644 libpthread/linuxthreads/sysdeps/alpha/pspinlock.c create mode 100644 libpthread/linuxthreads/sysdeps/alpha/tls.h delete mode 100644 libpthread/linuxthreads/sysdeps/arc/pt-machine.h create mode 100644 libpthread/linuxthreads/sysdeps/arm/pspinlock.c create mode 100644 libpthread/linuxthreads/sysdeps/arm/sysdep-cancel.h create mode 100644 libpthread/linuxthreads/sysdeps/arm/tls.h delete mode 100644 libpthread/linuxthreads/sysdeps/bfin/pt-machine.h delete mode 100644 libpthread/linuxthreads/sysdeps/c6x/pt-machine.h create mode 100644 libpthread/linuxthreads/sysdeps/cris/pspinlock.c delete mode 100644 libpthread/linuxthreads/sysdeps/frv/pt-machine.h delete mode 100644 libpthread/linuxthreads/sysdeps/h8300/pt-machine.h create mode 100644 libpthread/linuxthreads/sysdeps/hppa/pspinlock.c create mode 100644 libpthread/linuxthreads/sysdeps/hppa/pt-machine.h create mode 100644 libpthread/linuxthreads/sysdeps/i386/i686/pt-machine.h create mode 100644 libpthread/linuxthreads/sysdeps/i386/pspinlock.c create mode 100644 libpthread/linuxthreads/sysdeps/i386/tcb-offsets.sym create mode 100644 libpthread/linuxthreads/sysdeps/ia64/pspinlock.c create mode 100644 libpthread/linuxthreads/sysdeps/ia64/tcb-offsets.sym create mode 100644 libpthread/linuxthreads/sysdeps/m68k/pspinlock.c delete mode 100644 libpthread/linuxthreads/sysdeps/microblaze/pt-machine.h delete mode 100644 libpthread/linuxthreads/sysdeps/microblaze/sigcontextinfo.h create mode 100644 libpthread/linuxthreads/sysdeps/mips/pspinlock.c create mode 100644 libpthread/linuxthreads/sysdeps/mips/tls.h delete mode 100644 libpthread/linuxthreads/sysdeps/nios/pt-machine.h delete mode 100644 libpthread/linuxthreads/sysdeps/nios2/pt-machine.h create mode 100644 libpthread/linuxthreads/sysdeps/powerpc/powerpc32/pspinlock.c create mode 100644 libpthread/linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h create mode 100644 libpthread/linuxthreads/sysdeps/powerpc/powerpc64/pspinlock.c create mode 100644 libpthread/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h create mode 100644 libpthread/linuxthreads/sysdeps/powerpc/pspinlock.c create mode 100644 libpthread/linuxthreads/sysdeps/powerpc/tcb-offsets.sym create mode 100644 libpthread/linuxthreads/sysdeps/powerpc/tls.h create mode 100644 libpthread/linuxthreads/sysdeps/pthread/bits/initspin.h create mode 100644 libpthread/linuxthreads/sysdeps/pthread/bits/typesizes.h create mode 100644 libpthread/linuxthreads/sysdeps/pthread/errno-loc.c create mode 100644 libpthread/linuxthreads/sysdeps/pthread/flockfile.c create mode 100644 libpthread/linuxthreads/sysdeps/pthread/ftrylockfile.c create mode 100644 libpthread/linuxthreads/sysdeps/pthread/funlockfile.c create mode 100644 libpthread/linuxthreads/sysdeps/pthread/getcpuclockid.c create mode 100644 libpthread/linuxthreads/sysdeps/pthread/herrno-loc.c create mode 100644 libpthread/linuxthreads/sysdeps/pthread/list.h create mode 100644 libpthread/linuxthreads/sysdeps/pthread/malloc-machine.h create mode 100644 libpthread/linuxthreads/sysdeps/pthread/posix-timer.h create mode 100644 libpthread/linuxthreads/sysdeps/pthread/pt-initfini.c create mode 100644 libpthread/linuxthreads/sysdeps/pthread/ptlongjmp.c create mode 100644 libpthread/linuxthreads/sysdeps/pthread/res-state.c create mode 100644 libpthread/linuxthreads/sysdeps/pthread/semaphore.h create mode 100644 libpthread/linuxthreads/sysdeps/pthread/sigaction.c create mode 100644 libpthread/linuxthreads/sysdeps/pthread/tcb-offsets.h create mode 100644 libpthread/linuxthreads/sysdeps/pthread/timer_create.c create mode 100644 libpthread/linuxthreads/sysdeps/pthread/timer_delete.c create mode 100644 libpthread/linuxthreads/sysdeps/pthread/timer_getoverr.c create mode 100644 libpthread/linuxthreads/sysdeps/pthread/timer_gettime.c create mode 100644 libpthread/linuxthreads/sysdeps/pthread/timer_routines.c create mode 100644 libpthread/linuxthreads/sysdeps/pthread/timer_settime.c delete mode 100644 libpthread/linuxthreads/sysdeps/pthread/tls.h create mode 100644 libpthread/linuxthreads/sysdeps/pthread/tst-timer.c create mode 100644 libpthread/linuxthreads/sysdeps/pthread/uClibc-glue.h create mode 100644 libpthread/linuxthreads/sysdeps/sh/pspinlock.c create mode 100644 libpthread/linuxthreads/sysdeps/sh/tcb-offsets.sym delete mode 100644 libpthread/linuxthreads/sysdeps/sh64/Makefile.arch delete mode 100644 libpthread/linuxthreads/sysdeps/sh64/pt-machine.c delete mode 100644 libpthread/linuxthreads/sysdeps/sh64/pt-machine.h create mode 100644 libpthread/linuxthreads/sysdeps/sparc/pspinlock.c delete mode 100644 libpthread/linuxthreads/sysdeps/sparc/tcb-offsets.h create mode 100644 libpthread/linuxthreads/sysdeps/sparc/tcb-offsets.sym create mode 100644 libpthread/linuxthreads/sysdeps/sparc/tls.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/allocalim.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/allocrtsig.c create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/aio_cancel.c create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/vfork.S create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/execve.c create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.c create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/aio_cancel.c create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/bits/initspin.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/pt-initfini.c create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/vfork.S create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/fork.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-initfini.c create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/vfork.S create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/jmp-unwind.c create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/m68k/vfork.S create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/mq_notify.c create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/pt-sigsuspend.c create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/raise.c create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/register-atfork.c create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/smp.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/sigwait.c create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/smp.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/aio_cancel.c create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/fork.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sysdep-cancel.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/vfork.S create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/unregister-atfork.c create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h create mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/x86_64/vfork.S delete mode 100644 libpthread/linuxthreads/sysdeps/v850/pt-machine.h create mode 100644 libpthread/linuxthreads/sysdeps/x86_64/pspinlock.c create mode 100644 libpthread/linuxthreads/sysdeps/x86_64/tcb-offsets.sym delete mode 100644 libpthread/linuxthreads/sysdeps/xtensa/pt-machine.h delete mode 100644 libpthread/linuxthreads/wrapsyscall.c create mode 100644 libpthread/linuxthreads_db/ChangeLog create mode 100644 libpthread/linuxthreads_db/Makefile.old create mode 100644 libpthread/linuxthreads_db/shlib-versions create mode 100644 libpthread/linuxthreads_db/td_thr_tlsbase.c diff --git a/Makefile.in b/Makefile.in index 6dd473a0f..5d60ddaba 100644 --- a/Makefile.in +++ b/Makefile.in @@ -385,7 +385,7 @@ else endif echo "$(UBACKTRACE_ASNEEDED)" >> $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so ifeq ($(UCLIBC_HAS_THREADS),y) -ifneq ($(UCLIBC_HAS_LINUXTHREADS),y) +ifneq ($(LINUXTHREADS_OLD),y) ifeq ($(HARDWIRED_ABSPATH),y) if [ -f $(top_builddir)lib/libpthread.so -a -f $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR)/libpthread.so.$(ABI_VERSION) ] ; then \ $(RM) $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libpthread.so; \ diff --git a/Rules.mak b/Rules.mak index e7ec0f9e7..2a73d7f0f 100644 --- a/Rules.mak +++ b/Rules.mak @@ -723,7 +723,9 @@ ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y) PTNAME := nptl CFLAGS += -DHAVE_FORCED_UNWIND -D_LIBC_REENTRANT else -ifeq ($(UCLIBC_HAS_LINUXTHREADS),y) +ifeq ($(LINUXTHREADS_OLD),y) + PTNAME := linuxthreads.old +else PTNAME := linuxthreads endif endif diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in index 1d382017b..c1a2d5ac9 100644 --- a/extra/Configs/Config.in +++ b/extra/Configs/Config.in @@ -3,7 +3,7 @@ # see extra/config/Kconfig-language.txt # -mainmenu "uClibc-ng $VERSION C Library Configuration" +mainmenu "uClibc $VERSION C Library Configuration" config DESIRED_TARGET_ARCH string @@ -506,6 +506,7 @@ config LDSO_GNU_HASH_SUPPORT choice prompt "Thread support" + #default UCLIBC_HAS_THREADS_NATIVE if (TARGET_alpha || TARGET_arm || TARGET_i386 || TARGET_mips || TARGET_powerpc || TARGET_sh || TARGET_sh64) default HAS_NO_THREADS help If you want to compile uClibc with pthread support, then answer Y. @@ -518,9 +519,9 @@ config HAS_NO_THREADS help Disable thread support. -config UCLIBC_HAS_LINUXTHREADS - bool "Enable support for linuxthreads" - # linuxthreads need nanosleep() +config LINUXTHREADS_OLD + bool "older (stable) version of linuxthreads" + # linuxthreads and linuxthreads.old need nanosleep() select UCLIBC_HAS_REALTIME depends on !TARGET_arc && \ !TARGET_i386 && \ @@ -532,8 +533,29 @@ config UCLIBC_HAS_LINUXTHREADS !TARGET_x86_64 && \ !TARGET_xtensa help - See here for information about linuxthreads: - http://en.wikipedia.org/wiki/LinuxThreads + There are two versions of linuxthreads. The older (stable) version + has been in uClibc for quite a long time but hasn't seen too many + updates other than bugfixes. + + +config LINUXTHREADS_NEW + bool "slightly newer version of linuxthreads" + depends on ARCH_HAS_DEPRECATED_SYSCALLS + depends on !TARGET_arc && \ + !TARGET_arm && \ + !TARGET_i386 && \ + !TARGET_metag && \ + !TARGET_mips && \ + !TARGET_powerpc && \ + !TARGET_sh && \ + !TARGET_sparc && \ + !TARGET_x86_64 && \ + !TARGET_xtensa + help + The new version has not been tested much, and lacks ports for arches + which glibc does not support (like bfin/frv/etc...), but is based on + the latest code from glibc, so it may be the only choice for the + newer ports (like alpha/amd64/64bit arches and hppa). config UCLIBC_HAS_THREADS_NATIVE bool "Native POSIX Threading (NPTL)" @@ -586,6 +608,7 @@ config PTHREADS_DEBUG_SUPPORT If you are doing development and want to debug applications using uClibc's pthread library, answer Y. Otherwise, answer N. + config UCLIBC_HAS_SYSLOG bool "Syslog support" default y @@ -2333,7 +2356,7 @@ config DODEBUG config DODEBUG_PT bool "Build pthread with debugging output" - depends on UCLIBC_HAS_THREADS && UCLIBC_HAS_LINUXTHREADS + depends on UCLIBC_HAS_THREADS && LINUXTHREADS_OLD help Enable debug output in libpthread. This is only useful when doing development in libpthread itself. diff --git a/extra/Configs/defconfigs/arc/tb10x_defconfig b/extra/Configs/defconfigs/arc/tb10x_defconfig index 218a17d56..60065f97d 100644 --- a/extra/Configs/defconfigs/arc/tb10x_defconfig +++ b/extra/Configs/defconfigs/arc/tb10x_defconfig @@ -6,7 +6,7 @@ KERNEL_HEADERS="%KERNEL_HEADERS%" # LDSO_CACHE_SUPPORT is not set LDSO_RUNPATH=y # LDSO_SAFE_RUNPATH is not set -UCLIBC_HAS_LINUXTHREADS=y +LINUXTHREADS_OLD=y PTHREADS_DEBUG_SUPPORT=y MALLOC_GLIBC_COMPAT=y UCLIBC_SUSV3_LEGACY=y diff --git a/include/cancel.h b/include/cancel.h index b60d21808..ac6f6b64d 100644 --- a/include/cancel.h +++ b/include/cancel.h @@ -48,7 +48,7 @@ #define __NC_PROTO(name) extern __typeof(name) __NC(name) attribute_hidden; #define __NC_OLD_PROTO(name) extern __typeof(name) __NC_OLD(name); -#if defined __UCLIBC_HAS_THREADS__ && !defined __UCLIBC_HAS_LINUXTHREADS__ +#if defined __UCLIBC_HAS_THREADS__ && !defined __LINUXTHREADS_OLD__ # define __NEW_THREADS 1 #else # define SINGLE_THREAD_P 1 @@ -71,7 +71,7 @@ res_type weak_function name param_list \ # define lt_strong_alias(name) # define lt_libc_hidden(name) libc_hidden_def(name) -#elif defined __UCLIBC_HAS_LINUXTHREADS__ +#elif defined __LINUXTHREADS_OLD__ # define CANCELLABLE_SYSCALL(res_type, name, param_list, params) \ weak_alias(__NC(name),name) \ diff --git a/libc/signal/allocrtsig.c b/libc/signal/allocrtsig.c index d93966a46..974418761 100644 --- a/libc/signal/allocrtsig.c +++ b/libc/signal/allocrtsig.c @@ -32,7 +32,7 @@ static int current_rtmax = -1; #else # ifdef __UCLIBC_HAS_THREADS_NATIVE__ static int current_rtmin = __SIGRTMIN + 2; -# elif defined __UCLIBC_HAS_THREADS__ && !defined __UCLIBC_HAS_LINUXTHREADS__ +# elif defined __UCLIBC_HAS_THREADS__ && !defined __LINUXTHREADS_OLD__ /* psm: might be good for LT old as well, do not want to break it for now */ /* Sanity check */ # if !defined __SIGRTMIN || (__SIGRTMAX - __SIGRTMIN) < 3 diff --git a/libc/stdlib/malloc-standard/malloc.h b/libc/stdlib/malloc-standard/malloc.h index f3e2d2a2a..1a4cc5a62 100644 --- a/libc/stdlib/malloc-standard/malloc.h +++ b/libc/stdlib/malloc-standard/malloc.h @@ -27,7 +27,7 @@ __UCLIBC_MUTEX_EXTERN(__malloc_lock) -#if defined __UCLIBC_HAS_THREADS__ && !defined __UCLIBC_HAS_LINUXTHREADS__ +#if defined __UCLIBC_HAS_THREADS__ && !defined __LINUXTHREADS_OLD__ attribute_hidden #endif ; diff --git a/libc/stdlib/malloc/malloc.h b/libc/stdlib/malloc/malloc.h index 75262593f..53683c479 100644 --- a/libc/stdlib/malloc/malloc.h +++ b/libc/stdlib/malloc/malloc.h @@ -199,13 +199,13 @@ extern void __malloc_debug_printf (int indent, const char *fmt, ...) attribute_h extern struct heap_free_area *__malloc_heap attribute_hidden; #ifdef __UCLIBC_HAS_THREADS__ __UCLIBC_MUTEX_EXTERN(__malloc_heap_lock) -# ifndef __UCLIBC_HAS_LINUXTHREADS__ +# ifndef __LINUXTHREADS_OLD__ attribute_hidden # endif ; # ifdef __UCLIBC_UCLINUX_BROKEN_MUNMAP__ __UCLIBC_MUTEX_EXTERN(__malloc_mmb_heap_lock) -# ifndef __UCLIBC_HAS_LINUXTHREADS__ +# ifndef __LINUXTHREADS_OLD__ attribute_hidden # endif ; diff --git a/libc/sysdeps/linux/common/bits/uClibc_local_lim.h b/libc/sysdeps/linux/common/bits/uClibc_local_lim.h index ce166a15b..0727ebf55 100644 --- a/libc/sysdeps/linux/common/bits/uClibc_local_lim.h +++ b/libc/sysdeps/linux/common/bits/uClibc_local_lim.h @@ -20,7 +20,7 @@ /* glibc uses 16384 */ # define PTHREAD_THREADS_MAX 1024 # define TIMER_MAX 256 -# ifdef __UCLIBC_HAS_LINUXTHREADS__ +# ifdef __LINUXTHREADS_OLD__ # undef SEM_VALUE_MAX # define SEM_VALUE_MAX ((int) ((~0u) >> 1)) # endif diff --git a/libc/sysdeps/linux/common/not-cancel.h b/libc/sysdeps/linux/common/not-cancel.h index ac32366a6..acf8e39e8 100644 --- a/libc/sysdeps/linux/common/not-cancel.h +++ b/libc/sysdeps/linux/common/not-cancel.h @@ -70,6 +70,12 @@ extern int __openat64_nocancel (int fd, const char *fname, int oflag, #define read_not_cancel(fd, buf, n) \ INLINE_SYSCALL (read, 3, (fd), (buf), (n)) +#ifdef __LINUXTHREADS_NEW__ +/* Uncancelable write. */ +#define write_not_cancel(fd, buf, n) \ + INLINE_SYSCALL (write, 3, (fd), (buf), (n)) +#endif + #if 0 /* Uncancelable writev. */ #define writev_not_cancel_no_status(fd, iov, n) \ @@ -81,6 +87,17 @@ extern int __openat64_nocancel (int fd, const char *fname, int oflag, __fcntl_nocancel (fd, cmd, val) #endif +#ifdef __LINUXTHREADS_NEW__ +/* Uncancelable waitpid. */ +#if 0 /*def __NR_waitpid*/ +# define waitpid_not_cancel(pid, stat_loc, options) \ + INLINE_SYSCALL (waitpid, 3, pid, stat_loc, options) +#else +# define waitpid_not_cancel(pid, stat_loc, options) \ + INLINE_SYSCALL (wait4, 4, pid, stat_loc, options, NULL) +#endif +#endif + /* Uncancelable pause. */ #ifdef __NR_pause # define pause_not_cancel() \ diff --git a/libc/sysdeps/linux/common/pause.c b/libc/sysdeps/linux/common/pause.c index 95d064ab5..c35ecd5d5 100644 --- a/libc/sysdeps/linux/common/pause.c +++ b/libc/sysdeps/linux/common/pause.c @@ -22,7 +22,7 @@ CANCELLABLE_SYSCALL(int, pause, (void), ()) # include int -# ifdef __UCLIBC_HAS_LINUXTHREADS__ +# ifdef __LINUXTHREADS_OLD__ weak_function # endif __NC(pause)(void) diff --git a/libc/sysdeps/linux/common/pread_write.c b/libc/sysdeps/linux/common/pread_write.c index d0abd90e4..4f96f681d 100644 --- a/libc/sysdeps/linux/common/pread_write.c +++ b/libc/sysdeps/linux/common/pread_write.c @@ -102,7 +102,7 @@ static ssize_t __NC(pwrite64)(int fd, const void *buf, size_t count, off64_t off CANCELLABLE_SYSCALL(ssize_t, pwrite64, (int fd, const void *buf, size_t count, off64_t offset), (fd, buf, count, offset)) # else -# ifdef __UCLIBC_HAS_LINUXTHREADS__ +# ifdef __LINUXTHREADS_OLD__ weak_alias(pread,pread64) weak_alias(pwrite,pwrite64) lt_strong_alias(pread64) diff --git a/libc/unistd/confstr.c b/libc/unistd/confstr.c index 4d4c217e5..373644265 100644 --- a/libc/unistd/confstr.c +++ b/libc/unistd/confstr.c @@ -43,9 +43,12 @@ size_t confstr (int name, char *buf, size_t len) break; #ifdef __UCLIBC_HAS_THREADS__ case _CS_GNU_LIBPTHREAD_VERSION: -# if defined __UCLIBC_HAS_LINUXTHREADS__ +# if defined __LINUXTHREADS_OLD__ string = "linuxthreads-0.01"; string_len = sizeof("linuxthreads-x.xx"); +# elif defined __LINUXTHREADS_NEW__ + string = "linuxthreads-0.10"; + string_len = sizeof("linuxthreads-x.xx"); # elif defined __UCLIBC_HAS_THREADS_NATIVE__ # define __NPTL_VERSION ("NPTL " \ __stringify(__UCLIBC_MAJOR__) "." \ diff --git a/libpthread/linuxthreads.old/Makefile b/libpthread/linuxthreads.old/Makefile new file mode 100644 index 000000000..f9100219a --- /dev/null +++ b/libpthread/linuxthreads.old/Makefile @@ -0,0 +1,13 @@ +# Makefile for uClibc +# +# Copyright (C) 2000-2005 Erik Andersen +# +# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. +# + +top_srcdir=../../ +top_builddir=../../ +include $(top_builddir)Rules.mak +all: libs +include Makefile.in +include $(top_srcdir)Makerules diff --git a/libpthread/linuxthreads.old/Makefile.in b/libpthread/linuxthreads.old/Makefile.in new file mode 100644 index 000000000..6be2099d2 --- /dev/null +++ b/libpthread/linuxthreads.old/Makefile.in @@ -0,0 +1,119 @@ +# Makefile for uClibc +# +# Copyright (C) 2003 Paul Mundt +# Copyright (C) 2000-2008 Erik Andersen +# +# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. +# + +subdirs += libpthread/linuxthreads.old + +CFLAGS-dir_linuxthreads.old := -DNOT_IN_libc -DIS_IN_libpthread +CFLAGS-libpthread/linuxthreads.old := $(CFLAGS-dir_linuxthreads.old) $(SSP_ALL_CFLAGS) + +ifeq ($(PTHREADS_DEBUG_SUPPORT),y) +LDFLAGS-libpthread.so := $(LDFLAGS_NOSTRIP) -Wl,-z,defs +else +LDFLAGS-libpthread.so := $(LDFLAGS) +endif +LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-libpthread.so := -Wl,--dsbt-index=10 + +LIBS-libpthread.so := $(LIBS) $(ldso) + +START_FILE-libpthread.so := $(SHARED_START_FILES) +END_FILE-libpthread.so := $(SHARED_END_FILES) + +libpthread_FULL_NAME := libpthread-$(VERSION).so + +libpthread_DIR := $(top_srcdir)libpthread/linuxthreads.old +libpthread_OUT := $(top_builddir)libpthread/linuxthreads.old + +-include $(libpthread_DIR)/sysdeps/$(TARGET_ARCH)/Makefile.arch + +libpthread_SRC := \ + attr.c cancel.c condvar.c errno.c events.c join.c lockfile.c manager.c \ + mutex.c pt-machine.c ptfork.c pthread.c ptlongjmp.c \ + rwlock.c semaphore.c signals.c specific.c spinlock.c wrapsyscall.c +ifeq ($(UCLIBC_HAS_XLOCALE),y) +libpthread_SRC += locale.c +endif + +# remove generic sources, if arch specific version is present +ifneq ($(strip $(libpthread_ARCH_SRC)),) +libpthread_SRC := $(filter-out $(patsubst %.c,$(libpthread_DIR)/%.c,$(notdir $(libpthread_ARCH_SRC))),$(libpthread_SRC)) +endif + +libpthread_SRC := $(patsubst %,$(libpthread_DIR)/%,$(libpthread_SRC)) + +libpthread_OBJ := $(patsubst $(libpthread_DIR)/%.c,$(libpthread_OUT)/%.o,$(libpthread_SRC)) + +# +# Stuff that goes into libc.so, not libpthread.so +# +CFLAGS-OMIT-forward.c := $(CFLAGS-dir_linuxthreads.old) +CFLAGS-OMIT-libc_pthread_init.c := $(CFLAGS-dir_linuxthreads.old) +libpthread_libc_CSRC := forward.c libc_pthread_init.c +libpthread_libc_OBJ := $(patsubst %.c, $(libpthread_OUT)/%.o,$(libpthread_libc_CSRC)) +libc-static-y += $(libpthread_OUT)/libc_pthread_init.o +libc-shared-y += $(libpthread_libc_OBJ:.o=.oS) + +ifeq ($(DOPIC),y) +libpthread-a-y += $(libpthread_OBJ:.o=.os) +else +libpthread-a-y += $(libpthread_OBJ) +endif +libpthread-so-y += $(libpthread_OBJ:.o=.oS) + +lib-a-$(UCLIBC_HAS_THREADS) += $(top_builddir)lib/libpthread.a +lib-so-$(UCLIBC_HAS_THREADS) += $(top_builddir)lib/libpthread.so + +#ifeq ($(DOMULTI),n) +$(top_builddir)lib/libpthread.so: $(libpthread_OUT)/libpthread_so.a $(libc.depend) + $(call link.so,$(libpthread_FULL_NAME),$(ABI_VERSION)) +#else +#$(top_builddir)lib/libpthread.so: $(libpthread_OUT)/libpthread.oS | $(libc.depend) +# $(call linkm.so,$(libpthread_FULL_NAME),$(ABI_VERSION)) +#endif + +ifeq ($(PTHREADS_DEBUG_SUPPORT),y) +$(libpthread_OUT)/libpthread_so.a: STRIP_FLAGS:=$(STRIP_FLAGS:-x=-X --strip-debug) +endif +$(libpthread_OUT)/libpthread_so.a: $(libpthread-so-y) + $(Q)$(RM) $@ + $(do_ar) + +ifeq ($(PTHREADS_DEBUG_SUPPORT),y) +$(libpthread_OUT)/libpthread.oS: STRIP_FLAGS:=$(STRIP_FLAGS:-x=-X --strip-debug) +endif +$(libpthread_OUT)/libpthread.oS: $(libpthread_SRC) + $(Q)$(RM) $@ + $(compile-m) + +ifeq ($(PTHREADS_DEBUG_SUPPORT),y) +$(top_builddir)lib/libpthread.a: STRIP_FLAGS:=$(STRIP_FLAGS:-x=-X --strip-debug) +endif +$(top_builddir)lib/libpthread.a: $(libpthread-a-y) + $(Q)$(INSTALL) -d $(dir $@) + $(Q)$(RM) $@ + $(do_ar) + +$(top_builddir)include/pthread.h: + $(do_ln) $(call rel_srcdir)$(PTDIR)/sysdeps/pthread/$(@F) $@ +$(top_builddir)include/semaphore.h: + $(do_ln) $(call rel_srcdir)$(PTDIR)/$(@F) $@ +$(top_builddir)include/bits/pthreadtypes.h: | $(top_builddir)include/bits + $(do_ln) $(call rel_srcdir)$(PTDIR)/sysdeps/pthread/bits/$(@F) $@ + +linuxthreads_headers := $(top_builddir)include/pthread.h \ + $(top_builddir)include/semaphore.h \ + $(top_builddir)include/bits/pthreadtypes.h +$(linuxthreads_headers): $(wildcard $(addprefix $(top_builddir)include/config/linuxthreads/,old.h new.h)) +headers-$(UCLIBC_HAS_THREADS) += $(linuxthreads_headers) + +objclean-y += CLEAN_libpthread/linuxthreads.old +headers_clean-y += HEADERCLEAN_libpthread/linuxthreads.old +HEADERCLEAN_libpthread/linuxthreads.old: + $(do_rm) $(linuxthreads_headers) + +CLEAN_libpthread/linuxthreads.old: + $(do_rm) $(addprefix $(libpthread_OUT)/*., o os oS a) diff --git a/libpthread/linuxthreads.old/attr.c b/libpthread/linuxthreads.old/attr.c new file mode 100644 index 000000000..8465c234c --- /dev/null +++ b/libpthread/linuxthreads.old/attr.c @@ -0,0 +1,240 @@ +/* Linuxthreads - a simple clone()-based implementation of Posix */ +/* threads for Linux. */ +/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */ +/* */ +/* This program is free software; you can redistribute it and/or */ +/* modify it under the terms of the GNU Library General Public License */ +/* as published by the Free Software Foundation; either version 2 */ +/* of the License, or (at your option) any later version. */ +/* */ +/* This program is distributed in the hope that it will be useful, */ +/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ +/* GNU Library General Public License for more details. */ + +/* changed for uClibc */ +#define __sched_get_priority_min sched_get_priority_min +#define __sched_get_priority_max sched_get_priority_max + +/* Handling of thread attributes */ + +#include +#include +#include +#include +#include "pthread.h" +#include "internals.h" + +libpthread_hidden_proto(pthread_attr_destroy) +libpthread_hidden_proto(pthread_attr_init) +libpthread_hidden_proto(pthread_attr_getdetachstate) +libpthread_hidden_proto(pthread_attr_setdetachstate) +libpthread_hidden_proto(pthread_attr_getinheritsched) +libpthread_hidden_proto(pthread_attr_setinheritsched) +libpthread_hidden_proto(pthread_attr_setschedparam) +libpthread_hidden_proto(pthread_attr_getschedparam) +libpthread_hidden_proto(pthread_attr_getschedpolicy) +libpthread_hidden_proto(pthread_attr_setschedpolicy) +libpthread_hidden_proto(pthread_attr_getscope) +libpthread_hidden_proto(pthread_attr_setscope) + +/* NOTE: With uClibc I don't think we need this versioning stuff. + * Therefore, define the function pthread_attr_init() here using + * a strong symbol. */ + +/*int __pthread_attr_init_2_1(pthread_attr_t *attr)*/ +int pthread_attr_init(pthread_attr_t *attr) +{ + size_t ps = getpagesize (); + + attr->__detachstate = PTHREAD_CREATE_JOINABLE; + attr->__schedpolicy = SCHED_OTHER; + attr->__schedparam.sched_priority = 0; + attr->__inheritsched = PTHREAD_EXPLICIT_SCHED; + attr->__scope = PTHREAD_SCOPE_SYSTEM; + attr->__guardsize = ps; + attr->__stackaddr = NULL; + attr->__stackaddr_set = 0; + attr->__stacksize = STACK_SIZE - ps; + return 0; +} +libpthread_hidden_def(pthread_attr_init) + +/* uClibc: leave out this for now. */ +#if defined DO_PTHREAD_VERSIONING_WITH_UCLIBC +#if defined __PIC__ && defined DO_VERSIONING +default_symbol_version (__pthread_attr_init_2_1, pthread_attr_init, GLIBC_2.1); + +int __pthread_attr_init_2_0(pthread_attr_t *attr) +{ + attr->__detachstate = PTHREAD_CREATE_JOINABLE; + attr->__schedpolicy = SCHED_OTHER; + attr->__schedparam.sched_priority = 0; + attr->__inheritsched = PTHREAD_EXPLICIT_SCHED; + attr->__scope = PTHREAD_SCOPE_SYSTEM; + return 0; +} +symbol_version (__pthread_attr_init_2_0, pthread_attr_init, GLIBC_2.0); +#else +strong_alias (__pthread_attr_init_2_1, pthread_attr_init) +#endif +#endif /* DO_PTHREAD_VERSIONING_WITH_UCLIBC */ + +int pthread_attr_destroy(pthread_attr_t *attr attribute_unused) +{ + return 0; +} +libpthread_hidden_def(pthread_attr_destroy) + + +int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate) +{ + if (detachstate < PTHREAD_CREATE_JOINABLE || + detachstate > PTHREAD_CREATE_DETACHED) + return EINVAL; + attr->__detachstate = detachstate; + return 0; +} +libpthread_hidden_def(pthread_attr_setdetachstate) + +int pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate) +{ + *detachstate = attr->__detachstate; + return 0; +} +libpthread_hidden_def(pthread_attr_getdetachstate) + +int pthread_attr_setschedparam(pthread_attr_t *attr, + const struct sched_param *param) +{ + int max_prio = __sched_get_priority_max(attr->__schedpolicy); + int min_prio = __sched_get_priority_min(attr->__schedpolicy); + + if (param->sched_priority < min_prio || param->sched_priority > max_prio) + return EINVAL; + memcpy (&attr->__schedparam, param, sizeof (struct sched_param)); + return 0; +} +libpthread_hidden_def(pthread_attr_setschedparam) + +int pthread_attr_getschedparam(const pthread_attr_t *attr, + struct sched_param *param) +{ + memcpy (param, &attr->__schedparam, sizeof (struct sched_param)); + return 0; +} +libpthread_hidden_def(pthread_attr_getschedparam) + +int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy) +{ + if (policy != SCHED_OTHER && policy != SCHED_FIFO && policy != SCHED_RR) + return EINVAL; + attr->__schedpolicy = policy; + return 0; +} +libpthread_hidden_def(pthread_attr_setschedpolicy) + +int pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy) +{ + *policy = attr->__schedpolicy; + return 0; +} +libpthread_hidden_def(pthread_attr_getschedpolicy) + +int pthread_attr_setinheritsched(pthread_attr_t *attr, int inherit) +{ + if (inherit != PTHREAD_INHERIT_SCHED && inherit != PTHREAD_EXPLICIT_SCHED) + return EINVAL; + attr->__inheritsched = inherit; + return 0; +} +libpthread_hidden_def(pthread_attr_setinheritsched) + +int pthread_attr_getinheritsched(const pthread_attr_t *attr, int *inherit) +{ + *inherit = attr->__inheritsched; + return 0; +} +libpthread_hidden_def(pthread_attr_getinheritsched) + +int pthread_attr_setscope(pthread_attr_t *attr, int scope) +{ + switch (scope) { + case PTHREAD_SCOPE_SYSTEM: + attr->__scope = scope; + return 0; + case PTHREAD_SCOPE_PROCESS: + return ENOTSUP; + default: + return EINVAL; + } +} +libpthread_hidden_def(pthread_attr_setscope) + +int pthread_attr_getscope(const pthread_attr_t *attr, int *scope) +{ + *scope = attr->__scope; + return 0; +} +libpthread_hidden_def(pthread_attr_getscope) + +int __pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize) +{ + size_t ps = getpagesize (); + + /* First round up the guard size. */ + guardsize = roundup (guardsize, ps); + + /* The guard size must not be larger than the stack itself */ + if (guardsize >= attr->__stacksize) return EINVAL; + + attr->__guardsize = guardsize; + + return 0; +} +weak_alias (__pthread_attr_setguardsize, pthread_attr_setguardsize) + +int __pthread_attr_getguardsize(const pthread_attr_t *attr, size_t *guardsize) +{ + *guardsize = attr->__guardsize; + return 0; +} +weak_alias (__pthread_attr_getguardsize, pthread_attr_getguardsize) + +#if 0 /* uClibc: deprecated stuff disabled */ +int __pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr) +{ + attr->__stackaddr = stackaddr; + attr->__stackaddr_set = 1; + return 0; +} +weak_alias (__pthread_attr_setstackaddr, pthread_attr_setstackaddr) + +int __pthread_attr_getstackaddr(const pthread_attr_t *attr, void **stackaddr) +{ + /* XXX This function has a stupid definition. The standard specifies + no error value but what is if no stack address was set? We simply + return the value we have in the member. */ + *stackaddr = attr->__stackaddr; + return 0; +} +weak_alias (__pthread_attr_getstackaddr, pthread_attr_getstackaddr) +#endif + +int __pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize) +{ + /* We don't accept value smaller than PTHREAD_STACK_MIN. */ + if (stacksize < PTHREAD_STACK_MIN) + return EINVAL; + + attr->__stacksize = stacksize; + return 0; +} +weak_alias (__pthread_attr_setstacksize, pthread_attr_setstacksize) + +int __pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *stacksize) +{ + *stacksize = attr->__stacksize; + return 0; +} +weak_alias (__pthread_attr_getstacksize, pthread_attr_getstacksize) diff --git a/libpthread/linuxthreads.old/cancel.c b/libpthread/linuxthreads.old/cancel.c new file mode 100644 index 000000000..392d1d586 --- /dev/null +++ b/libpthread/linuxthreads.old/cancel.c @@ -0,0 +1,219 @@ +/* Linuxthreads - a simple clone()-based implementation of Posix */ +/* threads for Linux. */ +/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */ +/* */ +/* This program is free software; you can redistribute it and/or */ +/* modify it under the terms of the GNU Library General Public License */ +/* as published by the Free Software Foundation; either version 2 */ +/* of the Licen