more changes
authoradash <adash>
Sat, 13 Mar 2010 02:08:34 +0000 (02:08 +0000)
committeradash <adash>
Sat, 13 Mar 2010 02:08:34 +0000 (02:08 +0000)
Robust/src/ClassLibrary/JavaDSM/Thread.java
Robust/src/ClassLibrary/JavaThread/Object.java
Robust/src/IR/Flat/BuildCode.java
Robust/src/Runtime/runtime.c

index e1db40a44b50ec3ea9040745e39afd6dcacd1ed3..c19022932c462af68f226d450a39bdd98bdb0f5b 100644 (file)
@@ -33,6 +33,9 @@ public class Thread {
   {
     if(nativeGetStatus(mid)==1)
       return 1;
+    //TODO:check if this is safe to add only for the DSM without the recovery version
+    if(nativeGetStatus(mid)==0)
+      return 1;
     else
       return -1;
 
index a3bc22d94ab17ff51636f5528e55cf8c3039a7ef..b37804884c5e6f25b77a177134ba198e551a53f3 100644 (file)
@@ -7,7 +7,7 @@ public class Object {
   private Object prevlockobject;
 
   // temporary extra unused int filed to align objects for Java
-  int wkhqwemnbmwnb;
+  //int wkhqwemnbmwnb;
 
   public int hashCode() {
     if (!cachedHash) {
index 2d4231e6a09469714952a042bb0d9a542f794fbd..2ec130562114caddc26f63241fcad4c1bdf00843 100644 (file)
@@ -314,10 +314,12 @@ public class BuildCode {
     }
 
     if (state.DSM) {
-      if (state.DSMRECOVERYSTATS)
+      if (state.DSMRECOVERYSTATS) {
+        outmethod.println("#ifdef RECOVERYSTATS \n");
         outmethod.println("handle();\n");
-      else {
-        outmethod.println("#ifdef TRANSSTATS \n");
+        outmethod.println("#endif\n");
+      } else {
+        outmethod.println("#if defined(TRANSSTATS) || defined(RECOVERYSTATS) \n");
         outmethod.println("handle();\n");
         outmethod.println("#endif\n");
       }
@@ -390,7 +392,8 @@ public class BuildCode {
     }
 
     if (state.DSM||state.SINGLETM) {
-      outmethod.println("#ifdef TRANSSTATS \n");
+      //outmethod.println("#if defined(TRANSSTATS) || defined(RECOVERYSTATS) \n");
+      outmethod.println("#if defined(TRANSSTATS) \n");
       outmethod.println("printf(\"******  Transaction Stats   ******\\n\");");
       outmethod.println("printf(\"numTransCommit= %d\\n\", numTransCommit);");
       outmethod.println("printf(\"numTransAbort= %d\\n\", numTransAbort);");
index 9e9392277293396b0bca6ddfb89b29bfdbb0e449..8d1016c0617f06ed80684bf653d3505791ccec42 100644 (file)
@@ -350,10 +350,9 @@ void CALL01(___System______printString____L___String___,struct ___String___ * __
     short sc=((short *)(((char *)&chararray->___length___)+sizeof(int)))[i+offset];
     putchar(sc);
   }
-
-#ifdef RECOVERYSTATS
+//#ifdef RECOVERYSTATS
   fflush(stdout);
-#endif
+//#endif
 }
 
 #ifdef D___RecoveryStat______printRecoveryStat____ 
@@ -364,6 +363,7 @@ void CALL00(___RecoveryStat______printRecoveryStat____) {
 #else
 void CALL00(___RecoveryStat______printRecoveryStat____) {
   printf("No Stat\n");
+  fflush(stdout);
 }
 #endif
 #endif