about summary refs log tree commit diff
path: root/nptl/pthread_create.c
Commit message (Collapse)AuthorAgeFilesLines
* * sysdeps/unix/sysv/linux/kernel-features.h: AddUlrich Drepper2006-03-281-17/+29
| | | | __ASSUME_SET_ROBUST_LIST.
* * sysdeps/unix/sysv/linux/not-cancel.h (__openat_not_cancel,Ulrich Drepper2006-02-151-6/+1
| | | | | | | __openat64_not_cancel): Remove prototypes. (__openat_nocancel, __openat64_nocancel): New prototypes or defines. (openat_not_cancel, openat_not_cancel_3, openat64_not_cancel, openat64_not_cancel_3): Use them.
* * allocatestack.c (allocate_stack): Initialize robust_list. cvs/fedora-glibc-20060213T0650Ulrich Drepper2006-02-131-7/+15
| | | | | | | | | | | | | * init.c (__pthread_initialize_minimal_internal): Likewise. * descr.h (struct xid_command): Pretty printing. (struct pthread): Use __pthread_list_t or __pthread_slist_t for robust_list. Adjust macros. * pthread_create.c (start_thread): Adjust robust_list handling. * phtread_mutex_unlock.c: Don't allow unlocking from any thread but the owner for all robust mutex types. * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t. * sysdeps/pthread/pthread.h: Adjust mutex initializers.
* * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):Ulrich Drepper2006-01-061-13/+13
| | | | | | | | | | | Don't give the union a name because it changes the mangled name. Instead name the struct for __data. * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise. * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise. * pthread_create.c (start_thread): Adjust robust mutex free loop. * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
* * Versions.def: Add GLIBC_2.4 for libpthread. cvs/fedora-glibc-20051227T1426Ulrich Drepper2005-12-271-0/+27
|
* * sysdeps/mach/hurd/ifreq.c: Add missing #includes.Roland McGrath2005-12-211-1/+1
|
* * elf/Versions [GLIBC_PRIVATE]: Export __pointer_chk_guard if defined.Ulrich Drepper2005-12-181-0/+5
| | | | | | | | | | | | | | | | | | | | | | | * elf/rtld.c: Define __pointer_chk_guard_local and if necessary __pointer_chk_guard. (_rtld_global_ro): Initialize _dl_pointer_guard. (dl_main): Initialize __pointer_chk_guard_local and either __pointer_chk_guard or TLS value if necessary. (process_envvars): Recognize and handle LD_POINTER_GUARD. * sysdeps/generic/ldsodefs.h (rtld_global_ro): Add _dl_pointer_guard. * sysdeps/i386/__longjmp.S: Use PTR_DEMANGLE for PC if defined. * sysdeps/x86_64/__longjmp.S: Likewise. * sysdeps/i386/bsd-_setjmp.S: Use PTR_MANGLE for PC if defined. * sysdeps/i386/bsd-_setjmp.S: Likewise. * sysdeps/i386/setjmp.S: Likewise. [IS_IN_rtld]: Avoid call to __sigjmp_save. * sysdeps/i386/setjmp.S: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep.h: Define PTR_MANGLE and PTR_DEMANGLE. * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. * sysdeps/i386/elf/setjmp.S: Removed. * sysdeps/i386/elf/bsd-setjmp.S: Removed.
* 2005-10-01 Ulrich Drepper <drepper@redhat.com>Ulrich Drepper2005-10-011-1/+12
| | | | | | | | | | | | | | | | | | | | | 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.
* * Versions.def (ld): Add GLIBC_2.4.Ulrich Drepper2005-06-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.in: Add --enable-stackguard-randomization option. (ENABLE_STACKGUARD_RANDOMIZE): New define. * config.h.in (ENABLE_STACKGUARD_RANDOMIZE): Add. * sysdeps/unix/sysv/linux/dl-osinfo.h: Include stdint.h. (_dl_setup_stack_chk_guard): New inline function. * sysdeps/generic/dl-osinfo.h: Include stdint.h. (_dl_setup_stack_chk_guard): New inline function. * elf/rtld.c (__stack_chk_guard): New variable. (dl_main): Remove all traces of TLS_INIT_TP_EXPENSIVE. Set __stack_chk_guard to _dl_setup_stack_chk_guard (), use THREAD_SET_STACK_GUARD if defined. * elf/Versions (ld): Export __stack_chk_guard@@GLIBC_2.4. * sysdeps/generic/libc-start.c (__stack_chk_guard): New variable. (__libc_start_main): Set __stack_chk_guard to _dl_setup_stack_chk_guard (), use THREAD_SET_STACK_GUARD if defined. * sysdeps/generic/libc-tls.c (__libc_setup_tls): Remove all traces of TLS_INIT_TP_EXPENSIVE. * debug/Versions (libc): Export __stack_chk_fail@@GLIBC_2.4. * debug/Makefile (routines): Add stack_chk_fail. (static-only-routines): Add stack_chk_fail_local. * debug/stack_chk_fail_local.c: New file. * debug/stack_chk_fail.c: New file. * elf/Makefile: Add rules to build and run tst-stackguard1{,-static} tests. * elf/tst-stackguard1.c: New file. * elf/tst-stackguard1-static.c: New file. * elf/stackguard-macros.h: New file.
* * pthread_create.c (__pthread_create_2_1): Rename syscall error cvs/fedora-glibc-20050324T0715Ulrich Drepper2005-03-241-11/+9
| | | | variable to scerr.
* (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.Ulrich Drepper2004-12-221-97/+12
|
* 2.5-18.1Jakub Jelinek2007-07-121-12/+97
|
* Update. cvs/fedora-glibc-20041120T0949Ulrich Drepper2004-11-201-0/+1
| | | | * signal/signal.h: Add nonnull attributes.
* Update.Ulrich Drepper2004-11-201-5/+11
| | | | | | | | | 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.
* [BZ #530]Roland McGrath2004-11-091-3/+0
| | | | | | | | 2004-11-09 Roland McGrath <roland@redhat.com> [BZ #530] * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads here, before calling clone. * pthread_create.c (start_thread): Don't do it here.
* Update.Ulrich Drepper2004-10-281-2/+4
| | | | | | | 2004-10-28 Jakub Jelinek <jakub@redhat.com> * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks if sched_priority is not between minprio and maxprio.
* Update.Ulrich Drepper2004-09-251-6/+9
| | | | | | | | | | | 2004-09-25 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/i386/setuid.c (__setuid): Remove second result declaration. 2004-09-22 Andreas Schwab <schwab@suse.de> * sysdeps/unix/sysv/linux/ia64/sysdep.h: Adjust whitespace.
* (__pthread_create_2_1): Remember whether thread is created detached and if ↵Ulrich Drepper2004-09-241-1/+7
| | | | yes, do not try to free the stack in case the thread creation failed.
* Update.Ulrich Drepper2004-09-241-5/+9
| | | | | | 2004-09-23 Kaz Kojima <kkojima@rr.iij4u.or.jp> * sysdeps/unix/sysv/linux/sh/sysdep.h (INTERNAL_SYSCALL_NCS): Define.
* * configure.in (--with-headers): Let argument contain a : separatedRoland McGrath2004-09-161-2/+0
| | | | | list of directories to use, not just one. * configure: Regenerated.
* Update.Ulrich Drepper2004-03-311-4/+4
| | | | | | | 2004-03-30 Ulrich Drepper <drepper@redhat.com> * sysdeps/generic/libc-start.c (LIBC_START_MAIN) [HAVE_CLEANUP_JMP_BUF]: Call __nptl_deallocate_tsd.
* Update.Ulrich Drepper2004-02-271-15/+42
| | | | | | | | | | | | | | | | | | * pthread_attr_setschedparam.c: Don't test priority against limits here. Set ATTR_FLAG_SCHED_SET flag. * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag. * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes from parent thread to child. If attribute is used and scheduling parameters are not inherited, copy parameters from attribute or compute them. Check priority value. * pthread_getschedparam.c: If the parameters aren't known yet get them from the kernel. * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and ATTR_FLAG_POLICY_SET flag for thread. * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET and ATTR_FLAG_POLICY_SET. * sysdeps/pthread/createthread.c: Use tgkill if possible.
* * sysdeps/unix/sysv/linux/speed.cRoland McGrath2003-09-091-3/+4
| | | | | | | | | (cfsetospeed): Only set c_ospeed under [_HAVE_STRUCT_TERMIOS_C_OSPEED]. (cfsetispeed): Only set c_ispeed under [_HAVE_STRUCT_TERMIOS_C_ISPEED]. * sysdeps/unix/sysv/linux/bits/termios.h (_HAVE_STRUCT_TERMIOS_C_ISPEED, _HAVE_STRUCT_TERMIOS_C_OSPEED): Define. * sysdeps/unix/sysv/linux/alpha/bits/termios.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/termios.h: Likewise.
* (__pthread_create_2_0): Clear new_attr.cpuset.Jakub Jelinek2003-08-071-0/+1
|
* Update.Ulrich Drepper2003-08-031-19/+7
| | | | | | | | | | | | | | | * 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-221-0/+4
| | | | | | | | | | | | | | | | 2003-07-22 Jakub Jelinek <jakub@redhat.com> * include/resolv.h (__resp): Declare. Define to __libc_resp if in libc.so. (_res): If USE___THREAD, define to (*__resp). * resolv/res_libc.c (_res): Normal .bss variable with compat_symbol even if USE___THREAD. (__resp): New __thread variable. (__libc_resp): New alias. * resolv/Versions (libc): Export _res@GLIBC_2.0 even if USE_TLS && HAVE___THREAD. Export __resp@@GLIBC_PRIVATE. * sysdeps/generic/res-state.c (__res_state): Return __resp if USE___THREAD.
* Update.Ulrich Drepper2003-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | 2003-07-20 Ulrich Drepper <drepper@redhat.com> * Makefile (libpthread-routines): Add pthread_attr_getaffinity and pthread_attr_setaffinity. * Versions [libpthread] (GLIBC_2.3.3): Likewise. * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file. * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file. * pthread_attr_destroy.c: Free cpuset element if allocated. * pthread_create.c: Pass iattr as additional parameter to create_thread. * sysdeps/pthread/createthread.c: If attribute is provided and a new thread is created with affinity set or scheduling parameters, start thread with CLONE_STOPPED. * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and pthread_attr_setaffinity. * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add cpuset element.
* (deallocate_tsd): Don't take parameter. Adjust caller. Optimize to avoid ↵Ulrich Drepper2003-04-121-22/+43
| | | | | | often unecessary local variable. (start_thread): Initialize cleanup_jmp_buf element if own thread descriptor.
* Update.Ulrich Drepper2003-04-021-53/+64
| | | | | | | | | | | | | | 2003-04-01 Ulrich Drepper <drepper@redhat.com> * pthread_create.c (deallocate_tsd): Clear/free memory after the last round, not the first. Use specific_used flag instead of local found_nonzero variable. Use THREAD_[SG]ETMEM where possible. (__free_tcb): Don't call deallocate_tsd here. (start_thread): Call deallocate_tsd here. * pthread_setspecific.c: Set specific_used flag really only when needed. * Makefile (tests): Add tst-tsd3.c * tst-tsd3.c: New file.
* Update.Ulrich Drepper2003-03-271-1/+2
| | | | | * pthread_create.c (start_thread): Don't use setjmp inside __builtin_expect to work around gcc bug.
* Update.Ulrich Drepper2003-03-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 2003-03-21 Ulrich Drepper <drepper@redhat.com> * cancellation.c: Adjust for new form of compare&exchange macros. * cleanup_defer.c: Likewise. * init.c: Likewise. * libc-cancellation.c: Likewise. * old_pthread_cond_broadcast.c: Likewise. * old_pthread_cond_signal.c: Likewise. * old_pthread_cond_timedwait.c: Likewise. * old_pthread_cond_wait.c: Likewise. * pthread_cancel.c: Likewise. * pthread_create.c: Likewise. * pthread_detach.c: Likewise. * pthread_join.c: Likewise. * pthread_key_delete.c: Likewise. * pthread_setcancelstate.c: Likewise. * pthread_setcanceltype.c: Likewise. * pthread_timedjoin.c: Likewise. * pthread_tryjoin.c: Likewise. * sysdeps/pthread/createthread.c: Likewise.
* (start_thread): Use CALL_THREAD_FCT if defined.Ulrich Drepper2003-03-141-0/+4
|
* * 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-2/+2
| | | | | | | | | | | | | | | | | | | | | | * 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.
* Update.Ulrich Drepper2003-03-141-1/+1
| | | | | | | 2003-03-14 Ulrich Drepper <drepper@redhat.com> * localedata/mn_MN: New file. Contributed by Sanlig Badral <badral@chinggis.com>.
* * elf/Makefile ($(objpfx)librtld.mk): Tweak regexp so that one-lineRoland McGrath2003-03-131-3/+4
| | | | entries in the map file match too.
* 2003-03-11 Jakub Jelinek <jakub@redhat.com>Roland McGrath2003-03-111-1/+1
| | | | | | | | | | | | | | | | | * 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-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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-041-2/+1
| | | | | | | | | | | * 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-03-041-1/+1
| | | | * sysdeps/generic/dl-sysdep.h: Add double include protection.
* Update.Ulrich Drepper2003-02-231-3/+3
| | | | | | | 2003-02-23 Ulrich Drepper <drepper@redhat.com> * resolv/res_libc.c [USE___THREAD] (_res): Initialize _vcsock element to -1.
* 2003-02-21 Roland McGrath <roland@redhat.com>Roland McGrath2003-02-221-1/+3
| | | | * pthread_create.c (start_thread): Call __libc_thread_freeres.
* Update.Ulrich Drepper2003-02-201-0/+3
| | | | | * pthread_create.c (deallocate_tsd): Reset found_nonzero at the beginning of the loop. Clear the entire first block of TSD.
* 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-181-1/+3
| | | | | * pthread_create.c (deallocate_tsd): Mark as internal_function. Add some more __builtin_expect.
* Update.Ulrich Drepper2003-02-181-2/+2
| | | | | | 2003-02-18 Ulrich Drepper <drepper@redhat.com> * pthreadP.h: Define dummy versio of DEBUGGING_P.
* Update.Ulrich Drepper2003-02-151-0/+2
| | | | | | | | | | | | | | * 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-0/+14
| | | | | | | 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.
* Update.Ulrich Drepper2003-02-031-1/+2
| | | | | | | | | | | 2003-01-31 Steven Munroe <sjmunroe@us.ibm.com> * sysdeps/unix/sysv/linux/powerpc/powerpc64/fe_nomask.c: Include kernel-features.h * sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: Likewise.
* * forward.c (pthread_self): Use FORWARD3 macro to correct return type.Roland McGrath2002-12-051-1/+1
| | | | | | | * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db. * sysdeps/generic/td_ta_map_lwp2thr.c: New file. * pthread_create.c (start_thread): Add missing & on __nptl_last_event.