Pipes sleep and wake properly.

This commit is contained in:
Eric Holk 2012-07-02 17:42:58 -07:00
parent a4838c93aa
commit e5c9cb2b3d
6 changed files with 132 additions and 11 deletions

View file

@ -922,6 +922,26 @@ rust_task_local_data_atexit(rust_task *task, void (*cleanup_fn)(void *data)) {
task->task_local_data_cleanup = cleanup_fn;
}
extern "C" void
task_clear_event_reject(rust_task *task) {
task->clear_event_reject();
}
// Waits on an event, returning the pointer to the event that unblocked this
// task.
extern "C" void *
task_wait_event(rust_task *task) {
// TODO: we should assert that the passed in task is the currently running
// task. We wouldn't want to wait some other task.
return task->wait_event();
}
extern "C" void
task_signal_event(rust_task *target, void *event) {
target->signal_event(event);
}
//
// Local Variables:
// mode: C++