diff options
Diffstat (limited to 'include/Task.h')
-rw-r--r-- | include/Task.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/Task.h b/include/Task.h index f2fe722..4de3fa5 100644 --- a/include/Task.h +++ b/include/Task.h @@ -2,6 +2,7 @@ #define __TASK_H__ #ifdef __cplusplus +#include <setjmp.h> #include "Exceptions.h" #define TASK_ON_HOLD 0 @@ -14,11 +15,15 @@ class Task : public Base { virtual String GetName(); int Run(); int GetState(); + int Suspend() throw (GeneralException); + void Resume(int) throw (GeneralException); protected: virtual int Do(); private: + jmp_buf env; int state; + bool suspended; }; #else |