From b4554a9787f2dfab27f5403d43f6f6d5fb279dbf Mon Sep 17 00:00:00 2001 From: yeom Date: Thu, 31 Mar 2011 18:43:42 +0000 Subject: [PATCH] add a new compiler flag -nolock: turning off synchronization lock --- Robust/src/Runtime/object.c | 4 ++++ Robust/src/buildscript | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/Robust/src/Runtime/object.c b/Robust/src/Runtime/object.c index c552b4c5..98183c2e 100644 --- a/Robust/src/Runtime/object.c +++ b/Robust/src/Runtime/object.c @@ -20,6 +20,7 @@ int CALL01(___Object______getType____, struct ___Object___ * ___this___) { #ifdef THREADS int CALL01(___Object______MonitorEnter____, struct ___Object___ * ___this___) { +#ifndef NOLOCK pthread_t self=pthread_self(); if (self==VAR(___this___)->tid) { VAR(___this___)->lockcount++; @@ -54,9 +55,11 @@ int CALL01(___Object______MonitorEnter____, struct ___Object___ * ___this___) { } } } +#endif } int CALL01(___Object______MonitorExit____, struct ___Object___ * ___this___) { +#ifndef NOLOCK pthread_t self=pthread_self(); if (self==VAR(___this___)->tid) { VAR(___this___)->lockcount--; @@ -81,5 +84,6 @@ int CALL01(___Object______MonitorExit____, struct ___Object___ * ___this___) { exit(-1); #endif } +#endif } #endif diff --git a/Robust/src/buildscript b/Robust/src/buildscript index 2dd0f853..b4ff4f70 100755 --- a/Robust/src/buildscript +++ b/Robust/src/buildscript @@ -32,6 +32,7 @@ echo -rcr_debug_verbose in addition to above, also prints out effects passed in, echo -squeue use single queue echo -corepin use core pinning echo -nostalltr turn off RCR traversers that only handle conflicts between task and stallsite +echo -nolock turn off synchronization lock echo echo Disjoint Reachability Analysis options echo -disjoint enable analysis @@ -616,6 +617,10 @@ elif [[ $1 = '-debug-deque' ]] then EXTRAOPTIONS="$EXTRAOPTIONS -DDEBUG_DEQUE" +elif [[ $1 = '-nolock' ]] +then +EXTRAOPTIONS="$EXTRAOPTIONS -DNOLOCK" + elif [[ $1 = '-coreprof' ]] then COREPROF=true -- 2.34.1