From 2677424e6dd5513b3fae9817214db41cc211a873 Mon Sep 17 00:00:00 2001 From: pixel Date: Mon, 18 Feb 2008 09:55:08 +0000 Subject: Providing the 'Yield' method for tasks. --- include/Task.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') 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; }; -- cgit v1.2.3