diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-05 00:25:43 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-05 00:25:43 +0000 |
commit | c5d2ef80a47184965be3c220ec173d90aa968074 (patch) | |
tree | 7c5ba69409d5d1cb02643477b1e41a0b15954f6d /ruby_atomic.h | |
parent | 4a1b9786dc7fc460a438f4ac17c10ae0976ebcf1 (diff) | |
download | ruby-c5d2ef80a47184965be3c220ec173d90aa968074.tar.gz |
ruby_atomic.h: fix the argument order
* ruby_atomic.h (ATOMIC_SIZE_CAS): fix the argument order of
InterlockedCompareExchange64. new value and then old value is
the last.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby_atomic.h')
-rw-r--r-- | ruby_atomic.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ruby_atomic.h b/ruby_atomic.h index 57368a7448..c8c84ed449 100644 --- a/ruby_atomic.h +++ b/ruby_atomic.h @@ -81,7 +81,7 @@ rb_w32_atomic_cas(volatile rb_atomic_t *var, rb_atomic_t oldval, rb_atomic_t new # define ATOMIC_SIZE_INC(var) InterlockedIncrement64(&(var)) # define ATOMIC_SIZE_DEC(var) InterlockedDecrement64(&(var)) # define ATOMIC_SIZE_EXCHANGE(var, val) InterlockedExchange64(&(var), (val)) -# define ATOMIC_SIZE_CAS(var, oldval, val) InterlockedCompareExchange64(&(var), (oldval), (val)) +# define ATOMIC_SIZE_CAS(var, oldval, newval) InterlockedCompareExchange64(&(var), (newval), (oldval)) # else # define ATOMIC_SIZE_ADD(var, val) InterlockedExchangeAdd((LONG *)&(var), (val)) # define ATOMIC_SIZE_SUB(var, val) InterlockedExchangeAdd((LONG *)&(var), -(LONG)(val)) |