Commit Graph

1740 Commits

Author SHA1 Message Date
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
Siddhesh Poyarekar
9c6ea9facb Fix stack size and address inconsistency due to executable stack
When a stack is marked executable due to loading a DSO that requires
an executable stack, the logic tends to leave out a portion of stack
after the first frame, thus causing a difference in the value returned
by pthread_getattr_np before and after the stack is marked
executable. It ought to be possible to fix this by marking the rest of
the stack as executable too, but in the interest of marking as less of
the stack as executable as possible, the path this fix takes is to
make pthread_getattr_np also look at the first frame as the underflow
end of the stack and compute size and stack top accordingly.

The above happens only for the main process stack. NPTL thread stacks
are not affected by this change.
2012-05-26 09:48:26 +05:30
Rayson Ho
1755728208 i386 port of the pthread SystemTap probes 2012-05-25 13:41:04 -07:00
Roland McGrath
5acf7263d5 Add systemtap static probe points in generic and x86_64 pthread code. 2012-05-25 13:41:03 -07:00
Roland McGrath
3a097cc7a1 Add --enable-systemtap configuration to define static probe points. 2012-05-25 13:40:20 -07:00
Andreas Jaeger
de7f5ce7c5 Fix warnings on Linux/i686
Fixes:
../sysdeps/i386/dl-machine.h:336:30: warning: unused variable ‘refsym’ [-Wunused-variable]
rtld.c:1435:3: warning: implicit declaration of function ‘_dl_discover_osversion’ [-Wimplicit-function-declaration]
2012-05-17 20:17:53 +02:00
Joseph Myers
048073995f Remove fallback definitions of __NR_set_robust_list. 2012-05-15 23:36:35 +00:00
Joseph Myers
a9538892ad Split up stackguard-macros.h into sysdeps directories. 2012-05-15 23:34:30 +00:00
H.J. Lu
f16af74217 Use R*_LP to load pointer and operate on stack 2012-05-15 14:25:31 -07:00
H.J. Lu
d9754f5572 Use LP_OP(cmp) and RCX_LP on dep_mutex pointer 2012-05-15 13:39:25 -07:00
H.J. Lu
dde05f0093 Use LP_OP(op), LP_SIZE and ASM_ADDR in sem_wait.S 2012-05-15 12:48:26 -07:00
H.J. Lu
9dba3b5c0a se LP_OP(op), LP_SIZE and ASM_ADDR in sem_timedwait.S 2012-05-15 12:47:31 -07:00
H.J. Lu
5f658cf147 Use LP_OP(cmp) on NWAITERS 2012-05-15 10:25:51 -07:00
H.J. Lu
6cae4b26ca Use LP_SIZE and ASM_ADDR in pthread_once.S 2012-05-15 10:24:19 -07:00
H.J. Lu
592f90e6ec Use LP_OP(cmp), R*_LP, LP_SIZE and ASM_ADDR 2012-05-15 10:23:22 -07:00
H.J. Lu
0e8860ad21 Use LP_OP(cmp), R*_LP, LP_SIZE and ASM_ADDR 2012-05-15 10:21:32 -07:00
H.J. Lu
30996e9369 Use LP_OP(cmp) and RCX_LP on dep_mutex pointer 2012-05-15 10:20:15 -07:00
H.J. Lu
289ac4352a Use LP_OP(mov) and RDI_LP on pointer 2012-05-15 10:19:11 -07:00
H.J. Lu
10f74fbcde Use LP_SIZE and load timeout pointer into RDX_LP 2012-05-15 10:03:56 -07:00
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
H.J. Lu
2949684c16 Add x32 support to tcbhead_t 2012-05-14 20:58:24 -07:00
H.J. Lu
245a11d7bd Add __PTHREAD_RWLOCK_INT_FLAGS_SHARED 2012-05-14 16:48:59 -07:00
H.J. Lu
0b254d8f3d Add sysdeps/x86_64/{64,x32}/shlib-versions 2012-05-14 16:23:57 -07:00
H.J. Lu
b8caea2cb9 Add x32 pthread types 2012-05-14 12:56:56 -07:00
H.J. Lu
d3c6600440 Update comments for CALL_THREAD_FCT 2012-05-11 14:58:18 -07:00
H.J. Lu
60d45b36a5 Add sysdeps/x86_64/x32/tls.h 2012-05-11 14:33:12 -07:00
H.J. Lu
eae2d36a96 Fix a typo in ChangeLo. 2012-05-11 11:34:48 -07:00
H.J. Lu
a04e06bc4c Use uint64_t on 64-bit integer 2012-05-11 10:14:57 -07:00
H.J. Lu
512ec530c7 Replace movq/%q0 with mov/%0 in THREAD_SELF 2012-05-11 10:13:54 -07:00
H.J. Lu
c0d2c8538a Check __x86_64__ for __cleanup_fct_attribute 2012-05-11 10:12:42 -07:00
H.J. Lu
1f59b0b121 Check __PTHREAD_MUTEX_HAVE_PREV for mutex initializers 2012-05-11 10:10:37 -07:00
H.J. Lu
c252ec1579 Check __PTHREAD_MUTEX_HAVE_PREV for mutex prev 2012-05-11 10:08:57 -07:00
Thomas Schwinge
be971a2b1c Hurd: libc_once_get 2012-05-10 15:57:24 -07:00
Chung-Lin Tang
e1b4354e66 Use CFI statements instead of hand-coding .eh_frame. 2012-05-09 17:48:42 +08:00
David S. Miller
76e835cf9e Fix minor fallout from yesterdays sparc nptl changes.
nptl/

	* sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
	always have to return 0, especially for the pthread_spin_init
	alias.
	* sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
	newline.
	* sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
	* sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
2012-05-03 11:48:13 -07:00
David S. Miller
e2dbf201ab Mirror i386 change on sparc: 'Avoid "anonymous" code in pthread_spin_lock'
nptl/

	* sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
	* sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
	* sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
	* sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
	* sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
	* sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
	* sysdeps/sparc/sparc64/pthread_spin_init.c: New.
	* sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
	* sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
	* sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
	* sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
	* sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
	* sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
	* sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
	* sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
	* sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
	* sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
	* sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
2012-05-02 19:04:54 -07:00
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
Paul Pluzhnikov
ff8a695b6d Kill trailing whitespace. 2012-05-02 14:01:37 -07:00
Paul Pluzhnikov
b93d565a51 Avoid "anonymous" code in pthread_spin_lock. 2012-05-02 13:58:40 -07:00
Andreas Schwab
6d5c57fabd Don't run tests when cross-compiling 2012-04-28 22:16:37 +02:00
Siddhesh Poyarekar
6e236b9276 move libgcc_s soname definition to shlib-versions 2012-04-26 09:19:54 +05:30
Paul Pluzhnikov
0cec7c5407 Delete unused TLS_GET_FS, TLS_SET_FS macros. 2012-04-20 09:52:13 -07:00