From: bdemsky Date: Mon, 14 Sep 2009 23:59:22 +0000 (+0000) Subject: change X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=dac4be6b621d9a3e5ff3551cbbe6d24c83f243ad;p=IRC.git change --- diff --git a/Robust/TransSim/ObjectInfo.java b/Robust/TransSim/ObjectInfo.java new file mode 100644 index 00000000..0357dbe0 --- /dev/null +++ b/Robust/TransSim/ObjectInfo.java @@ -0,0 +1,37 @@ +import java.util.*; + +public class ObjectInfo { + FlexScheduler fs; + Set waiters; + + public ObjectInfo(FlexScheduler fs) { + this.fs=fs; + threadowner=-1; + this.waiters=new HashSet(); + } + + public void addWaiter(FlexScheduler.Event ev) { + waiters.add(ev); + } + + public Set getWaiters() { + return waiters; + } + + int threadowner; + public void setOwner(int thread) { + threadowner=thread; + } + + public boolean isOwned() { + return threadowner!=-1; + } + + public void releaseOwner() { + threadowner=-1; + } + + public int getOwner() { + return threadowner; + } +} \ No newline at end of file diff --git a/Robust/TransSim/ThreadInfo.java b/Robust/TransSim/ThreadInfo.java new file mode 100644 index 00000000..92ba65da --- /dev/null +++ b/Robust/TransSim/ThreadInfo.java @@ -0,0 +1,16 @@ +import java.util.*; + +public class ThreadInfo { + FlexScheduler fs; + public ThreadInfo(FlexScheduler fs) { + this.fs=fs; + } + boolean stalled; + + public boolean isStalled() { + return stalled; + } + public void setStall(boolean stall) { + stalled=stall; + } +} \ No newline at end of file