From d4b510bef2ca79f713977e05978015d5288a872d Mon Sep 17 00:00:00 2001 From: bdemsky Date: Thu, 29 Jan 2009 22:28:30 +0000 Subject: [PATCH] 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. --- Robust/src/Runtime/DSTM/interface/dsmlock.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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); -- 2.34.1