about summary refs log tree commit diff
path: root/nptl/allocatestack.c
Commit message (Collapse)AuthorAgeFilesLines
* * allocatestack.c (allocate_stack): Don't demand that there is anUlrich Drepper2005-12-131-2/+3
| | | | | additional full page available on the stack beside guard, TLS, the minimum stack.
* * allocatestack.c (setxid_signal_thread): AddRoland McGrath2005-10-041-2/+2
| | | | INTERNAL_SYSCALL_DECL (err).
* * allocatestack.c (setxid_signal_thread): Need to useUlrich Drepper2005-10-021-2/+2
| | | | atomic_compare_and_exchange_bool_acq.
* 2005-10-01 Ulrich Drepper <drepper@redhat.com>Ulrich Drepper2005-10-011-43/+49
| | | | | | | | | | | | | | | | | | | | | Jakub Jelinek <jakub@redhat.com> * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust CANCEL_RESTMASK. (struct pthread): Move specific_used field to avoid padding. Add setxid_futex field. * init.c (sighandler_setxid): Reset setxid flag and release the setxid futex. * allocatestack.c (setxid_signal_thread): New function. Broken out of the bodies of the two loops in __nptl_setxid. For undetached threads check whether they are exiting and if yes, don't send a signal. (__nptl_setxid): Simplify loops by using setxid_signal_thread. * pthread_create.c (start_thread): For undetached threads, check whether setxid bit is set. If yes, wait until signal has been processed. * allocatestack.c (STACK_VARIABLES): Initialize them. * pthread_create.c (__pthread_create_2_1): Initialize pd.
* * csu/elf-init.c (__libc_csu_fini): Don't do anything here. Ulrich Drepper2005-01-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sysdeps/generic/libc-start.c: Don't register program destructor here. * dlfcn/Makefile: Add rules to build dlfcn.c. (LDFLAGS-dl.so): Removed. * dlfcn/dlclose.c: _dl_close is now in ld.so, use function pointer table. * dlfcn/dlmopen.c: Likewise for _dl_open. * dlfcn/dlopen.c: Likewise. * dlfcn/dlopenold.c: Likewise. * elf/dl-libc.c: Likewise for _dl_open and _dl_close. * elf/Makefile (routines): Remove dl-open and dl-close. (dl-routines): Add dl-open, dl-close, and dl-trampoline. Add rules to build and run tst-audit1. * elf/tst-audit1.c: New file. * elf/tst-auditmod1.c: New file. * elf/Versions [libc]: Remove _dl_open and _dl_close. * elf/dl-close.c: Change for use inside ld.so instead of libc.so. * elf/dl-open.c: Likewise. * elf/dl-debug.c (_dl_debug_initialize): Allow reinitialization, signaled by nonzero parameter. * elf/dl-init.c: Fix use of r_state. * elf/dl-load.c: Likewise. * elf/dl-close.c: Add auditing checkpoints. * elf/dl-open.c: Likewise. * elf/dl-fini.c: Likewise. * elf/dl-load.c: Likewise. * elf/dl-sym.c: Likewise. * sysdeps/generic/libc-start.c: Likewise. * elf/dl-object.c: Allocate memory for auditing information. * elf/dl-reloc.c: Remove RESOLV. We now always need the map. Correctly initialize slotinfo. * elf/dynamic-link.h: Adjust after removal of RESOLV. * sysdeps/hppa/dl-lookupcfg.h: Likewise. * sysdeps/ia64/dl-lookupcfg.h: Likewise. * sysdeps/powerpc/powerpc64/dl-lookupcfg.h: Removed. * elf/dl-runtime.c (_dl_fixup): Little cleanup. (_dl_profile_fixup): New parameters to point to register struct and variable for frame size. Add auditing checkpoints. (_dl_call_pltexit): New function. Don't define trampoline code here. * elf/rtld.c: Recognize LD_AUDIT. Load modules on startup. Remove all the functions from _rtld_global_ro which only _dl_open and _dl_close needed. Add auditing checkpoints. * elf/link.h: Define symbols for auditing interfaces. * include/link.h: Likewise. * include/dlfcn.h: Define __RTLD_AUDIT. Remove prototypes for _dl_open and _dl_close. Adjust access to argc and argv in libdl. * dlfcn/dlfcn.c: New file. * sysdeps/generic/dl-lookupcfg.h: Remove all content now that RESOLVE is gone. * sysdeps/generic/ldsodefs.h: Add definitions for auditing interfaces. * sysdeps/generic/unsecvars.h: Add LD_AUDIT. * sysdeps/i386/dl-machine.h: Remove trampoline code here. Adjust for removal of RESOLVE. * sysdeps/x86_64/dl-machine.h: Likewise. * sysdeps/generic/dl-trampoline.c: New file. * sysdeps/i386/dl-trampoline.c: New file. * sysdeps/x86_64/dl-trampoline.c: New file. * sysdeps/generic/dl-tls.c: Cleanups. Fixup for dtv_t change. Fix updating of DTV. * sysdeps/generic/libc-tls.c: Likewise. * sysdeps/arm/bits/link.h: Renamed to ... * sysdeps/arm/buts/linkmap.h: ...this. * sysdeps/generic/bits/link.h: Renamed to... * sysdeps/generic/bits/linkmap.h: ...this. * sysdeps/hppa/bits/link.h: Renamed to... * sysdeps/hppa/bits/linkmap.h: ...this. * sysdeps/hppa/i386/link.h: Renamed to... * sysdeps/hppa/i386/linkmap.h: ...this. * sysdeps/hppa/ia64/link.h: Renamed to... * sysdeps/hppa/ia64/linkmap.h: ...this. * sysdeps/hppa/s390/link.h: Renamed to... * sysdeps/hppa/s390/linkmap.h: ...this. * sysdeps/hppa/sh/link.h: Renamed to... * sysdeps/hppa/sh/linkmap.h: ...this. * sysdeps/hppa/x86_64/link.h: Renamed to... * sysdeps/hppa/x86_64/linkmap.h: ...this. 2005-01-06 Ulrich Drepper <drepper@redhat.com> * allocatestack.c (init_one_static_tls): Adjust initialization of DTV entry for static tls deallocation fix. * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which also contains information whether the memory pointed to is static TLS or not. * sysdeps/i386/tls.h: Likewise. * sysdeps/ia64/tls.h: Likewise. * sysdeps/powerpc/tls.h: Likewise. * sysdeps/s390/tls.h: Likewise. * sysdeps/sh/tls.h: Likewise. * sysdeps/sparc/tls.h: Likewise. * sysdeps/x86_64/tls.h: Likewise.
* (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.Ulrich Drepper2004-12-221-178/+83
|
* 2.5-18.1Jakub Jelinek2007-07-121-83/+178
|
* Update.Ulrich Drepper2004-11-251-1/+1
| | | | * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
* Update.Ulrich Drepper2004-11-201-0/+1
| | | | | | | | | 2004-11-20 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/bits/socket.h (SCM_RIGHTS): Avoid comma at the end of enum if __USE_BSD is not defined. (calc_inveclosure, calc_eclosure): Skip OP_DELETED_SUBEXP nodes.
* Update.Ulrich Drepper2004-11-121-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-11-10 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/setreuid.c: Remove sys/syscall.h, sys/types.h, linux/posix_types.h, sysdep.h and pthread-functions.h includes. Include setxid.h. Use INLINE_SETXID_SYSCALL macro instead of INLINE_SYSCALL, kill the HAVE_PTR__NPTL_SETXID guarded snippets. * sysdeps/unix/sysv/linux/setegid.c: Likewise. * sysdeps/unix/sysv/linux/setuid.c: Likewise. * sysdeps/unix/sysv/linux/seteuid.c: Likewise. * sysdeps/unix/sysv/linux/setgid.c: Likewise. * sysdeps/unix/sysv/linux/setresuid.c: Likewise. * sysdeps/unix/sysv/linux/setresgid.c: Likewise. * sysdeps/unix/sysv/linux/setregid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setegid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/seteuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setregid.c: Likewise. * sysdeps/unix/sysv/linux/alpha/setreuid.c: Likewise. Formatting. Change signed int into int. * sysdeps/unix/sysv/linux/alpha/setresuid.c: Likewise. * sysdeps/unix/sysv/linux/alpha/setresgid.c: Likewise. * sysdeps/unix/sysv/linux/alpha/setregid.c: Likewise. * sysdeps/unix/sysv/linux/syscalls.list (setresuid, setresgid): Remove. * sysdeps/unix/setxid.h: New file. * Rules (binaries-static): Add xtests-static. * Makeconfig (run-program-prefix): Filter also xtests-static.
* Update.Ulrich Drepper2004-10-061-1/+1
| | | | | | | * posix/tst-getaddrinfo2.c: Include stdlib.h and string.h. (do_test): Use %p instead of 0x%08X to print a pointer. * malloc/malloc.c: Include stdio-common/_itoa.h.
* Update.Ulrich Drepper2004-09-201-1/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sysdeps/unix/sysv/linux/setegid.c [HAVE_PTR__NPTL_SETXID]: Call callback to set IDs in all other threads as well. * sysdeps/unix/sysv/linux/seteuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setegid.c: Likewise. * sysdeps/unix/sysv/linux/i386/seteuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. * sysdeps/unix/sysv/linux/setuid.c: New file. * sysdeps/unix/sysv/linux/setgid.c: New file. * sysdeps/unix/sysv/linux/setreuid.c: New file. * sysdeps/unix/sysv/linux/setregid.c: New file. * sysdeps/unix/sysv/linux/setresuid.c: New file. * sysdeps/unix/sysv/linux/setresgid.c: New file. * sysdeps/unix/sysv/linux/i386/sysdep.h: Define INTERNAL_SYSCALL_NCS. * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c: Use x86 version. * sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/setresgid.c: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/setresuid.c: New file. * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: Remove setresgid and setresuid. * nscd/aicache.c: Use pthread_seteuid_np instead of seteuid. * nscd/grpcache.c: Likewise. * nscd/hstcache.c: Likewise. * nscd/pwdcache.c: Likewise.
* Update.Ulrich Drepper2004-09-181-4/+7
| | | | | | | 2004-09-18 Ulrich Drepper <drepper@redhat.com> * allocatestack.c (allocate_stack): Return EAGAIN instead of ENOMEM when out of memory.
* * configure.in (--with-headers): Let argument contain a : separatedRoland McGrath2004-09-161-15/+2
| | | | | list of directories to use, not just one. * configure: Regenerated.
* Update.Ulrich Drepper2004-09-081-2/+1
| | | | | | | | | | | | | * sysdeps/powerpc/bits/atomic.h (atomic_increment): Define. (atomic_decrement): Define. * sysdeps/powerpc/bits/atomic.h: Implement atomic_increment_val and atomic_decrement_val. * sysdeps/powerpc/powerpc32/bits/atomic.h: Likewise. * sysdeps/powerpc/powerpc64/bits/atomic.h: Likewise. * csu/tst-atomic.c (do_test): Add tests of atomic_increment_val and atomic_decrement_val.
* Update.Ulrich Drepper2004-04-161-0/+4
| | | | | * rt/tst-mqueue6.c (mqsend): Don't inline. (mqrecv): Likewise.
* Update.Ulrich Drepper2004-03-271-7/+4
| | | | | | | | | | | | | | | | | | | | 2004-03-26 Ulrich Drepper <drepper@redhat.com> * elf/dl-caller.c: New file. * include/caller.h: New file. * Makefile (distribute): Add include/caller.h. * elf/Makefile (dl-routines): Add dl-caller. * elf/dl-load.c (_dl_map_object_from_fd): Record l_text_end. * elf/dl-open.c (check_libc_caller): Removed. (dl_open_worker): Use __check_caller instead. * elf/rtld.c (_rtld_global_ro): Initialize _dl_check_caller. (_dl_start_final): Record l_text_end for ld.so map. (dl_main): Record l_text_end for main object and vdso. * include/link.h (struct link_map): Add l_text_end field. * sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Add _dl_check_caller field. Define enum allowmask. Add declaration of _dl_check_caller. * sysdeps/unix/sysv/linux/dl-execstack.c: Also use __check_caller test.
* Update.Ulrich Drepper2004-01-211-10/+21
| | | | * allocatestack.c: Pretty printing.
* * elf/dl-load.c: Don't declare __libc_stack_end. * ↵Richard Henderson2004-01-161-2/+0
| | | | | | | | | | | | sysdeps/generic/libc-start.c: Likewise. * sysdeps/unix/sysv/linux/dl-execstack.c: Likewise. * sysdeps/generic/segfault.c: Likewise. Include ldsodefs.h. * sysdeps/generic/backtrace.c: Likewise. linuxthreads/ * attr.c: Include ldsodefs.h. (pthread_getattr_np): Don't declare __libc_stack_end. nptl/ * allocatestack.c: Don't declare __libc_stack_end. * init.c (__pthread_initialize_minimal_internal): Likewise. * pthread_getattr_np.c (pthread_getattr_np): Likewise. 2004-01-16 Richard Henderson <rth@redhat.com> * elf/dl-load.c: Don't declare __libc_stack_end. * sysdeps/generic/libc-start.c: Likewise. * sysdeps/unix/sysv/linux/dl-execstack.c: Likewise. * sysdeps/generic/segfault.c: Likewise. Include ldsodefs.h. * sysdeps/generic/backtrace.c: Likewise.
* Update.Ulrich Drepper2004-01-131-3/+9
| | | | | | | | | | | | | 2004-01-13 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/dl-execstack.c: Change interface. Add challenge for caller. * sysdeps/generic/ldsodefs.h: Change declaration and type of hook member in rtld_global appropriately. * elf/dl-support.c: Likewise. * elf/dl-load.c (_dl_map_object_from_fd): Take additional paramter. Pass it on to the changed function. (_dl_map_object): Pass new parameter to _dl_map_object_from_fd.
* Update.Ulrich Drepper2003-12-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-12-02 David Mosberger <davidm@hpl.hp.com> * sysdeps/ia64/elf/initfini.c: Add unwind info. * sysdeps/ia64/dl-machine.h (elf_machine_matches_host): Mark with attribute "unused". (elf_machine_dynamic): Mark with attributes "unused" and "const". (elf_machine_runtime_setup): Likewise. * sysdeps/generic/dl-fptr.c (make_fptr_table): Mark with attribute "always_inline". * sysdeps/ia64/dl-machine.h (__ia64_init_bootstrap_fdesc_table): Likewise. * configure.in: Check whether compiler has libunwind support. * config.make.in (have-cc-with-libunwind): New variable. * config.h.in (HAVE_CC_WITH_LIBUNWIND): New macro. * Makeconfig (gnulib): If have-cc-withh-libunwind is "yes", also mention -lunwind. 003-11-12 David Mosberger <davidm@hpl.hp.com> * sysdeps/unix/sysv/linux/ia64/sysdep.h: Define DO_CALL_VIA_BREAK. Redefine DO_CALL to use vdso if supported, otherwise DO_CALL_VIA_BREAK. Likewise for DO_INLINE_SYSCALL. Make INTERNAL_SYSCALL use DO_INLINE_SYSCALL. * sysdeps/unix/sysv/linux/ia64/vfork.S: Use DO_CALL_VIA_BREAK() instead of DO_CALL(). * sysdeps/unix/sysv/linux/ia64/clone2.S: Use break directly instead of DO_CALL(). * sysdeps/unix/sysv/linux/ia64/brk.S (__curbrk): Restructure it to take advantage of DO_CALL() macro. * sysdeps/unix/sysv/linux/ia64/setcontext.S: Likewise. * sysdeps/unix/sysv/linux/ia64/getcontext.S: Likewise. * elf/rtld.c (dl_main): Restrict dl_sysinfo_dso check to first program header. On ia64, the check failed previously because there are two program headers. * sysdeps/generic/s_nexttowardf.c: Likewise. * math/bug-nexttoward.c: New file.
* 2003-09-24 Roland McGrath <roland@redhat.com>Roland McGrath2003-09-251-9/+10
| | | | | * allocatestack.c (__make_stacks_executable): Don't ignore return value from _dl_make_stack_executable.
* Update.Ulrich Drepper2003-09-251-0/+14
| | | | | * sysdeps/unix/sysv/linux/dl-execstack.c (_dl_make_stack_executable): Remember that we changed the permission.
* Update.Ulrich Drepper2003-09-251-14/+52
| | | | | | | | * allocatestack.c (change_stack_perm): Split out from __make_stacks_executable. (allocate_stack): If the required permission changed between the time we started preparing the stack and queueing it, change the permission. (__make_stacks_executable): Call change_stack_perm.
* Update.Ulrich Drepper2003-09-241-7/+46
| | | | | | | | | | | | | | | | | | | | | | | | | 2003-09-23 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions [libc] (GLIBC_2.3.3): Add setcontext, getcontext, swapcontext, and makecontext. * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Correct change for include Altivec support for PPC32. It was not compatible. * sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h: Adjust offsets for ucontext_t change. * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S: Adjust for ucontext_t change. Add compatibility code. * sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S: Likewise. Patch by Paul Mackerras <paulus@samba.org>. 2003-02-25 Randolph Chung <tausq@debian.org> * sysdeps/hppa/Makefile: Include compat code in build. * sysdeps/hppa/libgcc-compat.c: New file. * sysdeps/hppa/Dist: Add libgcc-compat.c. * sysdeps/hppa/Versions [GLIBC_2.2]: Add __clz_tab.
* Update.Ulrich Drepper2003-08-031-3/+10
| | | | | | | | | | | | | | | * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED is not defined, do explicit synchronization. (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED is not defined also unlock pd->lock for non-debugging case in case it is necessary. * pthread_create.c (start_thread): Always get and release pd->lock if __ASSUME_CLONE_STOPPED is not defined. (start_thread_debug): Removed. Adjust users. * allocatestack.c (allocate_stack): Always initialize lock if __ASSUME_CLONE_STOPPED is not defined. * Makefile (tests): Add tst-sched1. * tst-sched1.c: New file.
* Update.Ulrich Drepper2003-07-311-0/+38
| | | | | | | | | | | | | | | | | | | | | | 2003-07-30 Jakub Jelinek <jakub@redhat.com> * elf/dl-reloc.c (_dl_allocate_static_tls): Don't return any value, call dl_signal_error directly. If already relocated, call GL(dl_init_static_tls) directly, otherwise queue it for later. (CHECK_STATIC_TLS): Undo 2003-07-24 change. * elf/rtld.c (dl_main): Initialize GL(dl_init_static_tls). * elf/dl-open.c (dl_open_worker): Call GL_dl_init_static_tls for all static TLS initializations delayed in _dl_allocate_static_tls. * elf/dl-support.c (_dl_init_static_tls): New variable. * include/link.h (struct link_map): Add l_need_tls_init. * sysdeps/generic/ldsodefs.h (_rtld_global): Add _dl_init_static_tls. (_dl_nothread_init_static_tls): New prototype. (_dl_allocate_static_tls): Adjust prototype. * elf/tls-macros.h (VAR_INT_DEF): Add alignment directive. elf_machine_rela_relative): Adjust. (CHECK_STATIC_TLS): _dl_allocate_static_tls can fail now.
* Update.Ulrich Drepper2003-07-081-0/+9
| | | | | | | | | | | | | | | | | 2003-07-07 Ulrich Drepper <drepper@redhat.com> * descr.h (struct pthread): Add pid field. * allocatestack.c (allocate_stack): Initialize pid field in descriptor. (__reclaim_stacks): Likewise. * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined also check for PID of the signal source. (__pthread_initialize_minimal_internal): Also initialize pid field of initial thread's descriptor. * pthread_cancel.c: Use tgkill instead of tkill if possible. * sysdeps/unix/sysv/linux/fork.c: Likewise. * sysdeps/unix/sysv/linux/pt-raise.c: Likewise. * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise. * sysdeps/unix/sysv/linux/raise.c: Likewise.
* Update.Ulrich Drepper2003-06-251-0/+47
| | | | | | | | | * include/time.h: Define CLOCK_IDFIELD_SIZE. * sysdeps/posix/clock_getres.c: Recognize thread CPU clock IDs. * sysdeps/unix/clock_gettime.c: Likewise. * sysdeps/unix/clock_settime.c: Likewise. * sysdeps/unix/clock_nanosleep.c (CPUCLOCK_P): Adjust for new clock id for thread CPU clocks.
* Update.Ulrich Drepper2003-06-171-4/+2
| | | | | | | 2003-06-17 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/sleep.c: Use CANCELLATION_P if defined before returning because seconds==0.
* Update.Ulrich Drepper2003-06-111-0/+1
| | | | | | | 2003-06-11 Ulrich Drepper <drepper@redhat.com> * allocatestack.c (queue_stack): Always inline. * ptreadhP.h (__do_cancel): Likewise.
* Update.Ulrich Drepper2003-05-161-1/+1
| | | | | | | | | * pthread_join.c (pthread_join): Set tid field of the joined thread to -1. This isn't necessary but helps to recognize some error conditions with almost no cost. * allocatestack.c (FREE_P): Also negative values indicate an unused stack.
* Update.Ulrich Drepper2003-05-091-1/+7
| | | | | | 2003-05-09 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/x86_64/get_clockfreq.c: New file.
* Update.Ulrich Drepper2003-04-251-2/+2
| | | | | | | | | * pthread.c (__pthread_initialize_manager): Subtract TLS_PRE_TCB_SIZE bytes from tcbp to get to descr. * manager.c (pthread_handle_create): Subtract or add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr). (pthread_free): Add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr). * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define to 0.
* Update.Ulrich Drepper2003-04-251-7/+9
| | | | | | | | | | | | | | 2003-04-22 Jakub Jelinek <jakub@redhat.com> * include/link.h (NO_TLS_OFFSET): Define to 0 if not defined. * elf/dl-close.c (_dl_close): Use NO_TLS_OFFSET. * elf/dl-object.c (_dl_new_object): Initialize l_tls_offset to NO_TLS_OFFSET. * elf/rtld.c (_dl_start_final, _dl_start): Likewise. * elf/dl-reloc.c (CHECK_STATIC_TLS): Use NO_TLS_OFFSET. * sysdeps/generic/dl-tls.c (_dl_allocate_tls_init): Likewise. * sysdeps/powerpc/dl-tls.h (TLS_TPREL_VALUE): Don't subtract TLS_TCB_SIZE.
* (allocate_stack): Assume atomic_exchange_and_add returns the old value.Ulrich Drepper2003-03-201-1/+2
|
* (allocate_stack): Store the exact stack size of user allocated stacks.Ulrich Drepper2003-03-161-1/+1
|
* * allocatestack.c (__stack_user): Use hidden_data_def.Roland McGrath2003-03-141-1/+1
| | | | | | | | | * pthread_create.c (__pthread_keys): Likewise. * init.c [__powerpc__] (__NR_set_tid_address): Define it. * tst-fork4.c: New file. * Makefile (tests): Add it.
* 2003-03-14 Roland McGrath <roland@redhat.com>Roland McGrath2003-03-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so we always define the padding space. [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC stopped supporting its own extensions fully. [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper struct also called `header', so `header.multiple_threads' is the field name to use on all machines. * allocatestack.c (allocate_stack): Use `header.' prefix. * sysdeps/pthread/createthread.c (create_thread): Likewise. * pthread_create.c (__pthread_create_2_1): Likewise. * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise. (THREAD_SELF): Likewise. * sysdeps/x86_64/tls.h: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (SINGLE_THREAD_P): Likewise.
* (allocate_stack): If MULTI_PAGE_ALIASING is defined and the size of the ↵Ulrich Drepper2003-03-141-0/+9
| | | | stack which must be allocated is a multiple, allocate one more page.
* * elf/Makefile ($(objpfx)librtld.mk): Tweak regexp so that one-lineRoland McGrath2003-03-131-3/+5
| | | | entries in the map file match too.
* Update.Ulrich Drepper2003-03-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax. * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise. * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax. * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack): Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads. * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB] (create_thread): Likewise. Define __pthread_multiple_threads and __libc_multiple_threads_ptr. * init.c (__pthread_initialize_minimal_internal): Initialize __libc_multiple_threads_ptr if necessary. * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare __pthread_multiple_threads and __libc_multiple_threads_ptr. * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define __libc_multiple_threads. (__libc_pthread_init): Return pointer to __libc_pthread_init if necessary. * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant. (THREAD_SETMEM_NC): Likewise. * sysdeps/x86_64/pthread_spin_trylock.c: Removed. * sysdeps/x86_64/pthread_spin_trylock.S: New file. * sysdeps/x86_64/pthread_spin_unlock.c: Removed. * sysdeps/x86_64/pthread_spin_unlock.S: New file. * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock): Eliminate one entire instruction.
* 2003-03-11 Jakub Jelinek <jakub@redhat.com>Roland McGrath2003-03-111-18/+88
| | | | | | | | | | | | | | | | | * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined. (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP]. Use ARCH_CLONE. * allocatestack.c (ALLOCATE_STACK_PARMS): New macro. [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES, STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS, ALLOCATE_STACK): New macros. (TLS_TPADJ): New macro. (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ. (allocate_stack): Handle TLS_DTV_AT_TP and NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ. * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]: Don't set PD->self. * init.c [__ia64__] (__NR_set_tid_address): Define.
* 2003-03-10 Roland McGrath <roland@redhat.com>Roland McGrath2003-03-101-19/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]: Instead of setting PD->multiple_threads, set globals __pthread_multiple_threads and __libc_multiple_threads. * sysdeps/pthread/createthread.c (create_thread): Likewise. * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it. * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise. * descr.h (struct pthread): Conditionalize first member on [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union containing an anonymous tcbhead_t. Move `list' member out. [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member. * allocatestack.c: Remove use of `header.data.' prefix. * pthread_create.c: Likewise. * init.c (__pthread_initialize_minimal_internal): Likewise. * sysdeps/pthread/createthread.c (create_thread): Likewise. * sysdeps/i386/tls.h (INSTALL_DTV): Add parens. (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix. * sysdeps/x86_64/tls.h: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P): Likewise. * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P): Likewise. * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member. * sysdeps/s390/tls.h (tcbhead_t): Likewise.
* Update.Ulrich Drepper2003-03-081-3/+6
| | | | | | | 2003-03-08 Ulrich Drepper <drepper@redhat.com> * allocatestack.c (allocate_stack): If mprotect() fails free the TLS memory.
* Update.Ulrich Drepper2003-03-071-6/+5
| | | | | | | | | | | | 2003-03-07 Ulrich Drepper <drepper@redhat.com> * init.c (__static_tls_align_m1): Renamed from __static_tls_align. (__pthread_initialize_minimal_internal): Change initialization of __static_tls_align_m1 appropriately. * pthreadP.h (__static_tls_align_m1): Renamed from __static_tls_align. * allocatestack.c (allocate_stack): Use __static_tls_align_m1 instead of __static_tls_align-1.
* Update.Ulrich Drepper2003-03-041-1/+7
| | | | | | | | | | | * pthread_create.c: Define __pthread_keys using nocommon attribute, not by placing it explicitly in bss. Remove DEFINE_DEALLOC definition. Not needed anymore. * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined. Use it in mmap call to allocate stacks. * sysdeps/pthread/createthread.c (create_thread): Fix comment.
* Update.Ulrich Drepper2003-02-201-2/+2
| | | | | | | | | 2003-02-20 Ulrich Drepper <drepper@redhat.com> * pthread_create.c (deallocate_tsd): Clear the entire first block of TSD. * Makefile (tests): Add tst-key4. * tst-key4.c: New file.
* Update.Ulrich Drepper2003-02-151-0/+1
| | | | | | | | | | | | | | * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb, and __deallocate_stack with internal_function. * pthread_create.c: Adjust definitions appropriately. * allocatestack.c: Likewise. * pthread_join.c: Add one more __builtin_expect. * pthread_timedjoin.c: Likewise. * pthread_getspecific.c (__pthread_getspecific): Clear data->data not data of sequence number does not match. Add one __builtin_expect.
* Update.Ulrich Drepper2003-02-141-19/+1
| | | | | | | 2003-02-14 Ulrich Drepper <drepper@redhat.com> * sysdeps/generic/libc-start.c [HAVE_PTR_NTHREADS]: Decrement thread counter and only call __exit_thread if this is not the last thread.