]> granicus.if.org Git - libatomic_ops/commitdiff
Remove AO_store_full from msftc/arm.h in favor of generalized primitive
authorIvan Maidanski <ivmai@mail.ru>
Sun, 13 Jan 2013 13:33:16 +0000 (17:33 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 13 Jan 2013 13:33:16 +0000 (17:33 +0400)
(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().

src/atomic_ops/sysdeps/msftc/arm.h

index fd6b232eed2cc1e44d20302d8812b45ef5f23f17..1e73fcb327a5f22250e2242018725c93013e5256 100644 (file)
@@ -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).  */