diff options
author | torvald <torvald@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-24 01:42:20 +0000 |
---|---|---|
committer | torvald <torvald@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-24 01:42:20 +0000 |
commit | 813b307549daffa9a654d62e98a71ea8a11f932d (patch) | |
tree | 76234a08c818b5da2d7cbe2a47fa07501ef97cb2 /libitm/config/linux/futex.cc | |
parent | 31296338ddc4bfbf4697db161c24f9ccd5f77d32 (diff) | |
download | gcc-813b307549daffa9a654d62e98a71ea8a11f932d.tar.gz |
libitm: Fixed conversion to C++11 atomics.
libitm/
* beginend.cc (GTM::gtm_thread::begin_transaction): Add comment.
(GTM::gtm_thread::try_commit): Changed memory order.
* config/linux/alpha/futex_bits.h (sys_futex0): Take atomic int
as parameter.
* config/linux/x86/futex_bits.h (sys_futex0): Same.
* config/linux/sh/futex_bits.h (sys_futex0): Same.
* config/linux/futex_bits.h (sys_futex0): Same.
* config/linux/futex.cc (futex_wait, futex_wake): Same.
* config/linux/futex.h (futex_wait, futex_wake): Same.
* config/linux/rwlock.h (gtm_rwlock::writers,
gtm_rwlock::writer_readers, gtm_rwlock::readers): Change to atomic
ints.
* config/linux/rwlock.cc (gtm_rwlock::read_lock,
gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
gtm_rwlock::write_unlock): Fix memory orders and fences.
* config/posix/rwlock.cc (gtm_rwlock::read_lock,
gtm_rwlock::write_lock_generic, gtm_rwlock::read_unlock,
gtm_rwlock::write_unlock): Same.
* config/linux/rwlock.h (gtm_rwlock::summary): Change to atomic int.
* method-gl.cc (gl_mg::init, gl_wt_dispatch::memtransfer_static,
gl_wt_dispatch::memset_static, gl_wt_dispatch::begin_or_restart):
Add comments.
(gl_wt_dispatch::pre_write, gl_wt_dispatch::validate,
gl_wt_dispatch::load, gl_wt_dispatch::store,
gl_wt_dispatch::try_commit, gl_wt_dispatch::rollback): Fix memory
orders and fences. Add comments.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182674 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libitm/config/linux/futex.cc')
-rw-r--r-- | libitm/config/linux/futex.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libitm/config/linux/futex.cc b/libitm/config/linux/futex.cc index 0889ee5dfec..5707b40c262 100644 --- a/libitm/config/linux/futex.cc +++ b/libitm/config/linux/futex.cc @@ -41,7 +41,7 @@ static long int gtm_futex_wake = FUTEX_WAKE | FUTEX_PRIVATE_FLAG; void -futex_wait (int *addr, int val) +futex_wait (std::atomic<int> *addr, int val) { long res; @@ -65,7 +65,7 @@ futex_wait (int *addr, int val) long -futex_wake (int *addr, int count) +futex_wake (std::atomic<int> *addr, int count) { long res = sys_futex0 (addr, gtm_futex_wake, count); if (__builtin_expect (res == -ENOSYS, 0)) |