From 49f48b3e252b55e625469c6531577fdab1ec4a79 Mon Sep 17 00:00:00 2001 From: adash Date: Wed, 19 May 2010 20:20:05 +0000 Subject: [PATCH] more changes to compile recovery benchmarks --- Robust/src/ClassLibrary/Java/Socket.java | 14 ++++++++++++-- Robust/src/ClassLibrary/JavaDSM/Thread.java | 2 +- Robust/src/ClassLibrary/JavaThread/Object.java | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Robust/src/ClassLibrary/Java/Socket.java b/Robust/src/ClassLibrary/Java/Socket.java index 5863a518..b4f54be4 100644 --- a/Robust/src/ClassLibrary/Java/Socket.java +++ b/Robust/src/ClassLibrary/Java/Socket.java @@ -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); diff --git a/Robust/src/ClassLibrary/JavaDSM/Thread.java b/Robust/src/ClassLibrary/JavaDSM/Thread.java index 16efbd1b..b4eb6062 100644 --- a/Robust/src/ClassLibrary/JavaDSM/Thread.java +++ b/Robust/src/ClassLibrary/JavaDSM/Thread.java @@ -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; diff --git a/Robust/src/ClassLibrary/JavaThread/Object.java b/Robust/src/ClassLibrary/JavaThread/Object.java index b3780488..a3bc22d9 100644 --- a/Robust/src/ClassLibrary/JavaThread/Object.java +++ b/Robust/src/ClassLibrary/JavaThread/Object.java @@ -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) { -- 2.34.1