summaryrefslogtreecommitdiff
path: root/includes/Task.h
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2012-04-01 07:18:00 -0700
committerPixel <pixel@nobis-crew.org>2012-04-01 07:18:00 -0700
commit1fdf750ee66ee9e4e872d2810e9ca3bcfa2d555e (patch)
tree2d7b8ddbae76d1924fec41bc74f7ebeb730ac6ff /includes/Task.h
parent8dfe080bf03fde34415f3edfbb0426260eeaeaec (diff)
More code cleanup.
Diffstat (limited to 'includes/Task.h')
-rw-r--r--includes/Task.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/includes/Task.h b/includes/Task.h
index 02090c8..592d5c3 100644
--- a/includes/Task.h
+++ b/includes/Task.h
@@ -126,15 +126,15 @@ class Task {
};
Task();
virtual ~Task();
- virtual const char * getName() = 0;
- Status getStatus() { return m_status; }
+ virtual const char * getName() const = 0;
+ Status getStatus() const { return m_status; }
static Task * getCurrentTask();
static void prepare(Events::BaseEvent * evt) {
Task * t = getCurrentTask();
t->waitFor(evt);
}
static void yield(Events::BaseEvent * evt, bool interruptible = false) throw (GeneralException);
- TaskMan * getTaskMan() { return m_taskMan; }
+ TaskMan * getTaskMan() const { return m_taskMan; }
struct ev_loop * getLoop();
protected:
void yield(bool changeStatus = false);
@@ -145,7 +145,6 @@ class Task {
m_okayToEAgain = enable;
return oldValue;
}
- TaskMan * getMyTaskMan() { return m_taskMan; }
private:
static size_t stackSize() { return 64 * 1024; }
void setup(TaskMan * taskMan, void * stack);