mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Solaris does not provide atomic_sub family
This commit is contained in:
parent
1760c60174
commit
257e01b61d
1 changed files with 1 additions and 1 deletions
|
@ -117,7 +117,7 @@ rb_atomic_fetch_add(volatile rb_atomic_t *var, rb_atomic_t val)
|
|||
static inline rb_atomic_t
|
||||
rb_atomic_fetch_sub(volatile rb_atomic_t *var, rb_atomic_t val)
|
||||
{
|
||||
return atomic_sub_int_nv(var, val) + val;
|
||||
return atomic_add_int_nv(var, (rb_atomic_t)(-(int)val)) + val;
|
||||
}
|
||||
|
||||
# if defined(_LP64) || defined(_I32LPx)
|
||||
|
|
Loading…
Reference in a new issue