summaryrefslogtreecommitdiff
path: root/ruby_atomic.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-05 01:47:58 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-05 01:47:58 (GMT)
commitb8434daf6b59aef144c76a4a0842550f64a2a56e (patch)
tree1f248353d9f2ab3e1a8e14ccb1b3f229abfb38d4 /ruby_atomic.h
parentc06f12031ee1f6a7f51448f0688a20d571aed880 (diff)
ruby_atomic.h: duplicate code
* ruby_atomic.h (ATOMIC_SIZE_CAS): remove duplicate code as ATOMIC_CAS(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby_atomic.h')
-rw-r--r--ruby_atomic.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/ruby_atomic.h b/ruby_atomic.h
index 7515c89..8e57415 100644
--- a/ruby_atomic.h
+++ b/ruby_atomic.h
@@ -16,10 +16,6 @@ typedef unsigned int rb_atomic_t;
# define ATOMIC_SIZE_ADD(var, val) __atomic_fetch_add(&(var), (val), __ATOMIC_SEQ_CST)
# define ATOMIC_SIZE_SUB(var, val) __atomic_fetch_sub(&(var), (val), __ATOMIC_SEQ_CST)
-# define ATOMIC_SIZE_CAS(var, oldval, newval) \
-({ size_t oldvaldup = (oldval); \
- __atomic_compare_exchange_n(&(var), &oldvaldup, (newval), 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); \
- oldvaldup; })
#elif defined HAVE_GCC_SYNC_BUILTINS
/* @shyouhei hack to support atomic operations in case of gcc. Gcc