more changes to compile recovery benchmarks
authoradash <adash>
Wed, 19 May 2010 20:20:05 +0000 (20:20 +0000)
committeradash <adash>
Wed, 19 May 2010 20:20:05 +0000 (20:20 +0000)
Robust/src/ClassLibrary/Java/Socket.java
Robust/src/ClassLibrary/JavaDSM/Thread.java
Robust/src/ClassLibrary/JavaThread/Object.java

index 5863a518256c9c898522c12f789215e5705fbb00..b4f54be4a202781b2150d7fb4630c49483883649 100644 (file)
@@ -55,12 +55,22 @@ public class Socket {
   public int read(byte[] b) {
     return nativeRead(b);
   }
-  public void write(byte[] b) {
+  public int write(byte[] b) {
     nativeWrite(b, 0, b.length);
+    if(fd==-1) {
+      System.out.println("here: " + "fd= " + fd);
+      return -1;
+    } else { 
+      return 0;
+    }
   }
 
-  public void write(byte[] b, int offset, int len) {
+  public int write(byte[] b, int offset, int len) {
     nativeWrite(b, offset, len);
+    if(fd==-1)
+      return -1;
+    else 
+      return 0;
   }
 
   private native int nativeRead(byte[] b);
index 16efbd1b8b0ed4aabdd0b0d9254a457d302fba88..b4eb6062ebf6b0df580b03f6cb8e3c88e2c758ba 100644 (file)
@@ -29,7 +29,7 @@ public class Thread {
   public void run() {
   }
 
-  public int getStatus(int mid)
+  public static int getStatus(int mid)
   {
     if(nativeGetStatus(mid)==1)
       return 1;
index b37804884c5e6f25b77a177134ba198e551a53f3..a3bc22d94ab17ff51636f5528e55cf8c3039a7ef 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) {