diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2013-01-13 17:33:16 +0400 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2013-01-13 17:33:16 +0400 |
commit | 38cff0caeb5126ddf6641f7088ef554e360bd91a (patch) | |
tree | 8b0a2674de3a90fa594a7dc0567fcc91baa74e6d | |
parent | c710d1b94cf1c84ba26369fb1e0cf4793303dd4d (diff) | |
download | libatomic_ops-38cff0caeb5126ddf6641f7088ef554e360bd91a.tar.gz |
Remove AO_store_full from msftc/arm.h in favor of generalized primitive
(code refactoring)
* src/atomic_ops/sysdeps/msftc/arm.h (AO_store_full): Remove since
similar definition exists in generalize-small.h.
* src/atomic_ops/sysdeps/msftc/arm.h: Add TODO item for AO_store().
-rw-r--r-- | src/atomic_ops/sysdeps/msftc/arm.h | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/src/atomic_ops/sysdeps/msftc/arm.h b/src/atomic_ops/sysdeps/msftc/arm.h index fd6b232..1e73fcb 100644 --- a/src/atomic_ops/sysdeps/msftc/arm.h +++ b/src/atomic_ops/sysdeps/msftc/arm.h @@ -55,25 +55,8 @@ AO_load(const volatile AO_t *addr) } #define AO_HAVE_load -AO_INLINE void -AO_store_full(volatile AO_t *addr, AO_t value) -{ - /* Emulate atomic store using CAS. */ - AO_t old = AO_load(addr); - AO_t current; -# ifdef AO_OLD_STYLE_INTERLOCKED_COMPARE_EXCHANGE - while ((current = (AO_t)_InterlockedCompareExchange( - (PVOID AO_INTERLOCKED_VOLATILE *)addr, - (PVOID)value, (PVOID)old)) != old) - old = current; -# else - while ((current = (AO_t)_InterlockedCompareExchange( - (LONG AO_INTERLOCKED_VOLATILE *)addr, - (LONG)value, (LONG)old)) != old) - old = current; -# endif -} -#define AO_HAVE_store_full +/* TODO: Implement AO_store() using ordinary store provided Windows */ +/* interrupt handlers clear the LL/SC reservation flag. */ /* #include "../standard_ao_double_t.h" */ /* TODO: implement double-wide operations (similar to x86). */ |