diff options
author | Pixel <pixel@nobis-crew.org> | 2011-10-10 19:36:55 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-10-10 19:36:55 -0700 |
commit | 965148b43b5b859934b7af2e8447ba1026a43a19 (patch) | |
tree | 290ff60cd1ebc9a065109620b2e9a5ff4e5b3d17 /src/Task.cc | |
parent | cf9a801ebcb4df0a8b1ea75e58ca8ea8960ba13b (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.cc | 6 |
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(); +} |