| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use STB_SECONDARY binding on pthread functions in libc so that they will
be preempted by definitions in libpthread at link-time as well as at
run-time.
* csu/libc-tls.c (__pthread_initialize_minimal): Mark it
secondary if HAVE_ASM_SECONDARY_DIRECTIVE is defined.
* 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/Makefile: Include ../Makeconfig.
(libc-libpthread-routines): New macro.
(libc-libpthread-static-only-routines): Likewise.
(static-only-routines): Add $(libc-libpthread-static-only-routines)
if $(have-secondary) is yes.
(routines): Add $(libc-libpthread-routines) if $(have-secondary)
is yes.
(CFLAGS-libc-pthread_unwind.c): New.
* nptl/Versions [HAVE_ASM_SECONDARY_DIRECTIVE] (libc:GLIBC_2.0):
Add _pthread_cleanup_pop_restore, _pthread_cleanup_push_defer,
__pthread_getspecific, __pthread_setspecific,
__pthread_key_create, pthread_once, __pthread_once,
__pthread_mutex_lock and __pthread_mutex_unlock.
[HAVE_ASM_SECONDARY_DIRECTIVE] (libc:GLIBC_2.2): Add
__pthread_rwlock_init, __pthread_rwlock_destroy,
__pthread_rwlock_rdlock, __pthread_rwlock_wrlock and
__pthread_rwlock_unlock.
[HAVE_ASM_SECONDARY_DIRECTIVE] (libc:GLIBC_PRIVATE): Add
__pthread_unwind and __pthread_setcancelstate.
[HAVE_ASM_SECONDARY_DIRECTIVE] (libpthread:GLIBC_PRIVATE): Add
__pthread_setcancelstate.
* nptl/forward.c [HAVE_ASM_SECONDARY_DIRECTIVE] (FORWARD2): New.
(FORWARD_NORETURN): Likewise.
(pthread_setcancelstate): Renamed to ...
(__pthread_setcancelstate): This. Don't define if
(__pthread_unwind): Don't define if HAVE_ASM_SECONDARY_DIRECTIVE
is defined.
* nptl/libc-cleanup_defer_compat.c: New file.
* nptl/libc-pthread_getspecific.c: Likewise.
* nptl/libc-pthread_key_create.c: Likewise.
* nptl/libc-pthread_mutex_lock.c: Likewise.
* nptl/libc-pthread_mutex_unlock.c: Likewise.
* nptl/libc-pthread_once.c: Likewise.
* nptl/libc-pthread_rwlock_destroy.c: Likewise.
* nptl/libc-pthread_rwlock_init.c: Likewise.
* nptl/libc-pthread_rwlock_rdlock.c: Likewise.
* nptl/libc-pthread_rwlock_unlock.c: Likewise.
* nptl/libc-pthread_rwlock_wrlock.c: Likewise.
* nptl/libc-pthread_setcancelstate.c: Likewise.
* nptl/libc-pthread_setspecific.c: Likewise.
* nptl/libc-pthread_unwind.c: Likewise.
* nptl/nptl-init.c (pthread_functions): Don't include secondary
pthread functions in libc if HAVE_ASM_SECONDARY_DIRECTIVE is
defined. Replace ptr_pthread_setcancelstate with
ptr___pthread_setcancelstate.
* sysdeps/nptl/pthread-functions.h (pthread_functions): Likewise.
* nptl/pthreadP.h (__pthread_unwind): Don't mark it weak if
HAVE_ASM_SECONDARY_DIRECTIVE is defined.
(__pthread_cond_broadcast_2_0): Declare only if not in libc.
(__pthread_cond_destroy_2_0): Likewise.
(__pthread_cond_init_2_0): Likewise.
(__pthread_cond_signal_2_0): Likewise.
(__pthread_cond_timedwait_2_0): Likewise.
(__pthread_cond_wait_2_0): Likewise.
* scripts/abilist.awk: Support secondary symbols.
* sysdeps/generic/localplt.data: Allow pthread functions.
* sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/i386/localplt.data: Likewise.
* sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise.
* sysdeps/nptl/bits/libc-lockP.h (PTFAVAIL): Defined as 1 if
HAVE_ASM_SECONDARY_DIRECTIVE is defined.
(__libc_maybe_call): Always call FUNC if
HAVE_ASM_SECONDARY_DIRECTIVE is defined.
(__libc_ptf_call): Likewise.
(__libc_ptf_call_always): Likewise.
(__pthread_mutex_init): Don't mark it weak if
HAVE_ASM_SECONDARY_DIRECTIVE is defined.
(__pthread_mutex_destroy): Likewise.
(__pthread_mutex_lock): Likewise.
(__pthread_mutex_trylock): Likewise.
(__pthread_mutex_unlock): Likewise.
(__pthread_mutexattr_init): Likewise.
(__pthread_mutexattr_destroy): Likewise.
(__pthread_mutexattr_settype): Likewise.
(__pthread_rwlock_destroy): Likewise.
(__pthread_rwlock_rdlock): Likewise.
(__pthread_rwlock_tryrdlock): Likewise.
(__pthread_rwlock_wrlock): Likewise.
(__pthread_rwlock_trywrlock): Likewise.
(__pthread_rwlock_unlock): Likewise.
(__pthread_key_create): Likewise.
(__pthread_setspecific): Likewise.
(__pthread_getspecific): Likewise.
(__pthread_once): Likewise.
(__pthread_initialize): Likewise.
(__pthread_atfork): Likewise.
(_pthread_cleanup_push_defer): Likewise.
(_pthread_cleanup_pop_restore): Likewise.
(__pthread_setcancelstate): New prototype.
(pthread_setcancelstate): Renamed to ...
(__pthread_setcancelstate): This. Don't mark it weak if
HAVE_ASM_SECONDARY_DIRECTIVE is defined.
* sysdeps/unix/sysv/linux/x86_64/cancellation.S (__pthread_unwind):
Likewise.
* sysdeps/unix/sysv/linux/fatal-prepare.h (FATAL_PREPARE): Always
call __pthread_setcancelstate if HAVE_ASM_SECONDARY_DIRECTIVE is
defined. Replace pthread_setcancelstate with
__pthread_setcancelstate.
* sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Make
__lll_lock_wait_private and __lll_unlock_wake_private weak in
libc.a.
* sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Replace bespoke code to align a value with
the ALIGN_UP macro to make it easier to read.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Make __default_pthread_attr object to store default attribute values
for threads.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
New environment variable GLIBC_PTHREAD_DEFAULT_STACKSIZE to do this.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
Needed to allow overwriting architectures init.c in csu and nptl
individually. Fixes BZ #9924.
|