aboutsummaryrefslogtreecommitdiff
path: root/nptl/nptl-init.c
AgeCommit message (Collapse)Author
2015-09-17Use __pthread_setcancelstate in libc.aH.J. Lu
This patch references __pthread_setcancelstate instead of pthread_setcancelstate in libc.a. [BZ #18970] * misc/error.c (error): Replace pthread_setcancelstate with __pthread_setcancelstate. (error_at_line): Likewise. * posix/wordexp.c (parse_comm): Likewise. * stdlib/fmtmsg.c (fmtmsg): Likewise. * nptl/forward.c (pthread_setcancelstate): Renamed to ... (__pthread_setcancelstate): This. (pthread_setcancelstate): Add an alias. * nptl/nptl-init.c (pthread_functions): Replace ptr_pthread_setcancelstate with ptr___pthread_setcancelstate. * sysdeps/nptl/pthread-functions.h (pthread_functions): Likewise. * nptl/pthreadP.h (__pthread_setcancelstate): Mark it with hidden_proto. * nptl/pthread_setcancelstate.c (__pthread_setcancelstate): Mark it with hidden_def. * sysdeps/nptl/libc-lockP.h (__pthread_setcancelstate): New. (pthread_setcancelstate): Renamed to ... (__pthread_setcancelstate): This. * sysdeps/unix/sysv/linux/fatal-prepare.h (FATAL_PREPARE): Use __libc_ptf_call with __pthread_setcancelstate.
2015-07-10Add and use new glibc-internal futex API.Torvald Riegel
This adds new functions for futex operations, starting with wait, abstimed_wait, reltimed_wait, wake. They add documentation and error checking according to the current draft of the Linux kernel futex manpage. Waiting with absolute or relative timeouts is split into separate functions. This allows for removing a few cases of code duplication in pthreads code, which uses absolute timeouts; also, it allows us to put platform-specific code to go from an absolute to a relative timeout into the platform-specific futex abstractions.. Futex operations that can be canceled are also split out into separate functions suffixed by "_cancelable". There are separate versions for both Linux and NaCl; while they currently differ only slightly, my expectation is that the separate versions of lowlevellock-futex.h will eventually be merged into futex-internal.h when we get to move the lll_ functions over to the new futex API.
2015-05-22Fix nptl-init.c use of INTERNAL_SYSCALL_DECL.Roland McGrath
2015-05-20NaCl: Set tid field to a unique value.Roland McGrath
2015-01-08NPTL: Fixed missed conditionalization of setxid hooey.Roland McGrath
2015-01-02Update copyright dates with scripts/update-copyrights.Joseph Myers
2014-12-06Fix pthreads getrlimit, gettimeofday namespace (bug 17682).Joseph Myers
Some pthreads functions use getrlimit and gettimeofday, but these functions are XSI, not base POSIX; this is a namespace issue for dynamic linking as well as static linking. This patch makes them use __getrlimit and __gettimeofday instead - the former needed to be newly exported from libc.so at GLIBC_PRIVATE (and so now needs libc_hidden_proto / libc_hidden_def), the latter was already exported. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #17682] * resource/Versions (libc): Add __getrlimit at GLIBC_PRIVATE. * resource/getrlimit.c (__getrlimit): Use libc_hidden_def. * sysdeps/mach/hurd/getrlimit.c (__getrlimit): Likewise. * include/sys/resource.h (__getrlimit): Use libc_hidden_proto. * nptl/nptl-init.c (__pthread_initialize_minimal_internal): Use __getrlimit instead of getrlimit. * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait): Use __gettimeofday instead of gettimeofday. * nptl/pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise. * nptl/pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise. * sysdeps/pthread/aio_misc.c (handle_fildes_io): Likewise. * conform/Makefile (test-xfail-POSIX2008/aio.h/linknamespace): Remove variable. (test-xfail-POSIX2008/pthread.h/linknamespace): Likewise. (test-xfail-POSIX2008/time.h/linknamespace): Likewise.
2014-11-29Use ALIGN_UP in nptl/nptl-init.cCarlos O'Donell
Replace bespoke code to align a value with the ALIGN_UP macro to make it easier to read.
2014-11-12NPTL: Move __libc_multiple_threads_ptr defn to nptl-init.cRoland McGrath
2014-10-17NPTL: Clean up THREAD_SYSINFO macros.Roland McGrath
2014-10-17NPTL: Conditionalize direct futex syscall uses.Roland McGrath
2014-10-17NPTL: Conditionalize more uses of SIGCANCEL and SIGSETXID.Roland McGrath
2014-10-17Fix NPTL build error when missing __NR_set_robust_list.Roland McGrath
2014-07-11nptl: Fix abort in case of set*id failure [BZ #17135]Florian Weimer
If a call to the set*id functions fails in a multi-threaded program, the abort introduced in commit 13f7fe35ae2b0ea55dc4b9628763aafdc8bdc30c was triggered. We address by checking that all calls to set*id on all threads give the same result, and only abort if we see success followed by failure (or vice versa).
2014-04-01Check for syscall error in the SETXID implementation in NPTL (bug 13347).Florian Weimer
At this point, we can only abort the process because we have already switched credentials on other threads. Returning an error would still leave the process in an inconsistent state. The new xtest needs root privileges to run.
2014-02-10Use glibc_likely instead __builtin_expect.Ondřej Bílka
2014-01-01Update copyright notices with scripts/update-copyrightsAllan McRae
2013-06-15New API to set default thread attributesSiddhesh Poyarekar
This patch introduces two new convenience functions to set the default thread attributes used for creating threads. This allows a programmer to set the default thread attributes just once in a process and then run pthread_create without additional attributes.
2013-03-19Move __default_stacksize into __default_pthread_attrSiddhesh Poyarekar
Make __default_pthread_attr object to store default attribute values for threads.
2013-03-01Revert GLIBC_PTHREAD_DEFAULT_STACKSIZE changes.Carlos O'Donell
This reverts the change that allows the POSIX Thread default stack size to be changed by the environment variable GLIBC_PTHREAD_DEFAULT_STACKSIZE. It has been requested that more discussion happen before this change goes into 2.18.
2013-03-01Set default stack size from program environmentSiddhesh Poyarekar
New environment variable GLIBC_PTHREAD_DEFAULT_STACKSIZE to do this.
2013-01-02Update copyright notices with scripts/update-copyrights.Joseph Myers
2012-08-03Remove some pre-2.6.0 Linux kernel conditionals.Joseph Myers
2012-07-19Fix comment that describes sighandler_setxidSiddhesh Poyarekar
2012-05-30Remove use of INTDEF/INTUSE in nptlAndreas Schwab
2012-02-09Replace FSF snail mail address with URLs.Paul Eggert
2011-12-22Create internal threads with sufficient stack sizeUlrich Drepper
2011-09-15Avoid race between {,__de}allocate_stack and __reclaim_stacks during forkAndreas Schwab
2011-06-30Fix robust mutex handling after forkUlrich Drepper
2009-10-30Fix races in setXid implementation.Daniel Jacobowitz
2009-05-16Rename nptl/init.c to nptl/nptl-init.c.Ulrich Drepper
Needed to allow overwriting architectures init.c in csu and nptl individually. Fixes BZ #9924.