summaryrefslogtreecommitdiff
path: root/sources/core
diff options
context:
space:
mode:
Diffstat (limited to 'sources/core')
-rw-r--r--sources/core/VSTask.java4
-rw-r--r--sources/core/VSTaskManager.java63
2 files changed, 3 insertions, 64 deletions
diff --git a/sources/core/VSTask.java b/sources/core/VSTask.java
index b8a773a..8f1e634 100644
--- a/sources/core/VSTask.java
+++ b/sources/core/VSTask.java
@@ -63,7 +63,7 @@ public class VSTask implements Comparable {
}
public boolean isProcess(VSProcess process) {
- return process.equals(process);
+ return this.process.equals(process);
}
public boolean isGlobalTimed() {
@@ -98,6 +98,8 @@ public class VSTask implements Comparable {
buffer.append(" ");
buffer.append(getTaskTime());
buffer.append(event.toString());
+ buffer.append("; PID: ");
+ buffer.append(process.getProcessID());
return buffer.toString();
}
diff --git a/sources/core/VSTaskManager.java b/sources/core/VSTaskManager.java
index e5adfac..66913fc 100644
--- a/sources/core/VSTaskManager.java
+++ b/sources/core/VSTaskManager.java
@@ -216,69 +216,6 @@ public class VSTaskManager {
return false;
}
- /*
- public synchronized LinkedList<VSTask> getProtocolTasks(VSProtocol protocol) {
- LinkedList<VSTask> protocolTasks = new LinkedList<VSTask>();
-
- for (VSTask task : fullfilledProgrammedTasks)
- if (task.isProtocol(protocol))
- protocolTasks.addLast(task);
-
- for (VSTask task : globalTasks)
- if (task.isProtocol(protocol))
- protocolTasks.addLast(task);
-
- for (VSTask task : tasks)
- if (task.isProtocol(protocol))
- protocolTasks.addLast(task);
-
- return protocolTasks;
- }
-
- public synchronized LinkedList<VSTask> getNonProtocolTasks(VSProtocol protocol) {
- LinkedList<VSTask> nonProtocolTasks = new LinkedList<VSTask>();
-
- for (VSTask task : fullfilledProgrammedTasks)
- if (!task.isProtocol(protocol))
- nonProtocolTasks.addLast(task);
-
- for (VSTask task : globalTasks)
- if (!task.isProtocol(protocol))
- nonProtocolTasks.addLast(task);
-
- for (VSTask task : tasks)
- if (!task.isProtocol(protocol))
- nonProtocolTasks.addLast(task);
-
- return nonProtocolTasks;
- }
-
- public synchronized void modifyProtocolTasks(VSProtocol protocol, LinkedList<VSTask> protocolTasks) {
- VSProcess process = protocol.getProcess();
- LinkedList<VSTask> nonProtocolTasks = getNonProtocolTasks(protocol);
- ListIterator<VSTask> iter1 = protocolTasks.listIterator(0);
- ListIterator<VSTask> iter2 = nonProtocolTasks.listIterator(0);
- long localTime = process.getTime();
-
- fullfilledProgrammedTasks.clear();
- globalTasks.clear();
- tasks.clear();
-
- for (VSTask task : nonProtocolTasks) {
- if (task.getTaskTime() < localTime)
- fullfilledProgrammedTasks.addLast(task);
- else
- insert(task);
- }
-
- for (VSTask task : protocolTasks) {
- if (task.getTaskTime() < localTime)
- fullfilledProgrammedTasks.addLast(task);
- else
- insert(task);
- }
- }
- */
public synchronized VSPriorityQueue<VSTask> getLocalTasks() {
VSPriorityQueue<VSTask> processTasks = new VSPriorityQueue<VSTask>();