diff options
| author | Brian Anderson <banderson@mozilla.com> | 2013-05-19 16:10:44 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2013-05-20 15:21:29 -0700 |
| commit | 2f99fb8efad8803801628a507fe3ac06a70c7871 (patch) | |
| tree | 4d758ebb7bc9915d7caf8f651df8350c6219686d /src/libcore/rt/sched.rs | |
| parent | 06f1a64bd6e417b73f1b812b860271e86bb42b47 (diff) | |
| download | rust-2f99fb8efad8803801628a507fe3ac06a70c7871.tar.gz rust-2f99fb8efad8803801628a507fe3ac06a70c7871.zip | |
core::rt: Remove local_sched module
Diffstat (limited to 'src/libcore/rt/sched.rs')
| -rw-r--r-- | src/libcore/rt/sched.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libcore/rt/sched.rs b/src/libcore/rt/sched.rs index 0004ef29de0..20c24adaa0a 100644 --- a/src/libcore/rt/sched.rs +++ b/src/libcore/rt/sched.rs @@ -20,9 +20,7 @@ use super::context::Context; use super::task::Task; use rt::local_ptr; use rt::local::Local; - -// A more convenient name for external callers, e.g. `local_sched::take()` -pub mod local_sched; +use rt::rtio::IoFactoryObject; /// The Scheduler is responsible for coordinating execution of Coroutines /// on a single thread. When the scheduler is running it is owned by @@ -403,6 +401,12 @@ pub impl Coroutine { } } +pub unsafe fn unsafe_borrow_io() -> *mut IoFactoryObject { + let sched = Local::unsafe_borrow::<Scheduler>(); + let io: *mut IoFactoryObject = (*sched).event_loop.io().unwrap(); + return io; +} + #[cfg(test)] mod test { use int; |
