Fix tabbing.... Please fix your editors so they do tabbing correctly!!! (Spaces...
[IRC.git] / Robust / src / Runtime / DSTM / interface / dsmlock.h
index f95edf675238e3569d03adca6918bbb97616d04c..297a886debfe89b10bf7b7845c4475578c13aea1 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef _DSMLOCK_H_
 #define _DSMLOCK_H_
 
+#define CFENCE   asm volatile ("" ::: "memory");
 #define RW_LOCK_BIAS             0x01000000
 #define atomic_read(v)          (*v)
 #define RW_LOCK_UNLOCKED          { RW_LOCK_BIAS }
@@ -8,7 +9,7 @@
 #define LOCK_PREFIX \
   ".section .smp_locks,\"a\"\n"   \
   "  .align 4\n"                  \
-  "  .long 661f\n"             /* address */\
+  "  .long 661f\n"             /* address */ \
   ".previous\n"                   \
   "661:\n\tlock; "
 
@@ -22,4 +23,6 @@ static void atomic_add(int i, volatile int *v);
 static int atomic_sub_and_test(int i, volatile int *v);
 void read_unlock(volatile int *rw);
 void write_unlock(volatile int *rw);
+int is_write_locked(volatile int *lock);
+int is_read_locked(volatile int *lock);
 #endif