gcc/libgomp/config/linux
Jakub Jelinek bfee0724e0 wait.h (do_spin): New inline...
* config/linux/wait.h (do_spin): New inline, largely copied
	from do_wait, just don't do futex_wait here, instead return true if
	it should be done.
	(do_wait): Implement using do_spin.
	* config/linux/mutex.h (gomp_mutex_lock_slow): Add an int argument
	to prototype.
	(gomp_mutex_lock): Use __sync_val_compare_and_swap instead of
	__sync_bool_compare_and_swap, pass the oldval to
	gomp_mutex_lock_slow.
	* config/linux/mutex.c (gomp_mutex_lock_slow): Add oldval argument.
	If all mutex contenders are just spinning and not sleeping, don't
	change state to 2 unnecessarily.  Optimize the loop when state has
	already become 2 to use just one atomic operation per loop instead
	of two.
	* config/linux/ia64/mutex.h (gomp_mutex_lock_slow): Add an int argument
	to prototype.
	(gomp_mutex_lock): Use __sync_val_compare_and_swap instead of
	__sync_bool_compare_and_swap, pass the oldval to
	gomp_mutex_lock_slow.

From-SVN: r176326
2011-07-15 21:46:11 +02:00
..
alpha Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
arm futex.h: New. 2010-10-06 16:42:50 +00:00
ia64 wait.h (do_spin): New inline... 2011-07-15 21:46:11 +02:00
mips mutex.h (gomp_mutex_unlock): Add comment about needed memory barrier semantics. 2009-08-04 17:25:42 +00:00
powerpc Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
s390 Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
sparc Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
x86 Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
affinity.c re PR libgomp/43706 (scheduling two threads on one core leads to starvation) 2010-04-20 17:37:51 +02:00
bar.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
bar.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
futex.h re PR libgomp/47731 (futex_wait broken on Linux) 2011-02-14 16:08:23 +01:00
lock.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
mutex.c wait.h (do_spin): New inline... 2011-07-15 21:46:11 +02:00
mutex.h wait.h (do_spin): New inline... 2011-07-15 21:46:11 +02:00
omp-lock.h c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805. 2008-06-06 15:01:54 +02:00
proc.c re PR libgomp/43706 (scheduling two threads on one core leads to starvation) 2010-04-20 17:37:51 +02:00
ptrlock.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
ptrlock.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
sem.c Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
sem.h Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception. 2009-04-09 17:00:19 +02:00
wait.h wait.h (do_spin): New inline... 2011-07-15 21:46:11 +02:00