Commit Graph

1781 Commits

Author SHA1 Message Date
Jim Blandy
166bca2480 Add and use $(host-built-program-cmd). 2012-10-23 22:49:59 +00:00
Jim Blandy
aba759841b Use $(NM) not nm in tst-cancel-wrappers. 2012-10-21 22:38:34 +00:00
Siddhesh Poyarekar
370539fb64 Fix typo in nptl/ChangeLog 2012-10-17 21:05:29 +05:30
Siddhesh Poyarekar
37785907d5 Don't check error return for pthread_cancel in tst-cond25 2012-10-17 21:02:56 +05:30
Siddhesh Poyarekar
9485a40444 Adjust mutex lock in condvar_cleanup if we got it from requeue_pi
This completes the fix to bz #14652.
2012-10-16 14:23:35 +05:30
Carlos O'Donell
54a417345e Fixup nptl/ChangeLog for last commit. 2012-10-10 23:34:38 -04:00
Carlos O'Donell
0d522f6417 Fix formatting in nptl/sysdeps/pthread/pthread.h.
The macro pthread_cleanup_push_defer_np in pthread.h has a misaligned
line continuation marker. This marker was previously aligned, but
recent changes have moved it out of alignment. This change realigns
the marker. This also reduces the diff against the hppa version of
pthread.h where the marker is aligned.
2012-10-10 23:28:52 -04:00
Siddhesh Poyarekar
0e3b5d6a68 Take lock in pthread_cond_wait cleanup handler only when needed
[BZ #14652]
When a thread waiting in pthread_cond_wait with a PI mutex is
cancelled after it has returned successfully from the futex syscall
but just before async cancellation is disabled, it enters its
cancellation handler with the mutex held and simply calling a
mutex_lock again will result in a deadlock.  Hence, it is necessary to
see if the thread owns the lock and try to lock it only if it doesn't.
2012-10-10 12:52:56 +05:30
Roland McGrath
b8493de0ec Add missing magic to GLIBC_PROVIDES. 2012-10-09 15:41:30 -07:00
David S. Miller
f076216468 Correct libthreadb register access for 64-bit sparc.
[BZ #14568]
	* sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
	(DB_THREAD_SELF): Use constants for the register offsets.  Correct
	the case of a 64-bit debugger with a 32-bit inferior.
2012-10-05 21:22:41 -07:00
H.J. Lu
1d1b34df90 Add test cases for BZ #14557 2012-10-05 10:23:58 -07:00
Siddhesh Poyarekar
c30e8edf7c Unlock mutex before going back to waiting for PI mutexes
[BZ #14417]
A futex call with FUTEX_WAIT_REQUEUE_PI returns with the mutex locked
on success.  If such a successful thread is pipped to the cond_lock by
another spuriously woken waiter, it could be sent back to wait on the
futex with the mutex lock held, thus causing a deadlock.  So it is
necessary that the thread relinquishes the mutex before going back to
sleep.
2012-10-05 18:52:36 +05:30
Roland McGrath
9043e2288e Name space hygeine for madvise. 2012-10-04 16:31:43 -07:00
H.J. Lu
b2f80a478e Update copyright years 2012-10-02 16:50:47 -07:00
Siddhesh Poyarekar
adcdc775e1 Fix clone flag name in comment to CLONE_CHILD_CLEARTID. 2012-10-02 08:52:55 +05:30
Siddhesh Poyarekar
55a051c985 Fix exception table for i386 pthread_cond_wait
[BZ #14477]
Add an additional entry in the exception table to jump to
__condvar_w_cleanup2 instead of __condvar_w_cleanup for PI mutexes
when %ebx contains the address of the futex instead of the condition
variable.
2012-10-01 23:21:39 +05:30
Alan Modra
7e2fca8dd2 Fix bugs in powerpc pthread_once.
Ref gcc.gnu.org/bugzilla/show_bug.cgi?id=52839#c10

Release barriers are needed to ensure that any memory written by
init_routine is seen by other threads before *once_control changes.
In the case of clear_once_control we need to flush any partially
written state.
2012-09-25 16:30:06 -05:00
Dmitry V. Levin
57c69bef13 Set "fail on error" mode directly in testsuite shell scripts 2012-09-25 02:48:31 +00:00
Dmitry V. Levin
9a9028b1fe Add copyright notices to testsuite shell scripts 2012-09-25 02:48:13 +00:00
H.J. Lu
620f3d2670 Add "()" when casting to uint64_t for 64-bit store 2012-09-24 09:11:12 -07:00
H.J. Lu
ae30640a32 Cast to uint64_t for 64-bit store 2012-09-19 06:12:37 -07:00
Jeff Law
97bc38d7a5 [BZ #14583]
* sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
2012-09-14 14:31:29 -06:00
H.J. Lu
9503345f12 Remove unused __rtld_lock_init_recursive macro 2012-09-13 09:58:58 -07:00
H.J. Lu
70d37fe0b5 Fix a typo in ChangeLog 2012-09-10 05:18:44 -07:00
H.J. Lu
e9ceaf254c Rename LDFLAGS-XXX to LDLIBS-XXX for -lstdc++ 2012-09-07 14:11:47 -07:00
H.J. Lu
f5fce0629a Add tst-cancel21-static.c 2012-09-06 11:50:21 -07:00
Joseph Myers
26889eacc2 Remove __ASSUME_POSIX_CPU_TIMERS. 2012-09-01 21:32:04 +00:00
Joseph Myers
033d54a2d4 Fix sem_post race (bug 14532). 2012-08-31 19:49:31 +00:00
Roland McGrath
b2e1c56272 Make libio compile without _IO_MTSAFE_IO. 2012-08-17 09:35:36 -07:00
Roland McGrath
c75ccd4c3a Clean up definition of _LIBC_REENTRANT and _IO_MTSAFE_IO. 2012-08-17 09:35:15 -07:00
Joseph Myers
93a78ac437 Remove __ASSUME_POSIX_TIMERS. 2012-08-16 14:03:43 +00:00
Maxim Kuvyrkov
309becf120 Optimize __libc_lock_lock and __libc_lock_trylock for MIPS. 2012-08-15 16:44:30 -07:00
Maxim Kuvyrkov
ef4009734b Add generic versions of pthread_spin_lock and pthread_spin_trylock. 2012-08-15 16:29:06 -07:00
Joseph Myers
b36137f1d6 Remove __ASSUME_TGKILL. 2012-08-08 23:22:53 +00:00
Joseph Myers
93df14eee8 Remove some pre-2.6.16 Linux kernel conditionals. 2012-08-07 23:03:35 +00:00
Joseph Myers
85fe199795 Remove some pre-2.6.0 Linux kernel conditionals. 2012-08-03 19:54:08 +00:00
Siddhesh Poyarekar
fc56c5bbc1 Fix tst-pthread-getattr test case
Get the tst-pthread-getattr fix back with further improvements so that
it does not fail on targets that use the user stack to save
context.
2012-07-28 13:25:01 +05:30
Andreas Schwab
842a39cd1a Remove unused pseudo_end label 2012-07-25 21:58:17 +02:00
Siddhesh Poyarekar
77b32274e9 Revert fix to tst-pthread-getattr since it fails on sparc 2012-07-25 20:43:55 +05:30
Siddhesh Poyarekar
b2ae49dab8 Fix tst-pthread-getattr test case
In some cases, the compiler would optimize out the call to
allocate_and_test and thus result in a false positive for the test
case. Another problem was the fact that the compiler could in some
cases generate additional shifting of the stack pointer, resulting in
alloca moving the stack pointer beyond what is allowed by the
rlimit. Hence, accessing the stackaddr returned by pthread_getattr_np
is safer than relying on the alloca'd result.

Another problem is when RLIMIT may be very large, which may result in
violation of other resource limits. Hence we cap the max stack size to
8M for this test.
2012-07-20 23:28:34 +05:30
Siddhesh Poyarekar
a98430587c Fix comment that describes sighandler_setxid 2012-07-19 07:04:24 +05:30
Thomas Schwinge
4b2c8da708 SH: __lll_robust_timedlock_wait: Simplify CFI directives. 2012-06-23 12:17:44 +02:00
Siddhesh Poyarekar
18b5e737de Account for the extra stack size when rlimit is small enough
When rlimit is small enough to be used as the stacksize to be returned
in pthread_getattr_np, cases where a stack is made executable due to a
DSO load get stack size that is larger than what the kernel
allows. This is because in such a case the stack size does not account
for the pages that have auxv and program arguments.

Additionally, the stacksize for the process derived from this should
be truncated to align to page size to avoid going beyond rlimit.
2012-06-20 15:08:22 +05:30
Carlos Sánchez de La Lama
24a6dbed9b Fix build on non-v9 sparc32.
nptl/

	[BZ #14205]
	* sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
	branches.
2012-06-07 11:57:09 -07:00
Siddhesh Poyarekar
4af3879c26 Wrap __builtin_expect in pthread.h
[BZ #14188]
This fixes compilation of programs using pthread_cleanup_push built
with non-gcc compilers and older gcc compilers.
2012-06-04 11:53:57 +05:30
H.J. Lu
0e20515a17 Use x86-64 bits/pthreadtypes.h/semaphore.h for i386/x86-64 2012-05-30 17:29:22 -07:00
Andreas Schwab
865eac65c2 Move CL entry 2012-05-30 08:49:59 +02:00
Andreas Schwab
4d17e68350 Remove use of INTDEF/INTUSE in nptl 2012-05-30 00:45:53 +02:00
Chung-Lin Tang
d701a1abe2 SH: Add CFI directives. 2012-05-28 00:47:07 +02:00
Chung-Lin Tang
65a4de4e06 SH: Add CFI directives. 2012-05-28 00:11:06 +02:00