add a new compiler flag -nolock: turning off synchronization lock
authoryeom <yeom>
Thu, 31 Mar 2011 18:43:42 +0000 (18:43 +0000)
committeryeom <yeom>
Thu, 31 Mar 2011 18:43:42 +0000 (18:43 +0000)
Robust/src/Runtime/object.c
Robust/src/buildscript

index c552b4c51d92fd27c3c41405e2321081ea1f25cb..98183c2e5cb1a6ba74f7ee89b3f90fb7a40ca0ea 100644 (file)
@@ -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
index 2dd0f853aa3ee9e232160712ed62193f5adbd289..b4ff4f7029da81061d186a920734e0a745a474e4 100755 (executable)
@@ -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