Commit Graph

240 Commits

Author SHA1 Message Date
Carlos O'Donell
4e9b599577 Revert GLIBC_PTHREAD_DEFAULT_STACKSIZE changes.
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-01 16:18:08 -05:00
Siddhesh Poyarekar
e23872c8db Set default stack size from program environment
New environment variable GLIBC_PTHREAD_DEFAULT_STACKSIZE to do this.
2013-03-01 14:15:39 +05:30
H.J. Lu
740b3dbee8 Add --enable-hardcoded-path-in-tests configure option 2013-01-11 07:14:18 -08:00
Joseph Myers
568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Allan McRae
e30907c3a4 Remove unneeded linking in nptl testsuite 2012-12-03 13:56:07 +10:00
Marcus Shawcroft
c485e4d2cc Adding missing -fexception CFLAGS 2012-11-14 12:35:10 +00:00
Aurelien Jarno
a9879fee34 Fix nptl/tst-cancel7 for non-bash shells. 2012-10-30 16:32:26 +00:00
Joseph Myers
6a345e4261 Use bash to run nptl/tst-tls6.sh. 2012-10-25 21:59:14 +00: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
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
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
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
Dmitry V. Levin
57c69bef13 Set "fail on error" mode directly in testsuite shell scripts 2012-09-25 02:48:31 +00: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
033d54a2d4 Fix sem_post race (bug 14532). 2012-08-31 19:49:31 +00:00
Roland McGrath
c75ccd4c3a Clean up definition of _LIBC_REENTRANT and _IO_MTSAFE_IO. 2012-08-17 09:35:15 -07: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
Siddhesh Poyarekar
439bf404b8 Allow a single-threaded program to cancel itself
There is nothing in the POSIX specification to disallow a
single-threaded program from cancelling itself, so we forcibly enable
multiple_threads to allow the next available cancellation point in the
thread to run.

Also added additional tests to cover various cancellation scenarios.
2012-05-15 09:41:57 +05:30
Allan McRae
d4c2917fc5 Fix test-suite failues with -Wl,--as-needed
Signed-off-by: Allan McRae <allan@archlinux.org>
2012-05-02 20:32:50 -04:00
Andreas Schwab
6d5c57fabd Don't run tests when cross-compiling 2012-04-28 22:16:37 +02:00
Ulrich Drepper
a4300c7a4d Remove distribute variable from Makefiles 2012-03-07 05:17:13 -05:00
Joseph Myers
0e7dfaef51 Remove old initfini mechanism. 2012-02-21 00:46:01 +00:00
Paul Eggert
59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Andreas Schwab
2832840339 Add missing dependency for pt-crti.o 2012-02-08 16:16:42 +01:00
Joseph Myers
3add8e1353 Support crti.S and crtn.S provided directly by architectures. 2012-02-08 01:45:26 +00:00
Ulrich Drepper
2119dcfacc Static linking is always needed 2012-01-08 09:52:29 -05:00
Ulrich Drepper
0269750ca6 Remove non-ELF support 2012-01-07 20:30:26 -05:00
David S. Miller
e315850c08 Fix typo in tst-cleanup0.out rule. 2011-08-20 21:19:28 -07:00
Andreas Schwab
1f20b93a6c Fix missing dependencies and ensure correct CPPFLAGS. 2011-01-16 21:32:07 -05:00
Andreas Schwab
2983d85ee5 Work around kernel rejecting valid absolute timestamps 2010-07-01 19:07:14 -07:00
Ulrich Drepper
72b6e8c85b Fix build with newer linker. 2010-07-01 19:03:29 -07:00
Ulrich Drepper
86a4c67fb9 Implement interfaces to set and get names of threads.
At least the Linux kernel provides field where the kernel originally
stores the command which is executed by the thread.  The value can
subsequently be overwritten.  The added functions allow to do that for
threads, providing and abstraction around the syscalls or /proc file
system accesses needed.
2010-04-09 01:09:24 -07:00
Ulrich Drepper
80b3a4ea1c New NPTL POSIX semaphore test. 2009-11-24 16:37:29 -08:00
Ulrich Drepper
3d77b2687f Add more sem_timedwait tests. 2009-07-18 22:07:25 -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
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
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
0e54a7250f [BZ #7009] 2008-11-12 13:41:14 +00:00
Ulrich Drepper
10bb97c793 (tests): Add tst-rwlock2a. 2008-05-31 08:56:14 +00:00
Roland McGrath
363a641b1c * Makeconfig (sysd-rules-targets): New variable.
* sysdeps/unix/make-syscalls.sh: Use it in the rules emitted.
	* sysdeps/unix/Makefile (omit-deps): Append variants for each target.
2008-02-01 00:01:25 +00:00
Ulrich Drepper
f6ed654cab * sysdeps/x86_64/memset.S: Add sfence after movnti. 2007-11-08 01:07:04 +00:00
Ulrich Drepper
2a01ce56b7 [BZ #4938]
2007-08-21  Ulrich Drepper  <drepper@redhat.com>
	[BZ #4938]
	* allocatestack.c (__reclaim_stacks): Clear the TSD in the
	reclaimed stack if necessary.
	* Makefile (tests): Add tst-tsd6.
	* tst-tsd6.c: New file.
2007-08-21 23:55:36 +00:00
Ulrich Drepper
3d2dd6ca71 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
* sem_init.c (__new_sem_init): Rewrite to initialize all three
	fields in the structure.
	(__old_sem_init): New function.
	* sem_open.c: Initialize all fields of the structure.
	* sem_getvalue.c: Adjust for renamed element.
	* sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
	(gen-as-const-headers): Add structsem.sym.
	* sysdeps/unix/sysv/linux/structsem.sym: New file.
	* sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
	struct new_sem.  Add struct old_sem.
	* sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
	* sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
	* sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
	* sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
	* sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
	* Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
	* tst-sem10.c: New file.
	* tst-sem11.c: New file.
	* tst-sem12.c: New file.
	* tst-typesizes.c: Test struct new_sem and struct old_sem instead
	of struct sem.

2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2007-05-26 01:31:40 +00:00