summaryrefslogtreecommitdiff
path: root/src/Task.cc
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-10-10 19:36:55 -0700
committerPixel <pixel@nobis-crew.org>2011-10-10 19:36:55 -0700
commit965148b43b5b859934b7af2e8447ba1026a43a19 (patch)
tree290ff60cd1ebc9a065109620b2e9a5ff4e5b3d17 /src/Task.cc
parentcf9a801ebcb4df0a8b1ea75e58ca8ea8960ba13b (diff)
Adding the basic "Handle" structure, and adding an early version of Input.
Renamed suspend() to yield(). Fixed a couple of bugs, and reorganized slightly some code.
Diffstat (limited to 'src/Task.cc')
-rw-r--r--src/Task.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Task.cc b/src/Task.cc
index e5c971d..a47bd8b 100644
--- a/src/Task.cc
+++ b/src/Task.cc
@@ -57,7 +57,7 @@ void Balau::Task::switchTo() {
m_status = IDLE;
}
-void Balau::Task::suspend() {
+void Balau::Task::yield() {
coro_transfer(&m_ctx, &m_taskMan->m_returnContext);
}
@@ -91,3 +91,7 @@ void Balau::Events::Timeout::gotOwner(Task * task) {
void Balau::Events::Timeout::evt_cb(ev::timer & w, int revents) {
doSignal();
}
+
+void Balau::Events::Custom::gotOwner(Task * task) {
+ m_loop = task->getTaskMan()->getLoop();
+}