diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-07-15 21:46:11 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-07-15 21:46:11 +0200 |
commit | bfee0724e0c7f3473bf17274cc750d65207db037 (patch) | |
tree | 3db1d5696a3515cfad06bdd05a17d82acd4e5ab8 /libgomp/ChangeLog | |
parent | 1be0310c7632cef484195acf96dea08aa0d9a753 (diff) | |
download | gcc-bfee0724e0c7f3473bf17274cc750d65207db037.zip gcc-bfee0724e0c7f3473bf17274cc750d65207db037.tar.gz gcc-bfee0724e0c7f3473bf17274cc750d65207db037.tar.bz2 |
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
Diffstat (limited to 'libgomp/ChangeLog')
-rw-r--r-- | libgomp/ChangeLog | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 1d93273..36c716c 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,25 @@ +2011-07-15 Jakub Jelinek <jakub@redhat.com> + + * 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. + 2011-06-22 Jakub Jelinek <jakub@redhat.com> PR libgomp/49490 |