]> granicus.if.org Git - gc/commitdiff
Add a membar to libgc's UNLOCK () on arm. Fixes #683409.
authorZoltan Varga <vargaz@gmail.com>
Thu, 7 Apr 2011 20:14:32 +0000 (22:14 +0200)
committerguest <ivmai@mail.ru>
Fri, 29 Jul 2011 11:31:23 +0000 (15:31 +0400)
include/private/gc_locks.h

index df8736d3d4e0cc5430526798bbcf7b4322a5ed4d..a45553aa7ca9e249d201c0b719ae444e6c4364bf 100644 (file)
 #endif
         }
 #       define GC_TEST_AND_SET_DEFINED
+      inline static void GC_clear(volatile unsigned int *addr) {
+#ifdef HAVE_ARMV6
+                 /* Memory barrier */
+                 __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r" (0) : "memory");
+#endif
+                 *(addr) = 0;
+      }
+#     define GC_CLEAR_DEFINED
 #    endif /* ARM32 */
 #    ifdef CRIS
         inline static int GC_test_and_set(volatile unsigned int *addr) {