From 0497d21e5b7b483259642aad1f23392995863c17 Mon Sep 17 00:00:00 2001 From: Pixel Date: Tue, 20 Nov 2001 11:57:12 +0000 Subject: WaitFor, added sticky flag --- include/Task.h | 46 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 8 deletions(-) (limited to 'include/Task.h') 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 w4ha; - vector w4ta; - vector w4pr; - vector w4to; + vector w4ha; + vector w4ta; + vector w4pr; + vector w4to; }; #else -- cgit v1.2.3