From 6d2530b32a1c4e5308c36e0be804dc8cb74a0dbb Mon Sep 17 00:00:00 2001 From: bdemsky Date: Thu, 3 Dec 2009 00:33:05 +0000 Subject: [PATCH] remove questionable methods --- Robust/src/Runtime/DSTM/interface/dsmlock.c | 15 --------------- Robust/src/Runtime/DSTM/interface/dsmlock.h | 2 -- 2 files changed, 17 deletions(-) diff --git a/Robust/src/Runtime/DSTM/interface/dsmlock.c b/Robust/src/Runtime/DSTM/interface/dsmlock.c index 0c657ce3..f9bc82e0 100644 --- a/Robust/src/Runtime/DSTM/interface/dsmlock.c +++ b/Robust/src/Runtime/DSTM/interface/dsmlock.c @@ -5,21 +5,6 @@ inline void initdsmlocks(volatile unsigned int *addr) { (*addr) = RW_LOCK_BIAS; } - -inline void readLock(volatile unsigned int *addr) { - __asm__ __volatile__ ("" " subl $1,(%0)\n\t" - "jns 1f\n" - "1:\n" - :: "a" (*addr) : "memory"); -} - -inline void writeLock(volatile unsigned int *addr) { - __asm__ __volatile__ ("" " subl %1,(%0)\n\t" - "jz 1f\n" - "1:\n" - :: "a" (*addr), "i" (RW_LOCK_BIAS) : "memory"); -} - inline void atomic_dec(volatile unsigned int *v) { __asm__ __volatile__ (LOCK_PREFIX "decl %0" : "+m" (*v)); diff --git a/Robust/src/Runtime/DSTM/interface/dsmlock.h b/Robust/src/Runtime/DSTM/interface/dsmlock.h index d1b6c0cc..80761fee 100644 --- a/Robust/src/Runtime/DSTM/interface/dsmlock.h +++ b/Robust/src/Runtime/DSTM/interface/dsmlock.h @@ -19,8 +19,6 @@ typedef struct { } atomic_t; void initdsmlocks(volatile unsigned int *addr); -void readLock(volatile unsigned int *addr); -void writeLock(volatile unsigned int *addr); int read_trylock(volatile unsigned int *lock); int write_trylock(volatile unsigned int *lock); void atomic_dec(volatile unsigned int *v); -- 2.34.1