Commit Graph

1167 Commits

Author SHA1 Message Date
Suzuki Poulose
38eb613663 Fix timer_create to initialize timer_t properly. 2009-09-02 19:58:50 -07:00
Andrew Stubbs
7812c65b90 SH lowlevellock broken for FUTEX_CLOCK_REALTIME. 2009-08-28 14:57:16 -07:00
Ulrich Drepper
84088310ce Handle AVX saving on x86-64 in interrupted smbol lookups.
If a signal arrived during a symbol lookup and the signal handler also
required a symbol lookup, the end of the lookup in the signal handler reset
the flag whether restoring AVX/SSE registers is needed.  Resetting means
in this case that the tail part of the outer lookup code will try to
restore the registers and this can fail miserably.  We now restore to the
previous value which makes nesting calls possible.
2009-08-25 10:42:30 -07:00
Ulrich Drepper
b42a214c18 Hint to kernel that thread stack memory can be removed. 2009-08-24 16:23:47 -07:00
Ulrich Drepper
2d094b7395 More namespace cleanups. 2009-08-23 13:59:41 -07:00
Ulrich Drepper
ae0d545003 Add CFI directives to x86-64 pthread_rwlock_unlock. 2009-08-11 20:47:36 -07:00
Ulrich Drepper
1bc2b97ee4 Add CFI directives to x86-64 pthread_rwlock_{rd,wr)lock. 2009-08-10 11:26:16 -07:00
Andreas Schwab
ec4922395b Fix check for PI mutex in x86-64 pthread_cond_signal
Register eax contains the syscall number, use a different one instead.
2009-08-10 08:10:11 -07:00
Ulrich Drepper
efa0569d2b Optimize x86-64 version of sem_timedwait. 2009-08-08 17:48:09 -07:00
Ulrich Drepper
49eea97b00 Another minor optimization of x86-64 pthread_cond_wait. 2009-08-08 10:21:46 -07:00
Ulrich Drepper
9083bcc5dc Small optimizations to cancellable x86-64 code. 2009-08-07 20:36:53 -07:00
Ulrich Drepper
421665c40a Optimize x86-64 syscall cancellation handling.
The syscall wrappers had to save and restore the syscall parameter
values and return value when calling the functions to enable/disable
cancellation were called.  Not anymore.  The called functions are
special and don't modify any unexpected registers.
2009-08-04 11:03:46 -07:00
Ulrich Drepper
bd03a1afa2 Macro cleanup.
Better definition of the *_NITSET macros.
2009-07-31 22:30:30 -07:00
Ulrich Drepper
586fa886ad Fix x86-64 TCB alignment for future processor versions. 2009-07-29 09:01:04 -07:00
Ulrich Drepper
b48a267b8f Preserve SSE registers in runtime relocations on x86-64.
SSE registers are used for passing parameters and must be preserved
in runtime relocations.  This is inside ld.so enforced through the
tests in tst-xmmymm.sh.  But the malloc routines used after startup
come from libc.so and can be arbitrarily complex.  It's overkill
to save the SSE registers all the time because of that.  These calls
are rare.  Instead we save them on demand.  The new infrastructure
put in place in this patch makes this possible and efficient.
2009-07-29 08:33:03 -07:00
Ulrich Drepper
b0948ffdcb Fix bookkeeping in mutex when using requeue_pi. 2009-07-28 09:40:39 -07:00
Ulrich Drepper
e73e694e38 pthread_mutex_unlock needs to use _rel semantics for atomic ops. 2009-07-27 13:46:56 -07:00
Ulrich Drepper
052757bfa6 Revert "Memory ordering in pthread_mutex_{,timed}lock."
This reverts commit 7b7f43bed1.
2009-07-27 13:43:01 -07:00
Ulrich Drepper
7b7f43bed1 Memory ordering in pthread_mutex_{,timed}lock.
All commits should have happened before the mutex lock is taken.
Therefore use the _rel variant of the cmpxchg atomic op.
2009-07-26 13:00:04 -07:00
Ulrich Drepper
01b597da40 Check for .cfi_{personality,lsda} on x86-64.
We need this support in NPTL now to avoid the hand-coded tables.
2009-07-23 17:15:56 -07:00
Ulrich Drepper
f1adf1f490 Fix pthread_cond_timedwait error handling on old kernels. 2009-07-23 16:39:06 -07:00
Ulrich Drepper
c3db953c16 Minor optimizations of last x86-64 condvar changes. 2009-07-20 08:39:47 -07:00
Ulrich Drepper
42e69bcf11 Support requeueing for condvars using PI mutex. x86-64 only.
Add support for the new FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI
options of futex.
2009-07-19 20:56:40 -07:00
Ulrich Drepper
515a8908ce Make x86-64 pthread_cond_timedwait more robust.
It just happens that __pthread_enable_asynccancel doesn't modify the $rdi
register.  But this isn't guaranteed.  Hence we reload the register after
the calls.
2009-07-19 14:54:56 -07:00
Ulrich Drepper
e2dca2fea3 Extend x86-64 __lll_robust_timedlock_wait to use futex syscall with absolute timeout. 2009-07-19 00:00:17 -07:00
Ulrich Drepper
3d77b2687f Add more sem_timedwait tests. 2009-07-18 22:07:25 -07:00
Ulrich Drepper
32c6c342b6 Extend x86-64 pthread_rwlock_timedrdlock to use futex syscall with absolute timeout. 2009-07-18 21:53:26 -07:00
Ulrich Drepper
d979611eb9 Extend x86-64 pthread_rwlock_timedwrlock to use futex syscall with absolute timeout. 2009-07-18 21:35:33 -07:00
Ulrich Drepper
f8b6cd2182 Extend pthread_cond_timedwait tests. 2009-07-18 12:45:27 -07:00
Ulrich Drepper
e88726b483 Extend x86-64 pthread_cond_timedwait to use futex syscall with absolute timeout. 2009-07-18 12:44:12 -07:00
Ulrich Drepper
92618c954f Optimize x86-64 pthread_cond_timedwait.
Instead of actively registering an unwind buffer we now use the
exception handling functionality of the gcc runtime.
2009-07-18 08:53:18 -07:00
Ulrich Drepper
30b1954abb Optimize x86-64 pthread_cond_wait.
Instead of actively registering an unwind buffer we now use the
exception handling functionality of the gcc runtime.
2009-07-18 08:09:39 -07:00
Ulrich Drepper
f351f2b756 Extend x86-64 sem_timedwait to use futex syscall with absolute timeout. 2009-07-17 19:08:54 -07:00
Ulrich Drepper
aee2665a17 Replace hand-coded unwind tables from x86-64 sem_timedwait. 2009-07-17 16:26:06 -07:00
Ulrich Drepper
0adae46817 Optimize x86-64 sem_wait for uncontested semaphore. 2009-07-17 15:50:23 -07:00
Ulrich Drepper
c3c2f3cf56 Replace hand-coded unwind tables from x86-64 sem_wait. 2009-07-17 15:31:36 -07:00
Ulrich Drepper
63601ccd16 Replace hand-coded unwind tables from x86-64 pthread_once. 2009-07-17 14:45:08 -07:00
Ulrich Drepper
d52c96e73a Replace hand-coded unwind tables from x86-64 pthread_cond_wait. 2009-07-17 12:14:09 -07:00
Ulrich Drepper
bfdb73e145 Implement pthread_sigqueue.
The kernel from 2.3.31 on supports the rt_tgsigqueueinfo syscall.
Use it to implement the non-standard extension which, like
sigqueue, can pass additional data to the receiving thread.
2009-06-12 08:34:02 -07:00
Bryan Kadzban
1828530f09 Fix futex syscall parameter for x86 absolute timeout waits.
This affects only installations compiled for kernels older than 2.6.18.
2009-06-11 11:32:51 -07:00
Ulrich Drepper
e20c4ef0ef libc-cancellation.c cleanup.
The unrelated function __libc_cleanup_routine should not be in
this file.  Move it into its own file.
2009-05-16 15:04:27 -07:00
Ulrich Drepper
cba0ca7925 Unify source for async cancel handling.
Unify all three places where we enable async cancellation for
syscalls.  Optimize a bit.
2009-05-16 14:55:59 -07:00
Ulrich Drepper
a5b8b56df7 Rename nptl/init.c to nptl/nptl-init.c.
Needed to allow overwriting architectures init.c in csu and nptl
individually.  Fixes BZ #9924.
2009-05-16 08:57:49 -07:00
Ulrich Drepper
6dd78596d5 ChangeLog entries incorrectly applied. 2009-05-15 21:03:49 -07:00
Jakub Jelinek
1f3615a1c9 Add missing export of fallocate64 on 32-bit platforms.
Due to a pasto the fallocate64 interface, introduced in glibc 2.10,
isn't exported for 32-bit Linux platforms.  It is too late for this
now so exported them for glibc 2.11.
2009-05-15 21:00:09 -07:00
Jakub Jelinek
9e471dad8e Don't try to cleanup libselinux and libaudit.
Because we are not shutting down the other threads first another
thread might work on a query before the process shuts down.  In this
case the now uninitialized libselinux and libaudit might be used.
Just don't free the resources.  It's not necessary anyway because
the process is about to terminate.
2009-05-15 20:48:08 -07:00
Ulrich Drepper
9437b427ce Fix change to prevent cancel signal in unsafe places.
The bits tested to decide when to delay the return when switching
off async cancel mode were wrong.  Fix that.  Also close a race
condition in pthread_cancel where the bit indicating the cancellation
is unconditionally set even if the cancel type might have changed.
2009-05-15 20:42:36 -07:00
Ulrich Drepper
1a7f254b4b No cancel signal in unsafe places.
When disabling async cancellation we cannot return from the function
call if the thread is canceled.  This happens when the cancel bits
have been set before async cancel is disabled but the signal hasn't
been sent/received yet.  Delay for as long as necessary since
otherwise the signal might be received in an unsafe context.
2009-05-15 19:37:12 -07:00
Jakub Jelinek
40de0fe350 Add missing CHangeLog entry.
2009-01-07  Ulrich Drepper  <drepper@redhat.com>

	* (in_flight_stack): New variable.
	(stack_list_del): New function.  Use instead of list_del.
	(stack_list_add): New function.  Use instead of list_add when adding to
	stack_cache and stack_used lists.
	(__reclaim_stacks): Complete operations on stack_cache and stack_used lists
	when the fork call interrupted another thread.
2009-04-29 18:04:10 +00:00
Ulrich Drepper
d5c157a978 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
is available.
	* libc-cancellation.c (__libc_disable_asynccancel): Likewise.
	* sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
	* sysdeps/i386/tls.h: Likewise.
	(tcbhead_t): Add __private_tm member.
2009-04-27 21:55:49 +00:00