diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/Task.h | 46 |
1 files changed, 38 insertions, 8 deletions
diff --git a/include/Task.h b/include/Task.h index b727cbe..b45bfea 100644 --- a/include/Task.h +++ b/include/Task.h @@ -12,6 +12,8 @@ #define TASK_DONE 1 #define TASK_BURST 2 +#define W4_STICKY 1 + class Task : public Base { public: Task(); @@ -20,10 +22,10 @@ class Task : public Base { int Run(); int GetState(); void Suspend() throw (GeneralException); - void WaitFor(Handle *); - void WaitFor(Task *); - void WaitFor(pid_t); - void WaitFor(struct timeval); + void WaitFor(Handle *, int = 0); + void WaitFor(Task *, int = 0); + void WaitFor(pid_t, int = 0); + void WaitFor(struct timeval, int = 0); void SetBurst(); void SetCleanUp(); bool HasToClean(); @@ -36,14 +38,42 @@ class Task : public Base { int current; private: + class w4ha_t { + public: + w4ha_t(Handle * aha, int aflags) : ha(aha), flags(aflags) { } + Handle * ha; + int flags; + }; + + class w4ta_t { + public: + w4ta_t(Task * ata, int aflags) : ta(ata), flags(aflags) { } + Task * ta; + int flags; + }; + + class w4pr_t { + public: + w4pr_t(pid_t apr, int aflags) : pr(apr), flags(aflags) { } + pid_t pr; + int flags; + }; + + class w4to_t { + public: + w4to_t(timeval ato, int aflags) : to(ato), flags(aflags) { } + timeval to; + int flags; + }; + int state; bool stopped; bool cleanup; bool suspended; - vector<Handle *> w4ha; - vector<Task *> w4ta; - vector<pid_t> w4pr; - vector<timeval> w4to; + vector<w4ha_t> w4ha; + vector<w4ta_t> w4ta; + vector<w4pr_t> w4pr; + vector<w4to_t> w4to; }; #else |