Commit Graph

798 Commits

Author SHA1 Message Date
Andreas Schwab 842a39cd1a Remove unused pseudo_end label 2012-07-25 21:58:17 +02:00
Thomas Schwinge 4b2c8da708 SH: __lll_robust_timedlock_wait: Simplify CFI directives. 2012-06-23 12:17:44 +02:00
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 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
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
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
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 b8caea2cb9 Add x32 pthread types 2012-05-14 12:56:56 -07:00
H.J. Lu c0d2c8538a Check __x86_64__ for __cleanup_fct_attribute 2012-05-11 10:12:42 -07:00
Chung-Lin Tang e1b4354e66 Use CFI statements instead of hand-coding .eh_frame. 2012-05-09 17:48:42 +08:00
H.J. Lu 4adaaafc9e Use __NR_futex to define SYS_futex 2012-03-19 14:54:35 -07:00
David S. Miller 7e7fa5f871 Fix libc-lowlevellock.c sysdep finding more generically.
nptl/

	[BZ #13844]
	* sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
	instead of "...".
	* sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
	Delete, not needed.
2012-03-16 20:40:54 -07:00
David S. Miller c4a7b16eb8 Add missing sparc32 NPTL file otherwise we use the wrong lowlevellock.c implementation.
nptl/

	[BZ #13844]
	* sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
2012-03-15 21:13:02 -07:00
David S. Miller c64bf5feb3 Update copyright year after my most recent changes.
nptl/

	* sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.

/

	* sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c: Update
	copyright year.
	* sysdeps/unix/sysv/linux/sparc/sysdep.h: Likewise.
2012-03-08 15:09:27 -08:00
Thomas Schwinge 2edd9a79e5 Work around kernel rejecting valid absolute timestamps. 2012-03-08 11:22:41 +01:00
Thomas Schwinge c564a81246 Invalid timeouts in SH sem_timedwait.
We adjusted nwaiters even though this isn't necessary.
2012-03-08 10:45:05 +01:00
Thomas Schwinge 48aff7765b Fix 9554ebf2d4.
| Invalid timeouts in i386 sem_timedwait.
|
| We adjusted nwaiters even though this isn't necessary.
2012-03-08 09:33:12 +01:00
Thomas Schwinge 840df61ea4 Get rid of superfluous assignments in sem_timedwait 2012-03-07 04:11:11 -05:00
David S. Miller e92584001a Fix several build warnings on sparc.
/

	* sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
	(set_obp_int): New function.
	(get_obp_int): New function.
	(__get_clockfreq_via_dev_openprom): Likewise.
	* sysdeps/unix/sysv/linux/sparc/sysdep.h (INTERNAL_SYSCALL_ERROR_P): Avoid
	unused variable warnings on 'val' and use builtin_expect.
	(INLINE_SYSCALL): Don't wrap INTERNAL_SYSCALL_ERROR_P with builtin_expect.
	(INLINE_CLONE_SYSCALL): Likewise.

nptl/

	* sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
	atomic_increment and remove unused local variable.
	(__old_sem_post): Likewise.
2012-03-06 11:15:26 -08:00
David S. Miller 22f9d9df92 Fix stray references to __pthread_attr
* sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to non-existing
	__pthread_attr.
	* sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
	* sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
	* sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2012-02-27 12:59:16 -08:00
Ulrich Drepper 8da0464f6f Fix name mangling of pthread_attr_t after change 2012-02-26 21:42:53 -05:00
Ulrich Drepper 4a3dded527 Work around problem of pthread_attr_t definition with old compilers 2012-02-26 17:41:17 -05:00
Ulrich Drepper 4efeffc1d5 Fix up POSIX testing in conformtest 2012-02-26 13:17:27 -05:00
Richard Henderson e3b69ca7d1 s390: Convert to crt[in].S. 2012-02-16 09:24:19 -08:00
Kaz Kojima df83af673b Add SH target specific crti.S and crtn.S and remove initfini files.
Add sysdeps/sh/crti.S, sysdeps/sh/crtn.S and remove sysdeps/sh/elf/initfini.c
and nptl/sysdeps/unix/sysv/linux/sh/pt-initfini.c.
2012-02-16 07:17:24 +09:00
Marek Polacek d463ab10dd Remove unused Makefile. 2012-02-15 21:07:06 +01:00
Paul Eggert 59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Joseph Myers 3add8e1353 Support crti.S and crtn.S provided directly by architectures. 2012-02-08 01:45:26 +00:00
Joseph Myers 9a1d92541f Consistently use macros for x86 PIC thunks. 2012-02-03 23:22:53 +00:00
Adhemerval Zanella 232872379e Use __pthread_get_minstack for AIO helper thread 2012-01-08 19:56:52 -05:00
Marek Polacek c473bd1cd9 Quash implicit declaration warning 2012-01-08 13:21:50 -05:00
Ulrich Drepper 120ced3f5d Remove IA-64 support from NPTL 2012-01-07 12:16:05 -05:00
Ulrich Drepper ee9e064083 Use __pthread_get_minstack in more places 2011-12-22 22:58:17 -05:00
Ulrich Drepper 2c1094bd70 Create internal threads with sufficient stack size 2011-12-22 22:43:39 -05:00
Ulrich Drepper 60e8585f2a Fix reading thread name from comm file 2011-12-21 19:26:29 -05:00
Andreas Schwab c5a0802a68 Handle EAGAIN from FUTEX_WAIT_REQUEUE_PI 2011-11-30 11:03:19 +01:00
Ulrich Drepper c2b18f7a0e Add missing register initialization in x86-64 pthread_cond_timedwait 2011-10-29 15:50:01 -04:00
Ulrich Drepper d063d16433 Remove support for !USE___THREAD 2011-09-10 16:50:28 -04:00
H.J. Lu 1e4bd093e6 Fix macro used in test 2011-09-08 23:53:04 -04:00
Ulrich Drepper 9e5c9dcd57 Remove gettimeofday vsyscall use from x86-86 libpthread 2011-09-07 00:14:06 -04:00
Ulrich Drepper a0e1f41bd4 Don't call gettimeofday vsyscall in x86-64 sem_timedwait 2011-09-06 23:17:53 -04:00
David S. Miller 39c4451cec Fix nptl semaphore cleanup invocation. 2011-09-05 10:01:52 -07:00
Andreas Schwab a724d1b9bf Fix stack alignment on x86_64 2011-08-09 10:07:10 -04:00
Ulrich Drepper 6f8326cacd Fix robust mutex handling after fork 2011-06-30 20:41:34 -04:00
Jim Meyering ded5b9b7c7 Remove doubled words. 2011-04-22 21:34:32 -04:00
Dinakar Guniguntala 022f6b8920 Fix x86 pthread_cond_signal() FUTEX_WAKE_OP fallback 2010-08-19 00:46:19 -07:00
H.J. Lu f8392f4004 Add -fno-asynchronous-unwind-tables to initfini.s for i386 2010-08-15 20:09:23 -07:00
Alan Modra bebff237c5 PowerPC64 ABI fixes 2010-08-12 09:19:19 -07:00
Andreas Schwab e8ee8bdf2a Fix type mismatch 2010-07-06 08:08:46 -07:00
Andreas Schwab 2983d85ee5 Work around kernel rejecting valid absolute timestamps 2010-07-01 19:07:14 -07:00
Takashi Yoshii 4bc93b3033 [sh] Fix incorrect location of ifndef for __ASSUME_FUTEX_CLOCK_REALTIME. 2010-06-14 16:56:22 -07:00
Ulrich Drepper 5d7a6541c2 Fix typo in last commit. 2010-04-09 12:29:18 -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
Michal Schmidt 893549c5a0 Fix pthread_cond_*wait with requeue-PI on i386. 2010-01-15 18:09:14 -08:00
Thomas Schwinge d34bd80fce Fix s390 startup code in libpthread. 2009-12-22 08:37:33 -08:00
Ulrich Drepper 23b8575625 More whitespace fixes. 2009-12-13 11:52:28 -08:00
Ulrich Drepper 5a9e37df22 Fix whitespaces. 2009-12-13 11:51:54 -08:00
Dinakar Guniguntala 75956694f3 Add Requeue-PI support for x86 arch. 2009-12-13 11:50:16 -08:00
Ulrich Drepper 9554ebf2d4 Invalid timeouts in i386 sem_timedwait.
We adjusted nwaiters even though this isn't necessary.
2009-12-12 11:06:23 -08:00
Thomas Schwinge ebb92a491f SH calling __gmon_start__ from pt-initfini.c. 2009-11-30 06:24:22 -08:00
Andreas Schwab b55ec98c64 Fix infloop in __pthread_disable_asynccancel on x86_64 2009-11-27 21:37:30 -08:00
Roland McGrath 57a299fe47 Use #include instead of duplication for i386 vs i686 dl-sysdep.h in NPTL. 2009-11-22 17:49:21 -08:00
Ulrich Drepper dfedb126d6 Minor optimizations and cleanups of x86 cond_broadcast. 2009-11-18 06:40:25 -08:00
Dinakar Guniguntala dd7106b3c6 Update cfi offsets for pthread_cond_broadcast and signal fir x86. 2009-11-18 06:33:23 -08:00
Ulrich Drepper 62616842ec Minimal unwind section size reduction. 2009-11-17 23:13:08 -08:00
Ulrich Drepper f8c10bb45b Use cfi directives in x86 pthread_cond_{,timed}wait. 2009-11-17 17:59:33 -08:00
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 2d094b7395 More namespace cleanups. 2009-08-23 13:59:41 -07:00
Ulrich Drepper cd16986ee3 Rvert accidental checkins. 2009-08-22 17:58:04 -07:00
Andreas Schwab 15efafdf07 Add sigstack handling to Linux ____longjmp_chk on powerpc. 2009-08-22 02:01:51 -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 b0948ffdcb Fix bookkeeping in mutex when using requeue_pi. 2009-07-28 09:40:39 -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 32c6c342b6 Extend x86-64 pthread_rwlock_timedrdlock to use futex syscall with absolute timeout. 2009-07-18 21:53:26 -07:00
Ulrich Drepper 4c74e6522a Pretty printing last change. 2009-07-18 21:41:52 -07:00