summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorpixel <pixel>2008-02-18 09:55:08 +0000
committerpixel <pixel>2008-02-18 09:55:08 +0000
commit2677424e6dd5513b3fae9817214db41cc211a873 (patch)
tree0740a8115e7da6e548ea0eed4e2c48c778598bb5 /include
parent60ee2d57d95314f00d110c70106115c577dbdafa (diff)
Providing the 'Yield' method for tasks.
Diffstat (limited to 'include')
-rw-r--r--include/Task.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/Task.h b/include/Task.h
index 725b2e4..325d162 100644
--- a/include/Task.h
+++ b/include/Task.h
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: Task.h,v 1.31 2007-05-30 11:57:08 pixel Exp $ */
+/* $Id: Task.h,v 1.32 2008-02-18 09:55:08 pixel Exp $ */
#ifndef __TASK_H__
#define __TASK_H__
@@ -64,6 +64,9 @@ class Task : public Base {
void WaitFor(Handle *, int = 0);
void WaitFor(pid_t);
void WaitFor(const timeval &, int = 0);
+ void Yield();
+ bool Yielded();
+ void Unyield();
Task * WaitedBy();
void SetBurst();
void Stop();
@@ -87,6 +90,7 @@ class Task : public Base {
int state;
bool stopped;
bool suspended;
+ bool yielded;
Task * wbta;
Task * wta;
};