From aa92df3c58daefb994da555fb45f2e3ee55f38d5 Mon Sep 17 00:00:00 2001 From: Pixel Date: Wed, 14 Nov 2001 16:59:02 +0000 Subject: Latest and various changes --- lib/Task.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib/Task.cc') diff --git a/lib/Task.cc b/lib/Task.cc index 338eaba..fd1bf3f 100644 --- a/lib/Task.cc +++ b/lib/Task.cc @@ -1,9 +1,15 @@ +#include #include +#include "TaskMan.h" #include "Task.h" #include "String.h" -Task::Task() : state(TASK_ON_HOLD), suspended(false) {} -Task::~Task() {} +Task::Task() : state(TASK_ON_HOLD), suspended(false) { + TaskMan::AddTask(this); +} +Task::~Task() { + TaskMan::RemoveTask(this); +} int Task::Do() throw (GeneralException) { return TASK_ON_HOLD; @@ -55,6 +61,6 @@ void Task::WaitFor(pid_t p) { w4pr.push_back(p); } -void Task::WaitFor(struct timeval t) { +void Task::WaitFor(timeval t) { w4to.push_back(t); } -- cgit v1.2.3