Commit Graph

1812 Commits

Author SHA1 Message Date
Andreas Schwab
903ae060db Don't use GLIBC_PRIVATE errno outside of libraries 2013-02-04 10:01:54 +01:00
Andreas Schwab
cfa8054fbb Hide reference to mktemp in libpthread 2013-01-16 15:57:11 +01:00
Carlos O'Donell
c0609c5c5e Remove unnecessary assert on attr in allocate_stack(). 2013-01-11 20:52:05 -05:00
H.J. Lu
740b3dbee8 Add --enable-hardcoded-path-in-tests configure option 2013-01-11 07:14:18 -08:00
Andreas Schwab
e3f45e2bbe Revert "Extend i486 pthread_cond_timedwait to use futex syscall with absolute timeout"
This reverts commit 1bd57044e9.
2013-01-10 10:44:05 +01:00
Andreas Schwab
1bd57044e9 Extend i486 pthread_cond_timedwait to use futex syscall with absolute timeout
* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
	(__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
	directly use absolute timeout.
2013-01-10 09:59:58 +01:00
Joseph Myers
568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Joseph Myers
f4cf5f2d8b Add script to update copyright notices and reformat some to facilitate its use. 2013-01-01 16:29:10 +00:00
Andi Kleen
c93c5dec54 Convert pthread_rwlock_try(rd/wr)lock to prototypes
2012-12-28  Andi Kleen  <ak@linux.intel.com>

        * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock):
        * Convert
	to prototype.
        * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock):
	Likewise.
2012-12-28 21:25:07 +01:00
David S. Miller
9c7595bda2 Add sparc implementation of lll_futex_timed_wait_bitset
nptl/

	* sysdeps/unix/sysv/linux/sparc/lowlevellock.h
	(lll_futex_timed_wait_bitset): New macro.
2012-12-27 08:20:46 -08:00
Siddhesh Poyarekar
8ebac7785b [s390] Replace lll_futex_* assembly code with INTERNAL_SYSCALL 2012-12-27 20:43:02 +05:30
Siddhesh Poyarekar
56e7d3ad5c Fix some build warnings on s390x 2012-12-08 13:03:24 +05:30
Joseph Myers
d39b954531 Remove unused variable from powerpc sem_post.c. 2012-12-04 21:39:04 +00:00
Allan McRae
e30907c3a4 Remove unneeded linking in nptl testsuite 2012-12-03 13:56:07 +10:00
H.J. Lu
c515fb5148 Cast to __intptr_t before casting pointer to int64 2012-11-26 16:45:36 -08:00
Joseph Myers
09e958ed42 Remove unused variable from sem_post.c. 2012-11-21 20:00:52 +00:00
Joseph Myers
fac9916c96 Remove unused variable from pthread_cond_timedwait.c. 2012-11-21 20:00:11 +00:00
Marcus Shawcroft
c485e4d2cc Adding missing -fexception CFLAGS 2012-11-14 12:35:10 +00:00
Chris Metcalf
91e0d40e89 Bump timeouts on some new nptl tests to support tilepro. 2012-11-06 13:10:19 -05:00
Siddhesh Poyarekar
8f861542dd [S390,PPC] Implement FUTEX_WAIT_BITSET for timedwait functions
Since the FUTEX_WAIT operation takes a relative timeout, the
pthread_cond_timedwait and other timed function implementations have
to get a relative timeout from the absolute timeout parameter it gets
before it makes the futex syscall.  This value is then converted back
into an absolute timeout within the kernel.  This is a waste and has
hence been improved upon by a FUTEX_WAIT_BITSET operation (OR'd with
FUTEX_CLOCK_REALTIME to make the kernel use the realtime clock instead
of the default monotonic clock).  This was implemented only in the x86
and sh assembly code and not in the C code.  This patch implements
support for FUTEX_WAIT_BITSET whenever available (since linux-2.6.29)
for s390 and powerpc.
2012-11-05 21:12:52 +05:30
David S. Miller
d3bd58cf0a Fix coding style in sparc lowlevellock.h
nptl/

	* sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
	Add missing spaces.
	(__cpu_relax): Likewise.
2012-11-03 15:25:55 -07:00
H.J. Lu
f62c8abcfb Compile x86 rtld with -mno-sse -mno-mmx 2012-11-02 18:43:27 -07:00
Aurelien Jarno
a9879fee34 Fix nptl/tst-cancel7 for non-bash shells. 2012-10-30 16:32:26 +00:00
David S. Miller
19f1dd5f2d Define a BUSY_WAIT_NOP for sparc.
nptl/

	* sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
	Define when we have v9 instructions available.
	* sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
	file.
	* sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
	file.
	* sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
	to libpthread-routines.
2012-10-28 23:19:00 -07:00
Roland McGrath
b9473651bc Fix build breakage in tst-cond-except.c. 2012-10-25 17:02:51 -07:00
Joseph Myers
6a345e4261 Use bash to run nptl/tst-tls6.sh. 2012-10-25 21:59:14 +00:00
Roland McGrath
c0a1472e22 Fix compiler warnings in some NPTL tests. 2012-10-25 14:43:10 -07:00
Joseph Myers
cc1290d07e Support cross-testing. 2012-10-24 21:59:01 +00:00
Roland McGrath
6e6249d0b4 BZ#14743: Move clock_* symbols from librt to libc. 2012-10-24 14:50:46 -07:00
Joseph Myers
0bf57f872c Don't set resource limits in tst-oddstacklimit-ENV. 2012-10-24 17:13:24 +00:00
Joseph Myers
03ac099f6b Define and use $(run-built-tests). 2012-10-24 00:08:46 +00:00
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