The LOCK prefix should not have been defined away, its absence
[IRC.git] / Robust / src / Runtime / DSTM / interface / dsmlock.h
index 596b7296873f170a1c8c6ad7550ff7a64d440338..7e10dc38ba844e09c2154ec2ee3cf93e06fb1576 100644 (file)
@@ -4,10 +4,18 @@
 #define RW_LOCK_BIAS             0x01000000
 #define atomic_read(v)          ((v)->counter)
 #define RW_LOCK_UNLOCKED          { RW_LOCK_BIAS }
-#define LOCK_PREFIX ""
+//#define LOCK_PREFIX ""
+#define LOCK_PREFIX \
+                ".section .smp_locks,\"a\"\n"   \
+                "  .align 4\n"                  \
+                "  .long 661f\n" /* address */  \
+                ".previous\n"                   \
+                "661:\n\tlock; "
+
+
 
 typedef struct {
-  int counter;
+  unsigned int counter;
 } atomic_t;
 
 void initdsmlocks(volatile unsigned int *addr);