From: bdemsky Date: Thu, 29 Jan 2009 22:28:30 +0000 (+0000) Subject: The LOCK prefix should not have been defined away, its absence X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d4b510bef2ca79f713977e05978015d5288a872d;p=IRC.git The LOCK prefix should not have been defined away, its absence completely breaks the readwrite locks. This was the reason for benchmarks that get stuck. --- diff --git a/Robust/src/Runtime/DSTM/interface/dsmlock.h b/Robust/src/Runtime/DSTM/interface/dsmlock.h index 596b7296..7e10dc38 100644 --- a/Robust/src/Runtime/DSTM/interface/dsmlock.h +++ b/Robust/src/Runtime/DSTM/interface/dsmlock.h @@ -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);