summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Task.h16
-rw-r--r--include/TaskMan.h5
2 files changed, 11 insertions, 10 deletions
diff --git a/include/Task.h b/include/Task.h
index b45bfea..39b414f 100644
--- a/include/Task.h
+++ b/include/Task.h
@@ -23,9 +23,11 @@ class Task : public Base {
int GetState();
void Suspend() throw (GeneralException);
void WaitFor(Handle *, int = 0);
- void WaitFor(Task *, int = 0);
- void WaitFor(pid_t, int = 0);
+ void WaitFor(Task *);
+ void WaitFor(pid_t);
void WaitFor(struct timeval, int = 0);
+ bool WaitingFor(Handle *);
+ bool WaitingFor(pid_t);
void SetBurst();
void SetCleanUp();
bool HasToClean();
@@ -45,18 +47,16 @@ class Task : public Base {
int flags;
};
- class w4ta_t {
+ class wbta_t {
public:
- w4ta_t(Task * ata, int aflags) : ta(ata), flags(aflags) { }
+ wbta_t(Task * ata) : ta(ata) { }
Task * ta;
- int flags;
};
class w4pr_t {
public:
- w4pr_t(pid_t apr, int aflags) : pr(apr), flags(aflags) { }
+ w4pr_t(pid_t apr) : pr(apr) { }
pid_t pr;
- int flags;
};
class w4to_t {
@@ -71,7 +71,7 @@ class Task : public Base {
bool cleanup;
bool suspended;
vector<w4ha_t> w4ha;
- vector<w4ta_t> w4ta;
+ vector<wbta_t> wbta;
vector<w4pr_t> w4pr;
vector<w4to_t> w4to;
};
diff --git a/include/TaskMan.h b/include/TaskMan.h
index 2025e5c..e1c59d0 100644
--- a/include/TaskMan.h
+++ b/include/TaskMan.h
@@ -8,12 +8,13 @@
class TaskMan : public Base {
public:
static int AddTask(Task *);
- static int RemoveTask(Task *);
static void Init() throw (GeneralException);
static void MainLoop() throw (GeneralException);
private:
- static vector<Task *> TaskList;
+ typedef vector<Task *> TaskList_t;
+ static TaskList_t TaskList;
+ static TaskList_t Zombies;
static int number;
static bool inited;
};